GWT maven compiler output directory
Asked Answered
R

2

6

I need to set output directory location for GWT compiler using maven plugin.

I've investigated the GWT compiler and gwt-maven-plugin docs and did not find any options for this.

For example:

I have two modules named editor and console and gwt-maven-plugin compiles them to %ROOT%/editor and %ROOT%/console dirs.

But I need to have these modules compiled into %ROOT%/ria/editor and %ROOT%/ria/console dirs to reduce effort to maintain the URL based security and other stuff.

Is it possible to set ria directory in plugin configuration to avoid unneeded new ANT task creation for moving compiled modules stuff to needed place?

Redingote answered 10/9, 2012 at 15:19 Comment(0)
I
10
<plugin>
  <artifactId>gwt-maven-plugin</artifactId>
  <configuration>
    <webappDirectory>${project.build.directory}/${project.build.finalName}/ria</webappDirectory>
  </configuration>
</plugin>

See http://mojo.codehaus.org/gwt-maven-plugin/compile-mojo.html#webappDirectory

It won't play well with the DevMode though, unless you run in -noserver mode (which I'd recommend anyway for any middle-sized/big project)

Ionia answered 10/9, 2012 at 16:51 Comment(1)
works for me!. I have my web sources in webapp/my_project/ so i configured <warSourceDirectory>${basedir}/src/main/webapp/my_project</warSourceDirectory> in gwt-maven-plugin and maven-war-plugin. I also configured the run target <runTarget>my_project/index.html</runTarget>, so gwt:run maven goal start in the right position.Fossilize
B
17

I had to un-check the checkbox highlighted in the below screenshotenter image description here

Bronson answered 14/10, 2014 at 11:10 Comment(0)
I
10
<plugin>
  <artifactId>gwt-maven-plugin</artifactId>
  <configuration>
    <webappDirectory>${project.build.directory}/${project.build.finalName}/ria</webappDirectory>
  </configuration>
</plugin>

See http://mojo.codehaus.org/gwt-maven-plugin/compile-mojo.html#webappDirectory

It won't play well with the DevMode though, unless you run in -noserver mode (which I'd recommend anyway for any middle-sized/big project)

Ionia answered 10/9, 2012 at 16:51 Comment(1)
works for me!. I have my web sources in webapp/my_project/ so i configured <warSourceDirectory>${basedir}/src/main/webapp/my_project</warSourceDirectory> in gwt-maven-plugin and maven-war-plugin. I also configured the run target <runTarget>my_project/index.html</runTarget>, so gwt:run maven goal start in the right position.Fossilize

© 2022 - 2024 — McMap. All rights reserved.