Allow Maven to automatically create directories in Ubuntu -


i running maven 3.0.4 in ubuntu 12.04. have java version 1.7.0_25. trying use mvn package command, continually running errors, along lines of:

failure executing javac, not parse error: javac: directory not found: /......../target/[some folder] 

i couldn't figure out understand basic googling because destination directory has exist. suggested way handle problem create ant script (i think).

however, have no idea folders need created. not project i'm compiling, i've downloaded. can ant script still used and, if so, point me in right direction have never used ant script before, less created one, , quite accurately called ubuntu "noob"!

full maven output requested

directory is:

flume-sources - containing     flume.conf     pom.xml     src       main         java           com             cloudera               flume                 source                   twittersource.java                   twittersourceconstants.java 

maven error is:

andrew@andrew-virtualbox:~/flume-sources$ mvn package [info] scanning projects... [info]                                                                          [info] ------------------------------------------------------------------------ [info] building flume-sources 1.0-snapshot [info] ------------------------------------------------------------------------ [info]  [info] --- maven-resources-plugin:2.3:resources (default-resources) @ flume-sources --- [info] using 'utf-8' encoding copy filtered resources. [info] skip non existing resourcedirectory /home/andrew/flume-sources/src/main/resources [info]  [info] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ flume-sources --- [info] compiling 2 source files /home/andrew/flume-sources/target/classes [info] ------------------------------------------------------------- [error] compilation error :  [info] ------------------------------------------------------------- [error] failure executing javac, not parse error: javac: directory not found: /home/andrew/flume-sources/target/classes usage: javac <options> <source files> use -help list of possible options  [info] 1 error [info] ------------------------------------------------------------- [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 3.470s [info] finished at: mon jul 08 12:35:58 bst 2013 [info] final memory: 9m/59m [info] ------------------------------------------------------------------------ [error] failed execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project flume-sources: compilation failure [error] failure executing javac, not parse error: [error] javac: directory not found: /home/andrew/flume-sources/target/classes [error] usage: javac <options> <source files> [error] use -help list of possible options [error] -> [help 1] [error]  [error] see full stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable full debug logging. [error]  [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/mojofailureexception andrew@andrew-virtualbox:~/flume-sources$  

no, don't need create folder hand or ant script.

if target folder doesn't exist when run mvn, create it

so guess have permissions issue

the user running maven can't create folders in /home/andrew/flume-sources

just test, run mvn root

 sudo mvn package 

if works said , need 1) chown folder user running maven can create folders in (rw) or 2) run mvn same user owns folder (which i'm guessing andrew)


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -