Wednesday, December 29, 2010

gwt&maven: how to preserve eclipse project WAR directory setting?

When importing in Eclipse an existing (gwt) maven project, the default
Project properties -> Google -> Web Application is always "src/main/
webapp".
This setting is stored in Eclipse in main/.settings/
com.google.gdt.eclipse.core.prefs

I have tried to set it using these in pom.xml, with no effect:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${maven.war.plugin.version}</version>
<configuration>
<webappDirectory>${project.build.directory}/$
{project.build.finalName}</webappDirectory>
<warSourceDirectory>${project.build.directory}/$
{project.build.finalName}</warSourceDirectory>
<webXml>src/main/resources/WEB-INF/web.xml</webXml>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<configuration>
... <hostedWebapp>${project.build.directory}/$
{project.build.finalName}</hostedWebapp>
<webappDirectory>${project.build.directory}/$
{project.build.finalName}</webappDirectory>
</plugin>


How can this Eclipse setting be forced to ${project.build.directory}/$
{project.build.finalName} by default?

Additional docs:
http://mojo.codehaus.org/gwt-maven-plugin/eclipse/google_plugin.html
http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html

--
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-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment