You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Steve Cohen <sc...@javactivity.org> on 2015/04/06 23:34:41 UTC

Minimum RPM Version for rpm-maven-plugin?

I'm trying to run the rpm plugin on an old solaris box that is running 
rpm v3.0.4, and the plugin complains that it can't find rpmbuild.  IIRC, 
rpmbuild was added to the rpm suite maybe 10 years ago and this is older 
than that.  Is that supported by the plugin and if so, how?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Minimum RPM Version for rpm-maven-plugin?

Posted by Graham Leggett <mi...@sharp.fm>.
On 06 Apr 2015, at 11:34 PM, Steve Cohen <sc...@javactivity.org> wrote:

> I'm trying to run the rpm plugin on an old solaris box that is running rpm v3.0.4, and the plugin complains that it can't find rpmbuild.  IIRC, rpmbuild was added to the rpm suite maybe 10 years ago and this is older than that.  Is that supported by the plugin and if so, how?

The plugin requires rpmbuild in order to function.

Is rpmbuild on the path?

Regards,
Graham
—


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Minimum RPM Version for rpm-maven-plugin?

Posted by Stephen Connolly <st...@gmail.com>.
On Monday, April 13, 2015, Steve Cohen <sc...@javactivity.org> wrote:

> This little bit of trickery works.  Thanks.
>
> It still doesn't feel right.  It relies on the fact that it knows that
> only one .rpm file will exists in the directory where it is built.


So remove all .rpm files before you generate the rpm and then do the move
trick after


>   If that assumption were false, all such files would be successively
> renamed to the desired name, with the result that only the last one would
> exist.  But the assumption in this case is a valid one.
>
> Thanks for pointing it out.
>
> Steve
>
> On 04/09/2015 06:47 PM, Stephen Connolly wrote:
>
>> If you use the move ant task you can take the fileset of possible names
>> that the RPM could have and map them to the name you want to use in the
>> attach task...
>>
>> (and since you will always be moving, you have the added bonus of knowing
>> that its a fresh file as the old ones will always have been moved away)
>>
>> On 9 April 2015 at 21:47, Steve Cohen <sc...@javactivity.org> wrote:
>>
>>  On 04/09/2015 03:04 PM, Stephen Connolly wrote:
>>>
>>>  On Thursday, April 9, 2015, Steve Cohen <sc...@javactivity.org> wrote:
>>>>
>>>>   I think that both of these solutions (Karl's and Stephen's) fall short
>>>>
>>>>> because the redline:rpm ant task does some opaque magic to name the
>>>>> rpm.
>>>>> Therefore it is impossible to specify other than by hardcoding the name
>>>>> of
>>>>> the archive you want to attach and the maven plugins (buildhelper and
>>>>> antrun) aren't flexible enough to accept wildcards.
>>>>>
>>>>>
>>>>
>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

-- 
Sent from my phone

Re: Minimum RPM Version for rpm-maven-plugin?

Posted by Steve Cohen <sc...@javactivity.org>.
This little bit of trickery works.  Thanks.

It still doesn't feel right.  It relies on the fact that it knows that 
only one .rpm file will exists in the directory where it is built.  If 
that assumption were false, all such files would be successively renamed 
to the desired name, with the result that only the last one would exist. 
  But the assumption in this case is a valid one.

Thanks for pointing it out.

Steve

On 04/09/2015 06:47 PM, Stephen Connolly wrote:
> If you use the move ant task you can take the fileset of possible names
> that the RPM could have and map them to the name you want to use in the
> attach task...
>
> (and since you will always be moving, you have the added bonus of knowing
> that its a fresh file as the old ones will always have been moved away)
>
> On 9 April 2015 at 21:47, Steve Cohen <sc...@javactivity.org> wrote:
>
>> On 04/09/2015 03:04 PM, Stephen Connolly wrote:
>>
>>> On Thursday, April 9, 2015, Steve Cohen <sc...@javactivity.org> wrote:
>>>
>>>   I think that both of these solutions (Karl's and Stephen's) fall short
>>>> because the redline:rpm ant task does some opaque magic to name the rpm.
>>>> Therefore it is impossible to specify other than by hardcoding the name
>>>> of
>>>> the archive you want to attach and the maven plugins (buildhelper and
>>>> antrun) aren't flexible enough to accept wildcards.
>>>>
>>>
>>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Minimum RPM Version for rpm-maven-plugin?

Posted by Stephen Connolly <st...@gmail.com>.
If you use the move ant task you can take the fileset of possible names
that the RPM could have and map them to the name you want to use in the
attach task...

(and since you will always be moving, you have the added bonus of knowing
that its a fresh file as the old ones will always have been moved away)

On 9 April 2015 at 21:47, Steve Cohen <sc...@javactivity.org> wrote:

> On 04/09/2015 03:04 PM, Stephen Connolly wrote:
>
>> On Thursday, April 9, 2015, Steve Cohen <sc...@javactivity.org> wrote:
>>
>>  I think that both of these solutions (Karl's and Stephen's) fall short
>>> because the redline:rpm ant task does some opaque magic to name the rpm.
>>> Therefore it is impossible to specify other than by hardcoding the name
>>> of
>>> the archive you want to attach and the maven plugins (buildhelper and
>>> antrun) aren't flexible enough to accept wildcards.
>>>
>>
>>
>> I think you can do some trickery with ant's properties (as they are write
>> once) and use the antrun built in support as a stop-gap
>>
>>
>>  I don't see how.  Looking at the redline source, the ant task never
> knows the name of the file it is building.  The ant task sits atop the
> Builder which puts together the name.  The ant task takes no note of it
> (other than to print it in the log).  Guess this use case was not on the
> top of the author's requirements.  It would be a simple enough change.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Minimum RPM Version for rpm-maven-plugin?

Posted by Steve Cohen <sc...@javactivity.org>.
On 04/09/2015 03:04 PM, Stephen Connolly wrote:
> On Thursday, April 9, 2015, Steve Cohen <sc...@javactivity.org> wrote:
>
>> I think that both of these solutions (Karl's and Stephen's) fall short
>> because the redline:rpm ant task does some opaque magic to name the rpm.
>> Therefore it is impossible to specify other than by hardcoding the name of
>> the archive you want to attach and the maven plugins (buildhelper and
>> antrun) aren't flexible enough to accept wildcards.
>
>
> I think you can do some trickery with ant's properties (as they are write
> once) and use the antrun built in support as a stop-gap
>
>
I don't see how.  Looking at the redline source, the ant task never 
knows the name of the file it is building.  The ant task sits atop the 
Builder which puts together the name.  The ant task takes no note of it 
(other than to print it in the log).  Guess this use case was not on the 
top of the author's requirements.  It would be a simple enough change.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Minimum RPM Version for rpm-maven-plugin?

Posted by Stephen Connolly <st...@gmail.com>.
On Thursday, April 9, 2015, Steve Cohen <sc...@javactivity.org> wrote:

> I think that both of these solutions (Karl's and Stephen's) fall short
> because the redline:rpm ant task does some opaque magic to name the rpm.
> Therefore it is impossible to specify other than by hardcoding the name of
> the archive you want to attach and the maven plugins (buildhelper and
> antrun) aren't flexible enough to accept wildcards.


I think you can do some trickery with ant's properties (as they are write
once) and use the antrun built in support as a stop-gap


>
> See  http://redline-rpm.org/usage.html under Ant where it states:
> "this build script creates a new RPM file named test-1.2.3-1.noarch.rpm".
>
> The "-1" appears to be added to the name by redline-rpm (how you would
> make it something else like -2 isn't stated) as is "noarch" but that isn't
> a problem as noarch can probably be assumed for most java projects.
>
> This would be much better, I think, if the redline rpm logic were released
> as a maven mojo.


I agree, but for now you'll just have to up your ANT foo


>
> Unless I'm missing something ... which I very well could be.
>
> On 04/09/2015 02:13 PM, Stephen Connolly wrote:
>
>> If you are using antrun anyway you might as well just use the ant task it
>> injects to ant to allow attaching artifacts...
>>
>> http://maven.apache.org/plugins/maven-antrun-plugin/
>> tasks/attachArtifact.html
>>
>> On Thursday, April 9, 2015, Karl Heinz Marbaise <kh...@gmx.de>
>> wrote:
>>
>>  Hi Steve,
>>>
>>> simplest solution would be to use buildhelper-maven-plugin to attach the
>>> artifact and it will be deployed to a repository...
>>>
>>> Kind regards
>>> Karl Heinz Marbaise
>>> On 4/9/15 3:57 PM, Steve Cohen wrote:
>>>
>>>  Thanks for this tip, Mark.  It meets the need even though it is a bit
>>>> rough around the edges, the need to involve ant at this point, etc.
>>>> One question I have: is there a way to have the rpm that gets built
>>>> installed into the repo, deployed, etc.  As it stands now, only the
>>>> intermediate archives (jar) are being installed in my setup.
>>>>
>>>> On 04/06/2015 09:16 PM, Mark Derricutt wrote:
>>>>
>>>>  On 7 Apr 2015, at 10:07, Dan Tran wrote:
>>>>>
>>>>>   I can run rpm-m-p at Linux sles 11 and 12,  and rpmbuild executable
>>>>> is
>>>>>
>>>>>> required
>>>>>>
>>>>>>
>>>>> We use redline-rpm ant tasks - pure-jvm RPM implementation.  The
>>>>> forums mention 3-4 people have in the past made 'private' maven
>>>>> plugins, but no ones yet open sources one.
>>>>>
>>>>> http://redline-rpm.org/usage.html
>>>>>
>>>>>
>>>>>
>>>>>  ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

-- 
Sent from my phone

Re: Minimum RPM Version for rpm-maven-plugin?

Posted by Steve Cohen <sc...@javactivity.org>.
I think that both of these solutions (Karl's and Stephen's) fall short 
because the redline:rpm ant task does some opaque magic to name the rpm. 
  Therefore it is impossible to specify other than by hardcoding the 
name of the archive you want to attach and the maven plugins 
(buildhelper and antrun) aren't flexible enough to accept wildcards.

See  http://redline-rpm.org/usage.html under Ant where it states:
"this build script creates a new RPM file named test-1.2.3-1.noarch.rpm".

The "-1" appears to be added to the name by redline-rpm (how you would 
make it something else like -2 isn't stated) as is "noarch" but that 
isn't a problem as noarch can probably be assumed for most java projects.

This would be much better, I think, if the redline rpm logic were 
released as a maven mojo.

Unless I'm missing something ... which I very well could be.

On 04/09/2015 02:13 PM, Stephen Connolly wrote:
> If you are using antrun anyway you might as well just use the ant task it
> injects to ant to allow attaching artifacts...
>
> http://maven.apache.org/plugins/maven-antrun-plugin/tasks/attachArtifact.html
>
> On Thursday, April 9, 2015, Karl Heinz Marbaise <kh...@gmx.de> wrote:
>
>> Hi Steve,
>>
>> simplest solution would be to use buildhelper-maven-plugin to attach the
>> artifact and it will be deployed to a repository...
>>
>> Kind regards
>> Karl Heinz Marbaise
>> On 4/9/15 3:57 PM, Steve Cohen wrote:
>>
>>> Thanks for this tip, Mark.  It meets the need even though it is a bit
>>> rough around the edges, the need to involve ant at this point, etc.
>>> One question I have: is there a way to have the rpm that gets built
>>> installed into the repo, deployed, etc.  As it stands now, only the
>>> intermediate archives (jar) are being installed in my setup.
>>>
>>> On 04/06/2015 09:16 PM, Mark Derricutt wrote:
>>>
>>>> On 7 Apr 2015, at 10:07, Dan Tran wrote:
>>>>
>>>>   I can run rpm-m-p at Linux sles 11 and 12,  and rpmbuild executable is
>>>>> required
>>>>>
>>>>
>>>> We use redline-rpm ant tasks - pure-jvm RPM implementation.  The
>>>> forums mention 3-4 people have in the past made 'private' maven
>>>> plugins, but no ones yet open sources one.
>>>>
>>>> http://redline-rpm.org/usage.html
>>>>
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Minimum RPM Version for rpm-maven-plugin?

Posted by Stephen Connolly <st...@gmail.com>.
If you are using antrun anyway you might as well just use the ant task it
injects to ant to allow attaching artifacts...

http://maven.apache.org/plugins/maven-antrun-plugin/tasks/attachArtifact.html

On Thursday, April 9, 2015, Karl Heinz Marbaise <kh...@gmx.de> wrote:

> Hi Steve,
>
> simplest solution would be to use buildhelper-maven-plugin to attach the
> artifact and it will be deployed to a repository...
>
> Kind regards
> Karl Heinz Marbaise
> On 4/9/15 3:57 PM, Steve Cohen wrote:
>
>> Thanks for this tip, Mark.  It meets the need even though it is a bit
>> rough around the edges, the need to involve ant at this point, etc.
>> One question I have: is there a way to have the rpm that gets built
>> installed into the repo, deployed, etc.  As it stands now, only the
>> intermediate archives (jar) are being installed in my setup.
>>
>> On 04/06/2015 09:16 PM, Mark Derricutt wrote:
>>
>>> On 7 Apr 2015, at 10:07, Dan Tran wrote:
>>>
>>>  I can run rpm-m-p at Linux sles 11 and 12,  and rpmbuild executable is
>>>> required
>>>>
>>>
>>> We use redline-rpm ant tasks - pure-jvm RPM implementation.  The
>>> forums mention 3-4 people have in the past made 'private' maven
>>> plugins, but no ones yet open sources one.
>>>
>>> http://redline-rpm.org/usage.html
>>>
>>>
>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

-- 
Sent from my phone

Re: Minimum RPM Version for rpm-maven-plugin?

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi Steve,

simplest solution would be to use buildhelper-maven-plugin to attach the 
artifact and it will be deployed to a repository...

Kind regards
Karl Heinz Marbaise
On 4/9/15 3:57 PM, Steve Cohen wrote:
> Thanks for this tip, Mark.  It meets the need even though it is a bit
> rough around the edges, the need to involve ant at this point, etc.
> One question I have: is there a way to have the rpm that gets built
> installed into the repo, deployed, etc.  As it stands now, only the
> intermediate archives (jar) are being installed in my setup.
>
> On 04/06/2015 09:16 PM, Mark Derricutt wrote:
>> On 7 Apr 2015, at 10:07, Dan Tran wrote:
>>
>>> I can run rpm-m-p at Linux sles 11 and 12,  and rpmbuild executable is
>>> required
>>
>> We use redline-rpm ant tasks - pure-jvm RPM implementation.  The
>> forums mention 3-4 people have in the past made 'private' maven
>> plugins, but no ones yet open sources one.
>>
>> http://redline-rpm.org/usage.html
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Minimum RPM Version for rpm-maven-plugin?

Posted by Mark Derricutt <ma...@talios.com>.
On 10 Apr 2015, at 1:57, Steve Cohen wrote:

> Thanks for this tip, Mark.  It meets the need even though it is a bit rough around the edges, the need to involve ant at this point, etc.
> One question I have: is there a way to have the rpm that gets built installed into the repo, deployed, etc.  As it stands now, only the intermediate archives (jar) are being installed in my setup.

Currently I use the build-helper plugin to attach the generated RPMs as artifacts.


-- 
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt

Re: Minimum RPM Version for rpm-maven-plugin?

Posted by Steve Cohen <sc...@javactivity.org>.
Thanks for this tip, Mark.  It meets the need even though it is a bit 
rough around the edges, the need to involve ant at this point, etc.
One question I have: is there a way to have the rpm that gets built 
installed into the repo, deployed, etc.  As it stands now, only the 
intermediate archives (jar) are being installed in my setup.

On 04/06/2015 09:16 PM, Mark Derricutt wrote:
> On 7 Apr 2015, at 10:07, Dan Tran wrote:
>
>> I can run rpm-m-p at Linux sles 11 and 12,  and rpmbuild executable is
>> required
>
> We use redline-rpm ant tasks - pure-jvm RPM implementation.  The forums mention 3-4 people have in the past made 'private' maven plugins, but no ones yet open sources one.
>
> http://redline-rpm.org/usage.html
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Minimum RPM Version for rpm-maven-plugin?

Posted by Mark Derricutt <ma...@talios.com>.
On 7 Apr 2015, at 10:07, Dan Tran wrote:

> I can run rpm-m-p at Linux sles 11 and 12,  and rpmbuild executable is
> required

We use redline-rpm ant tasks - pure-jvm RPM implementation.  The forums mention 3-4 people have in the past made 'private' maven plugins, but no ones yet open sources one.

http://redline-rpm.org/usage.html


-- 
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt

Re: Minimum RPM Version for rpm-maven-plugin?

Posted by Dan Tran <da...@gmail.com>.
I can run rpm-m-p at Linux sles 11 and 12,  and rpmbuild executable is
required

-Dan

On Mon, Apr 6, 2015 at 2:34 PM, Steve Cohen <sc...@javactivity.org> wrote:

> I'm trying to run the rpm plugin on an old solaris box that is running rpm
> v3.0.4, and the plugin complains that it can't find rpmbuild.  IIRC,
> rpmbuild was added to the rpm suite maybe 10 years ago and this is older
> than that.  Is that supported by the plugin and if so, how?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>