Thanks! solved, I had to edit the .project file

On 09/01/2011 07:34 PM, Hilco Wijbenga wrote:
On 1 September 2011 05:19, Luka Stopar<[email protected]>  wrote:
Greetings!

I'm having a problem using gwt-maven-plugin. The project compiles fine, but
I cannot run it as a web application, I can only run it by doing run
as->maven build...->gwt:run, in which case I cannot debug the code.
What do you mean by "cannot run as a web app"? If mvn gwt:run works
then it runs as a web app? Or do you mean you want to run the war?
Then you'll have to run "mvn compile gwt:compile package" (to just get
a WAR) or maybe "mvn compile gwt:compile jetty:run-war".

You can easily debug using mvn gwt:debug (just attach Eclipse using
Remote Java Application). This is much easier then using a Launcher
(i.e. I've never been able to get Launchers [for GWT] to work
reliably).

I've attached my pom.xml, it may not look best, because I already did some
trial and error.
This is what I use:

<plugin>
   <groupId>org.codehaus.mojo</groupId>
   <artifactId>gwt-maven-plugin</artifactId>
   <configuration>
     <runTarget>/index.html</runTarget>
     
<hostedWebapp>${project.build.directory}/${project.artifactId}</hostedWebapp>
     
<webappDirectory>${project.build.directory}/${project.artifactId}</webappDirectory>
     <copyWebapp>true</copyWebapp>
   </configuration>
   <dependencies>
     <dependency>
       <groupId>com.google.gwt</groupId>
       <artifactId>gwt-dev</artifactId>
       <version>${gwt.version}</version>
     </dependency>
   </dependencies>
</plugin>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to