I have 2 JBoss Soa-p 5 services.
1st service 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>
2nd service is using a model from 1st one so I add 1st one to dependency:
<dependencies>
<dependency>
<groupId>my.service</groupId>
<artifactId>First</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
However this situation require
to install .jar
file of First
service to local repository.
Unfortunately when I do mvn clean install
on First
service both .jar
and .esb
are built, but only .esb
file is installed to local repo. I need to remove an jboss-packaging-maven-plugin
to force maven to install .jar
.
How to change a pom.xml
of First
service to install both packages on clean install
?
I figured it out... here is a parts of 1st service's
pom.xml
:and
esb.xml
(basicaly we package jar into esb file)