tags:

views:

43

answers:

2

How can I change the name from 1.0.snapshot-jar-with-dependencies to something else, below are contents of my pom :

<build>
            <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.2-beta-5</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>com.package.example.MainClass</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>
        </plugins>
    </build>
+1  A: 

You can achieve this by specifying the finalName property in your pom, e.g.

<build>
    <finalName>something-else</finalName>
    ...
</build>
Péter Török
@Péter Török again I get something-else-jar-with-dependencies this worked, how can I get rid of jar-with-dependencies, when I delete descriptorRefs I get build error
Gandalf StormCrow
+1  A: 

Use the following in the configuration of the maven-assembly-plugin:

<configuration>
  <finalName>custom-name</finalName>
  <appendAssemblyId>false</appendAssemblyId>
</configuration>

Full details in the official documentation of the assembly:assembly mojo.

Pascal Thivent