Maven build of MyBatis generator is failing

145 views
Skip to first unread message

StreetScooby

unread,
Feb 26, 2011, 4:45:52 PM2/26/11
to mybati...@googlegroups.com
Hi,
I'm new here, and have been following these download directions for the source build.
I've installed Ant, Maven, and downloaded the MyBatis generator project from svn.
The maven build of the MyBatis generator is failing with the error shown below.
Any ideas what I should do here?
Thanks,

ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project mybatis-generator-core: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] C:\Program Files\Java\jre6\..\lib\tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
[ERROR] In most cases you can change the location of your Java
[ERROR] installation by setting the JAVA_HOME environment variable.
[ERROR] -> [Help 1]
[

Eduardo

unread,
Feb 26, 2011, 4:55:19 PM2/26/11
to mybatis-user
I would try setting the JAVA_HOME to a jdk (not a jre). Please try it
and tell us how it went.
Message has been deleted

StreetScooby

unread,
Feb 26, 2011, 5:24:41 PM2/26/11
to mybati...@googlegroups.com
Hi Eduardo,
I made the change, and the maven build made it further along.
Here's the next error.
Any ideas?
In general, where can I search for these kinds of errors?
Thanks,

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.7:jar (attach-javadocs) on project mybatis-generator-core: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - javadoc: error - Illegal package name: "Settings\Louis\mybatis\mybatis-generator-core\target/apidocs"
[ERROR] javadoc: warning - No source files for package and
[ERROR]
[ERROR] Command line was: "C:\Program Files\Java\jdk1.6.0_13\jre\..\bin\javadoc.exe" -J-Xmx1024m @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in 'C:\Documents and Settings\Louis\mybatis\mybatis-generator-core\target\apidocs' dir.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :mybatis-generator-core

Jeff Butler

unread,
Feb 26, 2011, 6:02:29 PM2/26/11
to mybati...@googlegroups.com
I think the clue is the displayed folder name...shouldn't it be
"\Documents and Settings\Louis\..."?

I'm guessing that Maven or Javadoc has a problem when there is a space
in the folder path. Try moving your SVN checkout to a path with no
spaces.

I did a google search on "javadoc illegal package name" and got some good clues.

Jeff Butler

StreetScooby

unread,
Feb 26, 2011, 6:25:45 PM2/26/11
to mybati...@googlegroups.com
RIght now, I'm simply running "mvn install".
Should I run this for other targets, first?

StreetScooby

unread,
Feb 26, 2011, 6:34:23 PM2/26/11
to mybati...@googlegroups.com
There were several articles about this with javadoc. 
But, they were all fixed several years ago.

StreetScooby

unread,
Feb 26, 2011, 10:21:31 PM2/26/11
to mybatis-user
Eliminating space in the path name was the problem.
Thanks for your help.

On Feb 26, 6:02 pm, Jeff Butler <jeffgbut...@gmail.com> wrote:
> I think the clue is the displayed folder name...shouldn't it be
> "\Documents and Settings\Louis\..."?
>
> I'm guessing that Maven or Javadoc has a problem when there is a space
> in the folder path.  Try moving your SVN checkout to a path with no
> spaces.
>
> I did a google search on "javadoc illegal package name" and got some good clues.
>
> Jeff Butler
>
Reply all
Reply to author
Forward
0 new messages