如何将 war 文件添加到另一个 Java Web 应用程序依赖项?
我有网络专家项目。项目的输出是一个文件。我想将此文件作为依赖项添加到project_b。
project_b的文件,有一个插件,如下所示:war
war
pom.xml
...
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<warName>geoserver</warName>
<webappDirectory>${project.build.directory}/geoserver</webappDirectory>
<packagingExcludes>WEB-INF/lib/servlet-api*.jar</packagingExcludes>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<GeoServerModule>core</GeoServerModule>
<Application-Name>${project.build.finalname}</Application-Name>
<Project-Version>${project.version}</Project-Version>
<Iteration-Name>${iteration}</Iteration-Name>
<Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
<Git-Revision>${build.commit.id}</Git-Revision>
</manifestEntries>
</archive>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>war</goal>
</goals>
</execution>
</executions>
</plugin>
...
如何将 Web 应用程序的 project_b 添加到 、 和 ?war
<groupId>org.itsme</groupId>
<artifactId>spring3-mvc-maven-xml-hello-world</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>