I have a question concerning Maven3. I want to create a JAR File with the name myJarFile_1.0.0-SNAPSHOT_200140723.jar
.
But Maven only create the follwoing name (I used the command "mvn clean install"):
myJarFile_1.0.0-SNAPSHOT_200140723-jar-with-dependencies.jar
Here is my finalName declaration:
<finalName>${project.artifactId}_${project.version}_${timestamp}</finalName>
Here is the configuration of my Maven-asembly-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>
jar-with-dependencies
</descriptorRef>
</descriptorRefs>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifestEntries>
<source-jdk>1.6</source-jdk>
<target-jdk>1.6</target-jdk>
</manifestEntries>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>myMainClass</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>assembly-jar-Id</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
How can i solve this problem?
I can only work with the JAR File, which includes the text "jar-with dependencies". But i must rename this file, because of my bash sell script, which execute this File. The second JAR file, which was created by maven, can not be used, since i get this error message: no main manifest attribute, in myJarFile.jar
Many thanks !