RPM plugin file version

View: New views
4 Messages — Rating Filter:   Alert me  

RPM plugin file version

by damonsmith :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all, I have successfully configured my pom file such that maven2 builds a target folder with wars, source jars, and an rpm file with all my configuration in it.  The rpm file ends up in target
target/rpm/<artifact-name>/RPMS/noarch/<artifact-name>-1.1-1.noarch.rpm

The rpm plugin is configured with a goal of attached-rpm, which means 'mvn install' builds the target folder fine and moves my war and jar into my local repository, but it doesn't move my rpm file. 

I am trying to solve this by configuring an install-file target to also move the rpm file.  This *almost* works, but for some strange behaviour by the rpm plugin. - If the version ends with SNAPSHOT it arbitrarily appends a timestamp to the file, which means I can't find the file to deploy because it has a random number on the end.  If I use a number, it appends a '-1' on the end for no reason, and if I use an arbitrary other word - "<version>1.1-SNACKSHOP</version> then it appends a _1 on the end, as documented here:
http://mojo.codehaus.org/rpm-maven-plugin/ident-params.html#version
(see the section on arbitrary version endings with no explanation of why)

So we want to develop snapshot RPM files for our dev deployments and use them on dev environments, and then use release numbered versions for releases, but with this strange behaviour of adding an arbitrary additional ending, it doesn't work the same way in all cases.  Can anyone tell me why that is, or how to disable it?

thanks,

Damon

Re: RPM plugin file version

by Stephen Connolly-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

buildhelper:attach

Sent from my [rhymes with tryPod] ;-)

On 14 Sep 2009, at 18:28, Damon Smith <damon@...> wrote:

Hi all, I have successfully configured my pom file such that maven2 builds a target folder with wars, source jars, and an rpm file with all my configuration in it.  The rpm file ends up in target
target/rpm/<artifact-name>/RPMS/noarch/<artifact-name>-1.1-1.noarch.rpm

The rpm plugin is configured with a goal of attached-rpm, which means 'mvn install' builds the target folder fine and moves my war and jar into my local repository, but it doesn't move my rpm file. 

I am trying to solve this by configuring an install-file target to also move the rpm file.  This *almost* works, but for some strange behaviour by the rpm plugin. - If the version ends with SNAPSHOT it arbitrarily appends a timestamp to the file, which means I can't find the file to deploy because it has a random number on the end.  If I use a number, it appends a '-1' on the end for no reason, and if I use an arbitrary other word - "<version>1.1-SNACKSHOP</version> then it appends a _1 on the end, as documented here:
http://mojo.codehaus.org/rpm-maven-plugin/ident-params.html#version
(see the section on arbitrary version endings with no explanation of why)

So we want to develop snapshot RPM files for our dev deployments and use them on dev environments, and then use release numbered versions for releases, but with this strange behaviour of adding an arbitrary additional ending, it doesn't work the same way in all cases.  Can anyone tell me why that is, or how to disable it?

thanks,

Damon

Re: RPM plugin file version

by damonsmith :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Heh, thanks but no it was me being dumb in the end.  The RPM plugin goal "attached-rpm" _does_ deploy the rpm file to the local repository, it just wasn't for me because I'd added a <phase>install</phase> inside the execution config for that plugin.  Jeepers that was hard to fix!

2009/9/14 Stephen Connolly <stephen.alan.connolly@...>
buildhelper:attach

Sent from my [rhymes with tryPod] ;-)

On 14 Sep 2009, at 18:28, Damon Smith <damon@...> wrote:

Hi all, I have successfully configured my pom file such that maven2 builds a target folder with wars, source jars, and an rpm file with all my configuration in it.  The rpm file ends up in target
target/rpm/<artifact-name>/RPMS/noarch/<artifact-name>-1.1-1.noarch.rpm

The rpm plugin is configured with a goal of attached-rpm, which means 'mvn install' builds the target folder fine and moves my war and jar into my local repository, but it doesn't move my rpm file. 

I am trying to solve this by configuring an install-file target to also move the rpm file.  This *almost* works, but for some strange behaviour by the rpm plugin. - If the version ends with SNAPSHOT it arbitrarily appends a timestamp to the file, which means I can't find the file to deploy because it has a random number on the end.  If I use a number, it appends a '-1' on the end for no reason, and if I use an arbitrary other word - "<version>1.1-SNACKSHOP</version> then it appends a _1 on the end, as documented here:
http://mojo.codehaus.org/rpm-maven-plugin/ident-params.html#version
(see the section on arbitrary version endings with no explanation of why)

So we want to develop snapshot RPM files for our dev deployments and use them on dev environments, and then use release numbered versions for releases, but with this strange behaviour of adding an arbitrary additional ending, it doesn't work the same way in all cases.  Can anyone tell me why that is, or how to disable it?

thanks,

Damon


Re: RPM plugin file version

by antonio.louis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Provide some value (maybe empty space) for <release>el5</release> under <configuration> to avoid the below issue of _1 on the end

Regards,
Antonio

damonsmith wrote:
Hi all, I have successfully configured my pom file such that maven2 builds a
target folder with wars, source jars, and an rpm file with all my
configuration in it.  The rpm file ends up in target
target/rpm/<artifact-name>/RPMS/noarch/<artifact-name>-1.1-1.noarch.rpm

The rpm plugin is configured with a goal of attached-rpm, which means 'mvn
install' builds the target folder fine and moves my war and jar into my
local repository, but it doesn't move my rpm file.

I am trying to solve this by configuring an install-file target to also move
the rpm file.  This *almost* works, but for some strange behaviour by the
rpm plugin. - If the version ends with SNAPSHOT it arbitrarily appends a
timestamp to the file, which means I can't find the file to deploy because
it has a random number on the end.  If I use a number, it appends a '-1' on
the end for no reason, and if I use an arbitrary other word -
"<version>1.1-SNACKSHOP</version> then it appends a _1 on the end, as
documented here:
http://mojo.codehaus.org/rpm-maven-plugin/ident-params.html#version
(see the section on arbitrary version endings with no explanation of why)

So we want to develop snapshot RPM files for our dev deployments and use
them on dev environments, and then use release numbered versions for
releases, but with this strange behaviour of adding an arbitrary additional
ending, it doesn't work the same way in all cases.  Can anyone tell me why
that is, or how to disable it?

thanks,

Damon