Wednesday, November 2, 2011

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]



Where is the problem? How can i solve it?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Ce8prFlUT3AJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment