Requirement: Generate a single jar file with dependencies and give a cutsom name to the jar file.
My problem is I only need to generate a single jar file with dependencies, I don't need the default generated jar file. When I 'mvn clean install' I get the result with two jar files of names: FPMWebDocumentation-0.0.1.jar, FPMWebDocu.jar
I don't want the FPMWebDocumentation-0.0.1.jar file to be generated, I need only FPMWebDocu.jar to be generated. If I remove the groupId, artifactId, version outside of the build node it gives the error of 'groupId' missing, 'artifactId' missing and so on. Now if I remove groupId & version from it's current location and put inside inside the plugin node, it still gives same missing error as above.
Below is my 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>com.fraunhofer.latexDocumentation</groupId>
<artifactId>FPMWebDocumentation</artifactId>
<version>0.0.1</version>
<packaging>jar</packaging>
<name>FPMWebDocumentation</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>jar-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<archive>
<manifest>
<mainClass>com.fraunhofer.latexDocumentation.MainClass</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>FPMWebDocu</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.8.3</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
</dependencies>
</project>