I have a Maven project, which uses the Maven Assembly Plugin to build a version of the JAR with its dependencies inside.
In my target folder I see that the Maven has built 2 version of the JAR: one without the dependencies and one with the dependencies.
I see that the version that is copied to my M2 repository is the version with dependencies.
How can I tell Maven to build both versions, but deploy the one without the dependencies to the M2 respository?
Here are parts of my pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>pack-jar-with-dependencies</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>