Kayser
Kayser

Reputation: 6694

How to change GWT.xml with maven profile by a GWT project

Currently, i am working on a gwt-maven project. As every GWT project, it has the following gwt.xml

<module rename-to='myProject'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
   .
   .    
   ...

I created another gwt.xml to set configuration for continous integration. (as defined here.)

<module rename-to='myProject'>
    <!-- Inherit the core Web Toolkit stuff. -->
    <inherits name='com.myCompany.myProject' />
   .
   .    
   ...

and here is my pom to manage the profiles and change the gwt.xml.

<profile>
  <id>ci</id>
    <build>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>gwt-maven-plugin</artifactId>
          <configuration>
                  <module>com.myCompany.myProject</module>
                  <style>OBF</style>
          </configuration>
      </plugin>
    </plugins>
 </build>

</profile>

If i try to package the project with profile ci (mvn package -Pci), i get the following error.

[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:compile (default) on project MyProject: GWT Module com.myCompany.myProject not found in project sources or resources. -> [Help 1]

How can i solve it?

Upvotes: 5

Views: 1605

Answers (1)

Renato
Renato

Reputation: 13690

If your Module file is located at src/main/resources/com/myCompany/ the compiler should find your Module. Can you confirm that?

By the way, GWT module names start with a capital letter by convention.

Upvotes: 1

Related Questions