Reputation: 3244
How to configure maven build in eclipse to use another filename?
Analog of:
mvn -f custom_pom_name.pom
mvn --help
...
-f,--file Force the use of an alternate POM
file.
...
Upvotes: 3
Views: 1055
Reputation: 74671
set the finalName
property in pom.xml as follows:
<build>
<finalName>myjar</finalName>
</build>
From commandline: We cannot directly override fileName
. Adding the following property in pom, we can do as follows:
<myCustomName>${artifactId}-${version}</myCustomName>
....
<build>
<finalName>${myCustomName}</finalName>
...
</build>
from commandline, we can define as follows:
-DmyCustomName=%maven.project.artifcatId%-%build.number%
Upvotes: 0
Reputation: 56
Add -f custom_pom_name.pom
to the Goals:
section in the run configuration dialog.
Upvotes: 4
Reputation: 39651
Choose Run As
-> Maven build...
. In the dialog add f
as parameter with the pom-File as value.
... or consider using profiles instead of different pom-files.
Upvotes: 0