Hi Nicolas and colleagues,
I have finally migrated my actual project (much bigger than the sample I
posted). I found that the previous highlighted build configuration I
posted did not work and resulted in my server classes to be 404. Below
are what the revised config was that worked for me. Basically I am
placing the generated output in the target tree under the webapp's tree.
I suspect that I am doing something wrong by mixing hosted mode files
and non-hosted under same tree and seek guidance on how to do this better.
I ask whether it makes sense for the plugin code to use different
default values for highlighted configuration that is not alocation in
src tree and does the right thing in the plugin by default so hosted
mode and compiled mode both just work. I would be grateful if people can
share best practice on how to set these params. Thanks.
<build>
*<outputDirectory>${basedir}/target/${pom.artifactId}-${pom.version}/WEB-INF/classes</outputDirectory>*
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.1-SNAPSHOT</version>
<configuration>
*<output>${basedir}/target/${pom.artifactId}-${pom.version}</output>*
<module>com.test.CalendarApp</module>
<runTarget>com.test.CalendarApp/Calendar.html</runTarget>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
...
<plugins>
...
<build>
Farrukh Najmi wrote:
For others benefit, here is how I have my pom (see lines in bold font
for relevant config):
<build>
*<outputDirectory>target/hosted/WEB-INF/classes</outputDirectory>*
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.1-SNAPSHOT</version>
<configuration>
*<output>${basedir}/target/hosted</output>*
<module>com.test.CalendarApp</module>
<runTarget>com.test.CalendarApp/Calendar.html</runTarget>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
...
<plugins>
...
<build>
It seems to me that writing generated output in the src tree (rather
than the target tree) is not good maven practice.
I do not know enough of the issues involved but I feel we should
change the default for the plugin to be a directory under
target tree and still have normal behavior. What do you and others
think of changing the defaults to something like what I show above in
bold? Thanks.
nicolas de loof wrote:
Gwt compiler output is set by default to webapp source folder so that
you can easily startup a "noserver" server using mvn jetty:run or
equivalent tomcat setup.
You can override this by configuration if you wish, but this doesn't
breack building the WAR anyway.
Still need to improve the doc ;)
2009/4/18 Farrukh Najmi <farr...@wellfleetsoftware.com
<mailto:farr...@wellfleetsoftware.com>>
BTW I generated my project structure via:
mvn -Dgwt.version=1.6.0 archetype:generate
-DarchetypeGroupId=org.codehaus.mojo \
-DarchetypeArtifactId=gwt-maven-plugin
-DarchetypeVersion=1.1-SNAPSHOT -DgroupId=com.test
-DartifactId=gwt-latest
Lastly, I am not sure why I am getting generated files in the
following directories:
/src/main/webapp/.gwt-tmp
src/main/webapp/com.test.Application
Why are these not being written to my target tree.
In case you need it my very minimal project is available as a zip
here:
<http://www.wellfleetsoftware.com/files/gwt-latest.zip>
--
Regards,
Farrukh
Web: http://www.wellfleetsoftware.com
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email