How to publish the jars to repository after creating multiple jars from single jar using maven assem
- by Abhijit Hukkeri
Hi
I have a used the maven assembly plugin to create multiple jar from one jar now the problem is that I have to publish these jar to the local repo, just like other maven jars publish by them self when they are built maven clean install how will I be able to do this
here is my pom file
<project>
<parent>
<groupId>parent.common.bundles</groupId>
<version>1.0</version>
<artifactId>child-bundle</artifactId>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>common.dataobject</groupId>
<artifactId>common-dataobject</artifactId>
<packaging>jar</packaging>
<name>common-dataobject</name>
<version>1.0</version>
<dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jibx</groupId>
<artifactId>maven-jibx-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<directory>src/main/resources/jibx_mapping</directory>
<includes>
<includes>binding.xml</includes>
</includes>
<verbose>false</verbose>
</configuration>
<executions>
<execution>
<goals>
<goal>bind</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-business-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<finalName>flight-dto</finalName>
<descriptors>
<descriptor>src/main/assembly/car-assembly.xml</descriptor>
</descriptors>
<attach>true</attach>
</configuration>
</execution>
<execution>
<id>make-gui-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<finalName>app_gui</finalName>
<descriptors>
<descriptor>src/main/assembly/bike-assembly.xml</descriptor>
</descriptors>
<attach>true</attach>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Here is my assembly file
<assembly>
<id>app_business</id>
<formats>
<format>jar</format>
</formats>
<baseDirectory>target</baseDirectory>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.build.outputDirectory}</directory>
<outputDirectory></outputDirectory>
<includes>
<include>com/dataobjects/**</include>
</includes>
</fileSet>
</fileSets>
</assembly>