我正在Intellij中构建一个示例GWT项目。问题是我的服务模块中的代码更改未反映在webapp中。
以下是我项目的结构:
父POM:
<modules>
<module>gwt-widgets</module>
<module>gwt-core</module>
<module>gwt-services</module>
<module>gwt-rpc</module>
</modules>
<packaging>pom</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
gwt-core:这是一个网络应用程序:
<packaging>war</packaging>
<artifactId>gwt-core</artifactId>
<dependencies>
<dependency>
<groupId>com.tuannguyen.gwt</groupId>
<artifactId>gwt-widgets</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.tuannguyen.gwt</groupId>
<artifactId>gwt-widgets</artifactId>
<version>1.0-SNAPSHOT</version>
<classifier>sources</classifier>
<scope>provided</scope><!-- use for compilation only -->
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
</dependency>
<dependency>
<groupId>com.tuannguyen.gwt</groupId>
<artifactId>gwt-services</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.tuannguyen.gwt</groupId>
<artifactId>gwt-rpc</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.tuannguyen.gwt</groupId>
<artifactId>gwt-rpc</artifactId>
<version>1.0-SNAPSHOT</version>
<classifier>sources</classifier>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.6.0</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>generateAsync</goal>
</goals>
</execution>
</executions>
<configuration>
<modules>
<module>com.tuannguyen.widgets.Widgets</module>
<module>com.tuannguyen.example.Examples</module>
<module>com.tuannguyen.example.Services</module>
</modules>
<runTarget>gwtia-ch04-widgets.html</runTarget>
<compileSourcesArtifacts>
<compileSourcesArtifact>com.tuannguyen.gwt:gwt-widgets</compileSourcesArtifact>
<compileSourcesArtifact>com.tuannguyen.gwt:gwt-services</compileSourcesArtifact>
<compileSourcesArtifact>com.tuannguyen.gwt:gwt-rpc</compileSourcesArtifact>
</compileSourcesArtifacts>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<archiveClasses>true</archiveClasses>
<warSourceExcludes>WEB-INF/classes/**</warSourceExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.8.RC0</version>
</plugin>
</plugins>
</build>
Examples.gwt.xml:gwt-core中的模块
<module rename-to="Examples">
<!-- inherit the standard User module as all GWT applications must -->
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.tuannguyen.widgets.Widgets'/>
<inherits name='com.tuannguyen.example.Services'/>
<!-- Use the standard theme for widgets -->
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<!-- note the entry point for the application -->
<entry-point class='com.tuannguyen.example.client.Examples'/>
<!-- Indicate where the code that should be translated to Javascript can be found.
By default this is in the client package, but we indicate that explicitly in
this example, just to introduce the tag. -->
<source path='client'/>
<add-linker name="xsiframe"/>
<set-configuration-property name="devModeRedirectEnabled" value="true" />
GWT服务:
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.tuannguyen.gwt</groupId>
<artifactId>gwt-rpc</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
gwt-widgets,它是gwt-core中使用的gwt模块:
dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
</plugins>
</build>
一些问题:
这些问题有解决办法吗?