On Wednesday, May 1, 2013 8:50:57 PM UTC+2, Kris wrote:
>
> ok, I will try to get solution 2 to work..
>
> I am a little confused about how to set... 
>
> In the properties of the project -> Google -> Web Application -> WAR 
> directory ( here I have src/main/webapp )... 
> and Launch and deploy from this directory. (disabled because this is a 
> Maven project)
>
> In the properties of the project -> Java Build Path -> Source -> Default 
> output folder... what should I have here... 
>

target/<myapp>/WEB-INF/classes
 

>
> Here is part of my pom.xml
>
> <properties>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> <!-- Convenience property to set the GWT version -->
> <errai.version>2.2.0.Final</errai.version>
>
> <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
> <gwtVersion>2.5.1</gwtVersion>
> </properties>
>
>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>3.0</version>
> <configuration>
> <encoding>UTF-8</encoding>
> <verbose>true</verbose>
> <source>1.7</source>
> <target>1.7</target>
>

Be careful, GWT only supports Java 6 sources.
(mixing client-side and server-side in the same Maven module is an 
anti-pattern to begin with, but not impossible).
 

> </configuration>
> </plugin>
> <!-- GWT Maven Plugin -->
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>gwt-maven-plugin</artifactId>
> <version>2.5.1</version>
> <executions>
> <execution>
> <goals>
> <goal>compile</goal>
> <goal>test</goal>
> <goal>i18n</goal>
> <goal>generateAsync</goal>
> </goals>
> </execution>
> </executions>
> <!-- Plugin configuration. There are many available options, see 
> gwt-maven-plugin 
> documentation at codehaus.org -->
> <configuration>
>  <runTarget>ppmock.html</runTarget>
> <hostedWebapp>${webappDirectory}</hostedWebapp>
>

Remove that line unless you really know what you're doing (you're actually 
not using it anyway, as you're not using "mvn gwt:run")
 

>
> <i18nMessagesBundle>com.farheap.jsi.ppmock.client.GUIConstants</i18nMessagesBundle>
> <gwtSdkFirstInClasspath>true</gwtSdkFirstInClasspath>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <version>2.3</version>
> <configuration>
> <webappDirectory>${webappDirectory}</webappDirectory>
> <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
> <archive>
> <manifest>
> <addClasspath>false</addClasspath>
>  </manifest>
> </archive>
> </configuration>
> </plugin>
>

With that configuration, you'll never have any JAR in WEB-INF/lib, so that 
won't work.
You have to move that to a profile so you can easily disable it (but then 
be very careful when releasing your app; changing the produced artifact 
with profiles is an anti-pattern, though very useful in GWT's case, but for 
other use-cases)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to