ctron / rpm-builder

Maven RPM builder plugin
https://ctron.github.io/rpm-builder
Eclipse Public License 2.0
55 stars 32 forks source link

How to get rpm output file name #66

Closed kasbert closed 2 years ago

kasbert commented 2 years ago

You can set outputFileName and snapshotBuildId, but if they are not set, how would you get the output file name ?

I want to continue processing the rpm in the next maven phases, but I cannot grab the rpm file name. It would be nice, if the file name and other generated info was set to properties.

ctron commented 2 years ago

Having a non-snapshot version, the filename of the RPM should be pretty predictable.

Only when using a SNAPSHOT version, the file name will contain the current (as of running the plugin) timestamp.

It is however possible to override this value, using the parameter rpm.snapshotBuildId. IIRC there is a maven.build.timestamp property which you could use for this. It might however be, that you also need to set maven.build.timestamp.format to a format which is suitable for a file name. You could of course use any other way (with additional plugins) to set a pre-defined snapshot build id.

In general, I agree that it would be nice to have the output filename available as maven property. If you know how to do it, I would welcome a PR on this one.