Reputation: 16813
I use the rpm-maven-plugin from mojo.codehaus.org to generate my RPM called MyRPM-3.0.0-1.x86_64.rpm. However when I deploy the rpm to artifactory, I get MyRPM-3.0.0.rpm. How can I include the build number (the -1 part) and architecture (the _x86_64 part) in the deployment? I'm using maven 3.0.3.
Upvotes: 2
Views: 1902
Reputation: 591
I am probably too late here, but I hope that I can help someone. So you can call:
mvn rpm:rpm rpm:version
The first goal is pretty simple, it will be made the final rpm package, but the second goal will set properties ${rpm.version} and ${rpm.release} -> link
In you case rpm.version will be 3.0.0 and rpm.release is the 1 and the last one property, which you need is os.arch = x86_64, but it depends on the system, where you build the rpm. Hope it helps.
Upvotes: 0
Reputation: 6306
Use the attached-rpm goal[1] and set the classifier to be the combination of os and architecture.
http://mojo.codehaus.org/rpm-maven-plugin/attached-rpm-mojo.html
Upvotes: 0
Reputation: 97517
You can use the release parameter to set the release or you can change the version parameter as well.
For the architecture you can use either the needarch parameter or depending on your needs the targetArchitecture
Upvotes: 0