Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Create a MavenFilteredUserAgent module that sets <code>user.agent</code> from various profiles in the pom.xml.</p> <p><strong>MavenFilteredUserAgent.gwt.xml</strong></p> <pre><code>... &lt;set-property name="user.agent" value="${gwt.compile.user.agent}" /&gt; ... </code></pre> <p><strong>pom.xml</strong></p> <pre><code>... &lt;properties&gt; &lt;!-- By default we still want all five rendering engines when none of the following profiles is explicitly specified --&gt; &lt;gwt.compile.user.agent&gt;ie6,ie8,gecko,gecko1_8,safari,opera&lt;/gwt.compile.user.agent&gt; &lt;/properties&gt; &lt;profiles&gt; &lt;profile&gt; &lt;id&gt;gwt-firefox&lt;/id&gt; &lt;properties&gt; &lt;gwt.compile.user.agent&gt;gecko1_8&lt;/gwt.compile.user.agent&gt; &lt;/properties&gt; &lt;/profile&gt; &lt;/profiles&gt; &lt;!-- Add additional profiles for the browsers you want to singly support --&gt; .... &lt;build&gt; &lt;resources&gt; &lt;resource&gt; &lt;!-- Put the filtered source files into a directory that later gets added to the build path --&gt; &lt;directory&gt;src/main/java-filtered&lt;/directory&gt; &lt;filtering&gt;true&lt;/filtering&gt; &lt;targetPath&gt;${project.build.directory}/filtered-sources/java&lt;/targetPath&gt; &lt;/resource&gt; &lt;resource&gt; &lt;directory&gt;${project.basedir}/src/main/resources&lt;/directory&gt; &lt;/resource&gt; &lt;/resources&gt; &lt;plugins&gt; ... &lt;plugin&gt; &lt;!-- Add the filtered sources directory to the build path--&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;build-helper-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.5&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;add-source&lt;/id&gt; &lt;phase&gt;generate-sources&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;add-source&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;sources&gt; &lt;source&gt;${project.build.directory}/filtered-sources/java&lt;/source&gt; &lt;/sources&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; ... &lt;/plugins&gt; ... </code></pre> <p>Have all of your modules inherit the MavenFilteredUserAgent module.</p> <p>Then you can build for just firefox like so.</p> <p><code>mvn install -Pgwt-firefox</code></p> <p><a href="http://9mmedia.com/blog/?p=854" rel="nofollow">http://9mmedia.com/blog/?p=854</a> has more details.</p>
 

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