Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I 'll reply to your second question first, as it is not GWT specific. Considering your project is structured this way :</p> <pre><code>project-root |- module1 (jar) |- module2 (jar) L moduleMain (gwt + war) </code></pre> <p>If you make some changes in <code>module2</code>, and do not want to recompile <code>module1</code>, you can use the option <code>-pl</code> to skip it from the build process (command to launch from the <code>project-root</code> folder):</p> <pre><code>mvn clean install -pl module2,moduleMain </code></pre> <p>This will recompile <code>module2</code>, and then <code>moduleMain</code>, without recompiling <code>module1</code>.</p> <p><strong>Will this help us in Improving the compilation time ?</strong></p> <p>It depends how big are <code>module1</code> and <code>module2</code> compared to <code>moduleMain</code>... But my experience with GWT is that a lot of time is generally spent to compile the java client code into javascript. This operation still occurs in your <code>moduleMain</code>, so I would say that splitting your project into several modules won't be enough to improve the compilation time significantly.</p> <p>In addition, I advise you to use a profile that will control the activation/deactivation of the <code>gwt-maven-plugin</code> within <code>moduleMain</code>.</p> <p>In the <code>moduleMain</code>'s pom.xml, move the GWT plugin into a profile, this way :</p> <pre><code>&lt;profiles&gt; &lt;profile&gt; &lt;id&gt;GWTBuild&lt;/id&gt; &lt;activation&gt; &lt;activeByDefault&gt;true&lt;/activeByDefault&gt; &lt;/activation&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;gwt-maven-plugin&lt;/artifactId&gt; &lt;version&gt;2.4.0&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;goals&gt; &lt;goal&gt;compile&lt;/goal&gt; &lt;goal&gt;generateAsync&lt;/goal&gt; &lt;goal&gt;test&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;configuration&gt; &lt;runTarget&gt;com.yoururlroot/index.html&lt;/runTarget&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/profile&gt; &lt;/profiles&gt; </code></pre> <p>Then, if you just want to rebuild your war because <code>module2</code> has changed BUT whithout rebuilding <code>module1</code> AND whithout recompiling all the GWT stuff, simply launch :</p> <pre><code>mvn clean install -pl module2,moduleMain -P!GWTBuild </code></pre> <p>In this command, the GWT plugin is deactivated, so maven will only rebuild the war.</p> <p>Tell me if this is working for you.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload