Maven stops with i18n generation error

782 views
Skip to first unread message

Alex Nederlof

unread,
Nov 10, 2010, 5:09:53 AM11/10/10
to Google Web Toolkit
Hi all,

I can't get Maven to work. When I make a new Maven project from
eclipse of from the command line it gives me:

11/10/10 11:08:42 AM CET: Collecting project info '/pom.xml' /Users/
alex/Development/webapps/tralala/pom.xml
11/10/10 11:08:42 AM CET: Generating sources /tralala/pom.xml
11/10/10 11:08:42 AM CET: Adding source folder /tralala/src/main/java
11/10/10 11:08:42 AM CET: Adding resource folder /tralala/src/main/
resources
11/10/10 11:08:42 AM CET: Adding source folder /tralala/src/test/java
11/10/10 11:08:42 AM CET: Adding resource folder /tralala/src/test/
resources
11/10/10 11:08:42 AM CET: Project import completed 0 sec
11/10/10 11:08:42 AM CET: Refreshing [/tralala/pom.xml]
11/10/10 11:08:44 AM CET: Maven Builder: FULL_BUILD requireFullBuild
11/10/10 11:08:44 AM CET: [ERROR] Error: Could not find the resource
'com/alexnederlof/tralala/Messages.properties matching
'com.alexnederlof.tralala.Messages' did you remember to add it to your
classpath?
11/10/10 11:08:44 AM CET: [ERROR] Google Web Toolkit 2.1.0
11/10/10 11:08:44 AM CET: [ERROR] I18NSync [-out fileName] [-
createConstantsWithLookup] [-createMessages] name of the Constants/
Messages interface to create
11/10/10 11:08:44 AM CET: [ERROR]
11/10/10 11:08:44 AM CET: [ERROR] where
11/10/10 11:08:44 AM CET: [ERROR] -
out Java source
directory, defaults to the resource's class path.
11/10/10 11:08:44 AM CET: [ERROR] -
createConstantsWithLookup Create scripts for
a ConstantsWithLookup interface rather than a Constants one
11/10/10 11:08:44 AM CET: [ERROR] -
createMessages Create scripts for
a Messages interface rather than a Constants one
11/10/10 11:08:44 AM CET: [ERROR] and
11/10/10 11:08:44 AM CET: [ERROR] name of the Constants/Messages
interface to create Identifies the Constants/Messages class to be
created. For example com.google.sample.i18n.client.Colors
11/10/10 11:08:44 AM CET: Build errors for tralala;
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal org.codehaus.mojo:gwt-maven-plugin:2.1.0:i18n (default)
on project tralala: Command [[
/bin/sh -c /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/
Home/bin/java -Xmx512m -classpath /Users/alex/Development/webapps/
tralala/src/main/java:/Users/alex/Development/webapps/tralala/src/main/
resources:/Users/alex/Development/webapps/tralala/target/tralala-0.0.1-
SNAPSHOT/WEB-INF/classes:/Users/alex/.m2/repository/com/google/gwt/gwt-
user/2.1.0/gwt-user-2.1.0.jar:/Users/alex/.m2/repository/com/google/
gwt/gwt-dev/2.1.0/gwt-dev-2.1.0.jar com.google.gwt.i18n.tools.I18NSync
-out /Users/alex/Development/webapps/tralala/target/generated-sources/
gwt -createMessages com.alexnederlof.tralala.Messages
]] failed with status 1

Does anyone have any id? I tried everything I know

cri

unread,
Nov 10, 2010, 12:33:04 PM11/10/10
to Google Web Toolkit
Your current problem is due to the Messages directory being specified
incorrectly in the pom file. The latter most package component should
be "client" as I recall. Unfortunately, you will encounter additional
problems. For example, there is a generated class dir that doesn't get
included in the eclipse classpath. My feeling is that gwt-maven-plugin
2.1 is not yet ready for general use. Not sure that it's been
officially released.

Alex Nederlof

unread,
Nov 11, 2010, 4:07:18 AM11/11/10
to google-we...@googlegroups.com
I thought the release was official because it's in the Codehaus repo http://repo1.maven.org/maven2/org/codehaus/mojo/gwt-maven-plugin/2.1.0/

Did you get Maven to work? I was thinking of creating Maven dirs manually this afternoon but if it's not going to work at all I won't spend the effort of trying.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Thomas Broyer

unread,
Nov 11, 2010, 6:50:40 AM11/11/10
to Google Web Toolkit


On 11 nov, 10:07, Alex Nederlof <a...@nederlof.com> wrote:
> I thought the release was official because it's in the Codehaus repohttp://repo1.maven.org/maven2/org/codehaus/mojo/gwt-maven-plugin/2.1.0/
>
> Did you get Maven to work? I was thinking of creating Maven dirs manually
> this afternoon but if it's not going to work at all I won't spend the effort
> of trying.

FWIW, I don't use the archetype. I'm new to maven (using it only since
early july this year) I didn't find it difficult to add the
dependencies and plugin afterwards to an empty project.
BTW, the plugin's doc says to use archetype:generate rather than
archetype:create, and I don't know what m2eclipse uses:
http://mojo.codehaus.org/gwt-maven-plugin/archetype.html
You can also try using GWT's webAppCreator with the "-maven" argument.

Alex Nederlof

unread,
Nov 12, 2010, 4:19:23 AM11/12/10
to google-we...@googlegroups.com
Great tip, that works!

Thanks!


--

UseTheFork

unread,
Dec 5, 2010, 7:42:03 AM12/5/10
to Google Web Toolkit
I came across the same issue under NetBeans 6.9.1.

i) I corrected the "client" issue in the pom.xml (see cri's comment).
ii) Then, the project would not compile because the provided GWTTest
fails. I tried to annotate it with JUnit's @Ignore.
iii) Unfortunately, the test is performed within gwt:test, not the
typical maven [surefire:test]. So @Ignore is of no use.
iv) Next, I deleted the test class from the project.
v) Then, the archetype project compiled fine and deployed well. It
works !!!

I am on NetBeans 6.9.1 with Tomcat 6.0.20 (of course, I'll have to dig
that test issue, but it is a start...)

UseTheFork


P.S.: Typically, I believe a proper maven project pom.xml for GWT
should contain the following the plugin reference:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>

Otherwise, the following two lines in the properties are a bit
pointless:

<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
Reply all
Reply to author
Forward
0 new messages