1
我有2個JBoss Soa-p 5服務。Force Maven安裝.esb和.jar
1服務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
安裝文件的First
服務.jar
本地存儲庫。
不幸的是,當我在First
服務做mvn clean install
都.jar
和.esb
建成,但只有.esb
文件安裝到本地回購。我需要刪除jboss-packaging-maven-plugin
以強制maven安裝.jar
。
如何更改pom.xml
的First
服務來安裝這兩個包在clean install
?