我有 2 个 JBoss Soa-p 5 服务。
第一次服务pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>my.service</groupId>
<artifactId>First</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging> <!-- to build .jar file -->
<name>${project.artifactId}</name>
<!-- dependencies and properties here -->
<build>
<finalName>${project.artifactId}</finalName>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<!-- to build .esb file -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-packaging-maven-plugin</artifactId>
<version>2.1.1</version>
<extensions>true</extensions>
<configuration>
<archiveName>${project.artifactId}</archiveName>
</configuration>
<executions>
<execution>
<id>build-esb</id>
<goals>
<goal>esb</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
第二个服务使用第一个模型,所以我将第一个添加到依赖项:
<dependencies>
<dependency>
<groupId>my.service</groupId>
<artifactId>First</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
但是,这种情况require
需要将服务.jar
文件安装First
到本地存储库。
不幸的是,当我同时mvn clean install
提供First
服务.jar
并.esb
构建时,但只有.esb
文件安装到本地存储库。我需要删除一个jboss-packaging-maven-plugin
强制 maven 安装.jar
。
如何更改服务pom.xml
以First
安装两个软件包clean install
?