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.
3 Answers
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

- 92,914
- 28
- 189
- 235
-
All these parameters are for "building" the rpm with the desired name, which I do already. It's the maven deploy where I'm having problems with. – Chris F Jun 28 '13 at 13:41
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

- 6,210
- 1
- 19
- 25
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.

- 470
- 1
- 7
- 17