title: gwt aliased resource with maven plugin
body: <p>I'm using gwt with maven plugin. My <code>web.xml</code> looks like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
            http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"&gt;
  
  &lt;!-- Servlets --&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;queryServiceImpl&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.vo.search.server.QueryServiceImpl&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;queryServiceImpl&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/admin/queryService&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;!-- Default page to serve --&gt;
  &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;Admin.html&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>And my module <code>Admin.gwt.xml</code> looks like this :</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;module rename-to='admin'&gt;
  &lt;!-- Inherit the core Web Toolkit stuff. --&gt;
  &lt;inherits name="com.google.gwt.core.Core" /&gt;
  &lt;inherits name='com.google.gwt.user.User' /&gt;
  &lt;inherits name="com.google.gwt.i18n.I18N" /&gt;
  &lt;inherits name="com.google.gwt.i18n.CldrLocales" /&gt;
  &lt;inherits name="com.google.gwt.user.theme.clean.CleanResources" /&gt;
  
  &lt;!-- Enable debug ID. --&gt;
  &lt;inherits name="com.google.gwt.user.Debug" /&gt;
  &lt;set-property name="gwt.enableDebugId" value="true" /&gt;
  
  &lt;!-- We need the JUnit module in the main module, --&gt;
  &lt;!-- otherwise eclipse complains (Google plugin bug?) --&gt;
  &lt;!-- &lt;inherits name='com.google.gwt.junit.JUnit' /&gt; --&gt;
  
  &lt;!-- Inherit the default GWT style sheet. You can change --&gt;
  &lt;!-- the theme of your GWT application by uncommenting --&gt;
  &lt;!-- any one of the following lines. --&gt;
  &lt;inherits name='com.google.gwt.user.theme.clean.Clean' /&gt;
  &lt;!-- &lt;inherits name='com.google.gwt.user.theme.standard.Standard'/&gt; --&gt;
  &lt;!-- &lt;inherits name='com.google.gwt.user.theme.chrome.Chrome'/&gt; --&gt;
  &lt;!-- &lt;inherits name='com.google.gwt.user.theme.dark.Dark'/&gt; --&gt;
  
  &lt;!-- Other module inherits --&gt;
  
  &lt;!-- Specify the app entry point class. --&gt;
  &lt;entry-point class='com.vo.search.client.Admin' /&gt;
  
  &lt;!-- Specify the app entry point class. --&gt;
  
  &lt;!-- Specify the paths for translatable code --&gt;
  &lt;source path='client' /&gt;
  &lt;source path='shared' /&gt;
  
  
  &lt;/module&gt;
  </code></pre>
  
  <p>Finally, my <code>pom.xml</code> looks like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
  
  &lt;!-- POM file generated with GWT webAppCreator --&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.vo.search&lt;/groupId&gt;
  &lt;artifactId&gt;search-admin&lt;/artifactId&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;1.0&lt;/version&gt;
  &lt;name&gt;Admin&lt;/name&gt;
  
  &lt;properties&gt;
      &lt;!-- Convenience property to set the GWT version --&gt;
      &lt;gwtVersion&gt;2.5.0-rc1&lt;/gwtVersion&gt;
      &lt;!-- GWT needs at least java 1.5 --&gt;
      &lt;webappDirectory&gt;${project.build.directory}/${project.build.finalName}&lt;/webappDirectory&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.gwt&lt;/groupId&gt;
          &lt;artifactId&gt;gwt-servlet&lt;/artifactId&gt;
          &lt;version&gt;${gwtVersion}&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.gwt&lt;/groupId&gt;
          &lt;artifactId&gt;gwt-user&lt;/artifactId&gt;
          &lt;version&gt;${gwtVersion}&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.7&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.validation&lt;/groupId&gt;
          &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.GA&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.validation&lt;/groupId&gt;
          &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.GA&lt;/version&gt;
          &lt;classifier&gt;sources&lt;/classifier&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;!-- Generate compiled stuff in the folder used for developing mode --&gt;
      &lt;outputDirectory&gt;${webappDirectory}/WEB-INF/classes&lt;/outputDirectory&gt;
  
      &lt;plugins&gt;
  
          &lt;!-- GWT Maven Plugin --&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.5.0-rc1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;compile&lt;/goal&gt;
                          &lt;goal&gt;test&lt;/goal&gt;
                          &lt;goal&gt;i18n&lt;/goal&gt;
                          &lt;goal&gt;generateAsync&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;!-- Plugin configuration. There are many available options, see gwt-maven-plugin 
                  documentation at codehaus.org --&gt;
              &lt;configuration&gt;
                  &lt;runTarget&gt;Admin.html&lt;/runTarget&gt;
                  &lt;hostedWebapp&gt;${webappDirectory}&lt;/hostedWebapp&gt;
                  &lt;i18nMessagesBundle&gt;com.vo.search.client.Messages&lt;/i18nMessagesBundle&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  
          &lt;!-- Copy static web files before executing gwt:run --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.1.1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;compile&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;exploded&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                  &lt;webappDirectory&gt;${webappDirectory}    &lt;/webappDirectory&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.3.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.5&lt;/source&gt;
                  &lt;target&gt;1.5&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Building and running the project works fine. When trying to access the page I see in the console :</p>
  
  <pre><code>[WARN] Aliased resource: file:/C:/workspaces/search/admin-mvn/search-admin/src/main/webapp/admin/admin.nocache.js==file:/C:/workspaces/search/admin-mvn/search-admin/src/main/webapp/Admin/Admin.nocache.js
  [WARN] Aliased resource: file:/C:/workspaces/search/admin-mvn/search-admin/src/main/webapp/admin/admin.nocache.js==file:/C:/workspaces/search/admin-mvn/search-admin/src/main/webapp/Admin/Admin.nocache.js
  [WARN] 404 - GET /admin/admin.nocache.js (127.0.0.1) 1408 bytes
     Request headers
        Host: 127.0.0.1:8888
        Connection: keep-alive
        User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like     Gecko) Chrome/22.0.1229.39 Safari/537.4
        Accept: */*
        Referer: http://127.0.0.1:8888/Admin.html?gwt.codesvr=127.0.0.1:9997
        Accept-Encoding: gzip,deflate,sdch
        Accept-Language: en-US,en;q=0.8
        Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
     Response headers
        Content-Type: text/html; charset=iso-8859-1
        Content-Length: 1408
  </code></pre>
  
  <p>I think the problem is that it looks for file <code>admin.nocache.js</code> in <code>admin</code> dir but the generated dir is actually <code>Admin</code> even though my <code>rename-to</code> attribute is <code>admin</code> in the module configuration file. Changing the <code>rename-to</code> attribute to match didn't help.</p>
  
  <p>Here's my project organization created by <a href="http://mojo.codehaus.org/gwt-maven-plugin/user-guide/archetype.html" rel="nofollow noreferrer">gwt-maven-plugin archetype</a>:
  <img src="https://i.stack.imgur.com/IHivj.png" alt="enter image description here"></p>