我有一个maven多模块工程,其中有一个war模块A依赖于另一个war模块B,使用idea或eclipse里的maven命令打包没有问题,但直接使用maven的install命令打到包模块A时“报找不到符号”。是因为引用了模块B里面的一些类没有找到。主要配置如下:
<dependency>
<groupId>com.post.traffic</groupId>
<artifactId>post_traffic_client</artifactId>
<version>1.0</version>
<type>war</type>
</dependency>
....
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<overlays>
<overlay>
<groupId>com.post.traffic</groupId>
<artifactId>post_traffic_client</artifactId>
<!--<excludes>
<exclude>WEB-INF/web.xml</exclude>
</excludes>-->
</overlay>
</overlays>
<webResources>
<resource>
<directory>WebRoot</directory>
</resource>
</webResources>
</configuration>
</plugin>