Maven build with Place Annotations

44 views
Skip to first unread message

vinnie

unread,
Mar 1, 2012, 10:14:26 AM3/1/12
to google-we...@googlegroups.com
Hi - I'm attempting to convert my GWT app to build with maven.  The first issue I've his is that the compiler does not seem to like the "@WithTokenizers" I have in my PlaceHistoryMapper - at least that's what I think is failing and if I comment those out the application will compile.  Do I need to put some extra configuration in my pom to get this to work?  It compiles fine in eclipse or if I attempt the maven build after eclipse has already compiled the GWT source.

Here's the exception I get:
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin
:2.3.2:compile (default-compile) on project product_ui_administration: Compilation failure
\workspaces\java\product_ui_administration\src\main\java\com\company\product\ui\administration\AdminPlaceHistoryMapper.java:[13,0] illega
l start of expression

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
\workspaces\java\product_ui_administration\src\main\java\com\company\product\ui\administration\AdminPlaceHistoryMapper.java:[13,0] illega
l start of expression

        at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:656)
        at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
[ERROR]

Thomas Broyer

unread,
Mar 1, 2012, 10:32:08 AM3/1/12
to google-we...@googlegroups.com
Maven defaults to Java 1.4 source and target. You have to tell it to use Java 5 or Java 6.

So you can have:
<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>

vinnie

unread,
Mar 1, 2012, 11:23:20 AM3/1/12
to google-we...@googlegroups.com
Thanks, but I already have that set to 1.6.
Reply all
Reply to author
Forward
0 new messages