target/generated-sources/gwt not on classpath for gwt:compile & gwt.test

1,760 views
Skip to first unread message

kaefert

unread,
Feb 28, 2011, 10:39:28 AM2/28/11
to Codehaus Mojo gwt-maven-plugin Users
Although I get the line
"[DEBUG] (f) generateDirectory = C:\Development\eclipse-workspaces
\workspace_gwt32\Index\target\generated-sources\gwt" at the start,
this directory is missing from the list of classpath elements a little
bit more down the log:

[DEBUG] GWT SDK execution classpath :
[DEBUG] C:\Development\eclipse-workspaces\workspace_gwt32\Index\src
\main\java
[DEBUG] C:\Development\eclipse-workspaces\workspace_gwt32\Index\src
\main\resources
[DEBUG] C:\Development\eclipse-workspaces\workspace_gwt32\Index
\target\Index-1.0-SNAPSHOT\WEB-INF\classes
[DEBUG] C:\Users\thomas.kaefer\.m2\repository\com\google\gwt\gwt-
user\2.1.1\gwt-user-2.1.1.jar
...

Therefore later on I get errors that the sources of the generated
classes are not found...
[INFO] [ERROR] Line 39: No source code is available for type
at.ac.fhcampuswien.atom.client.AtomServiceAsync; did you forget to
inherit a required module?
[INFO] [ERROR] Line 42: No source code is available for type
at.ac.fhcampuswien.atom.client.Messages; did you forget to inherit a
required module?

This problem does not seem to exist for the gwt:run and for the maven
install goals

Can somebody help me? how to get the generated-sources dir on the
classpath for the goals gwt:compile & gwt.test

nicolas de loof

unread,
Feb 28, 2011, 10:46:00 AM2/28/11
to codehaus-mojo-gwt-...@googlegroups.com, kaefert
Don't run gwt:compile or gwt:run alone, the generated-source are registered during the maven build by the various code-generator plugins. 

run either mvn package or mvn integration-test 

2011/2/28 kaefert <kae...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Codehaus Mojo gwt-maven-plugin Users" group.
To post to this group, send email to codehaus-mojo-gwt-...@googlegroups.com.
To unsubscribe from this group, send email to codehaus-mojo-gwt-maven-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?hl=en.


Jesse Farinacci

unread,
Feb 28, 2011, 10:49:35 AM2/28/11
to codehaus-mojo-gwt-...@googlegroups.com
Greetings,

On Mon, Feb 28, 2011 at 10:46 AM, nicolas de loof
<nicolas...@gmail.com> wrote:
> Don't run gwt:compile or gwt:run alone, the generated-source are registered
> during the maven build by the various code-generator plugins.
> run either mvn package or mvn integration-test

I am very surprised to hear this! I run 'mvn clean gwt:run' as my
primary way of launching development mode, and have been doing so for
years.

-Jesse

--
There are 10 types of people in this world, those
that can read binary and those that can not.

nicolas de loof

unread,
Feb 28, 2011, 10:52:03 AM2/28/11
to codehaus-mojo-gwt-...@googlegroups.com, Jesse Farinacci
gwt:run is a special case, it declares a requirement to run a compile phase
This goal is expected to be called from command line
other goals are expected to be attached to build phase and run during standard build process.


2011/2/28 Jesse Farinacci <jie...@gmail.com>

--

kaefert

unread,
Feb 28, 2011, 11:05:16 AM2/28/11
to Codehaus Mojo gwt-maven-plugin Users
Okey, so what command can I use if I want to run my GWTTestCase from
the command line?
And does mvn package do a java to javascript compilation of my
application?

Thanks for your answers!
> >http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?h....

nicolas de loof

unread,
Feb 28, 2011, 11:21:09 AM2/28/11
to codehaus-mojo-gwt-...@googlegroups.com, kaefert
gwt:test occurs at the integration-test phase by default.
I don't know a way to run it standalone. You may run them from within Eclipse thanks to GEP

compilation to JS occurs during prepare-package phase. You can skip if it is too time consumming.


2011/2/28 kaefert <kae...@gmail.com>

kaefert

unread,
Feb 28, 2011, 11:45:11 AM2/28/11
to Codehaus Mojo gwt-maven-plugin Users
hmm, when I run mvn integration-test it only runs the goal

[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ Index ---
[INFO] Surefire report directory: C:\Development\eclipse-workspaces
\workspace_gw
t32\Index\target\surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

<-- which doesn't find my GWTTestCase..


On Feb 28, 5:21 pm, nicolas de loof <nicolas.del...@gmail.com> wrote:
> gwt:test occurs at the integration-test phase by default.
> I don't know a way to run it standalone. You may run them from within
> Eclipse thanks to GEP
>
> compilation to JS occurs during prepare-package phase. You can skip if it is
> too time consumming.
>
> 2011/2/28 kaefert <kaef...@gmail.com>

Thomas Käfer

unread,
Mar 9, 2011, 3:30:50 AM3/9/11
to Codehaus Mojo gwt-maven-plugin Users
The problem was, that I was missing <goal>test</goal> within the "gwt-
maven-plugin" section of my pom.xml
Reply all
Reply to author
Forward
0 new messages