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/12/07 19:44:08 UTC

[rpm-maven-plugin] how to control the name under which rpm is stored in m2 repository?

Our organization has a convention for naming rpms. Typically, the rpm 
will have a shorter base name than the Maven project. There is also a 
convention around how releases are named. So we want a name 
like|${shortname}-${project.version}-${release}.noarch.rpm|.

I want to build such rpms using the rpm-maven-plugin rather than older 
nmake technology.

And this is easily accomplished using the plugin's parameters. The rpm 
generated in the target directory has the desired name.

However, when|mvn install|installs this rpm into the maven repository, 
it insists on storing it the "maven 
way":|${project.artifactId}-${project.version}.rpm|

I want the rpm stored in the standard maven repository directory using 
the name that is initially created on package.

I also tried using the maven-install-plugin (install-file goal) and did 
not get the results I was after.

How may I accomplish this?


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


Re: [rpm-maven-plugin] how to control the name under which rpm is stored in m2 repository?

Posted by Graham Leggett <mi...@sharp.fm>.
On 07 Dec 2015, at 8:44 PM, Steve Cohen <sc...@javactivity.org> wrote:

> Our organization has a convention for naming rpms. Typically, the rpm will have a shorter base name than the Maven project. There is also a convention around how releases are named. So we want a name like|${shortname}-${project.version}-${release}.noarch.rpm|.
> 
> I want to build such rpms using the rpm-maven-plugin rather than older nmake technology.
> 
> And this is easily accomplished using the plugin's parameters. The rpm generated in the target directory has the desired name.
> 
> However, when|mvn install|installs this rpm into the maven repository, it insists on storing it the "maven way":|${project.artifactId}-${project.version}.rpm|
> 
> I want the rpm stored in the standard maven repository directory using the name that is initially created on package.
> 
> I also tried using the maven-install-plugin (install-file goal) and did not get the results I was after.
> 
> How may I accomplish this?

You don’t change the name of a maven artefact, maven depends on this format and you break maven if you try and change it.

Turns out yum is also very particular about naming formats, and is different to maven. What we’ve done to solve this is to create hard links from the entry in the maven repo to the entry in the yum repo, introspecting the RPM to work out what the name should be, like this:

        RPMDIST=`/bin/rpm -q --qf "%{DISTRIBUTION}\n" -p "${FILE}" | tr -cd [:alnum:]`
        RPMPATH=${YUMPATH}/${REPO}/${RPMDIST}/`/bin/rpm -q --qf "%{ARCH}\n" -p "${FILE}"`
        RPMFILE=${RPMPATH}/`/bin/rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{DISTRIBUTION}.%{ARCH}.rpm\n' -p "${FILE}”`

To be even more specific, we do this automatically when artefacts are published to our webdav server. We hang the following 
script off Apache httpd’s reiiable piped logging feature which auto-processes the file as soon as an upload is complete:

  # reindex the yum repo on rpm PUT
  CustomLog "|/usr/sbin/reindex-yum-filter-repo-greenhouse /var/lib/httpd-repo-greenhouse/web-docs/maven2 /var/lib/httpd-repo-greenhouse/web-docs/yum" "%m %f"

Script is as follows:

#!/bin/bash

# Filter logfile lines from httpd-dev
#
# We are only interested in PUT requests, and we only consider the filename
# resolved by httpd, so we don't use any untainted input in this script.
#
# We extract the DISTRIBUTION (example: el6) and ARCH (example: x86_64, noarch)
# fields to determine the yum repo to link the RPM to.

MAVENPATH="$1"
YUMPATH="$2"
LOCK="/tmp/$0.lock"

trap "rm -f ${LOCK}" EXIT

while read LINE
do
  if [ "x${LINE:0:4}" == "xPUT " ]; then
    FILE=`/usr/bin/readlink -f "${LINE:4}"`
    if [[ "${FILE}" =~ ^${MAVENPATH}/.*[.]rpm$ ]]; then
      if [[ "${FILE}" =~ SNAPSHOT ]]; then
        RPMREPO="snapshot"
      else
        RPMREPO="master greenhouse"
      fi
      touch "${LOCK}"
      for REPO in ${RPMREPO}; do
        RPMDIST=`/bin/rpm -q --qf "%{DISTRIBUTION}\n" -p "${FILE}" | tr -cd [:alnum:]`
        RPMPATH=${YUMPATH}/${REPO}/${RPMDIST}/`/bin/rpm -q --qf "%{ARCH}\n" -p "${FILE}"`
        RPMFILE=${RPMPATH}/`/bin/rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{DISTRIBUTION}.%{ARCH}.rpm\n' -p "${FILE}"`
        if [ ! -f "${RPMFILE}" ]; then
          /bin/rpm -q --quiet -p "${FILE}" && \
          /bin/mkdir -p "${RPMPATH}" && \
          /bin/ln "${FILE}" "${RPMFILE}" && \
          /usr/bin/createrepo -q --update --checkts "${YUMPATH}/${REPO}/${RPMDIST}"
        fi
      done
      rm -f "${LOCK}"
    fi
  fi
done

Regards,
Graham
—


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


Re: [rpm-maven-plugin] how to control the name under which rpm is stored in m2 repository?

Posted by Dan Tran <da...@gmail.com>.
@Sverre

It looks correct since your maven artifactId is my-gui and your classifier
is jws.

-D

On Mon, Dec 14, 2015 at 4:23 AM, Sverre Moe <sv...@gmail.com> wrote:

> I am using rpm-maven-plugin-2.1.4, and I can confirm that it is no
> longer adding a trailing rpm if there is no classifier. I did not
> notice that change.
>
> The rpm-maven-plugin creates the rpm using the correct rpm naming
> convention, but it looks like it is install/deploy plugin that renames
> the file
> [INFO] Installing
>
> /home/user/workspace/my-gui/target/rpm/my-gui-jws-jws/RPMS/noarch/my-gui-jws-1.1.0-SNAPSHOT20151214120611.noarch.rpm
> to
> /home/user/.m2/repository/com/company/my-gui/1.1.0-SNAPSHOT/my-gui-1.1.0-SNAPSHOT-jws.rpm
>
> 2015-12-10 5:03 GMT+01:00 Dan Tran <da...@gmail.com>:
> >
> https://github.com/mojohaus/rpm-maven-plugin/commit/d61194c43d9884409db6e55ca5aef02cf7e55830
> >
> > On Wed, Dec 9, 2015 at 7:58 PM, Dan Tran <da...@gmail.com> wrote:
> >
> >> @Sverre Moe, i think the extra 'rpm' as classifier has been fixed.  What
> >> version of rpm-m-p are you using?
> >>
> >> -Dan
> >>
> >> On Tue, Dec 8, 2015 at 1:29 PM, Dan Tran <da...@gmail.com> wrote:
> >>
> >>> I think we may be able to remove the extra 'rpm' classifier
> >>>
> >>> -D
> >>>
> >>> On Tue, Dec 8, 2015 at 8:34 AM, Sverre Moe <sv...@gmail.com>
> wrote:
> >>>
> >>>> I have a similar problem with RPM archiving with our Nexus Maven
> >>>> Repository. I understand the reason for going the maven way for
> >>>> naming, but when we want to use Nexus as our Yum repository manager it
> >>>> should at least support naming the yum way.
> >>>>
> >>>> When I have several packages for one project, then maven rearranges
> >>>> the classifier to the end of the file and when there is no classifier
> >>>> it appends rpm to the end of the file name.
> >>>> ${project.artifactId}-${project-version}.noarch.rpm =>
> >>>> ${project.artifactId}-${project-version}.noarch-rpm.rpm
> >>>> ${project.artifactId}-devel-${project-version}.noarch.rpm =>
> >>>> ${project.artifactId}-${project-version}.noarch-devel.rpm
> >>>> ${project.artifactId}-jws-${project-version}.noarch.rpm =>
> >>>> ${project.artifactId}-${project-version}.noarch-jws.rpm
> >>>>
> >>>> I want to use Nexus as our RPM yum repository manager, but because of
> >>>> this renaming of the RPM artefacts I am reluctant. I would have gone
> >>>> for Artefactory if it didn't cost money for the RPM feature.
> >>>>
> >>>> 2015-12-07 22:05 GMT+01:00 Steve Cohen <sc...@javactivity.org>:
> >>>> > Aargh!  Email formattting!
> >>>> > <plugin>
> >>>> >   <groupId>org.apache.maven.plugins</groupId>
> >>>> >   <artifactId>maven-install-plugin</artifactId>
> >>>> >   <version>2.5.2</version>
> >>>> >   <executions>
> >>>> >     <execution>
> >>>> >       <id>install-rpm</id>
> >>>> >       <goals>
> >>>> >         <goal>install-file</goal>
> >>>> >       </goals>
> >>>> >       <phase>install</phase>
> >>>> >       <configuration>
> >>>> >
> >>>> > <file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${
> >>>> rpm.name}-${project.version}-${rpm.release}.noarch.rpm</file>
> >>>> >         <groupId>${project.groupId}</groupId>
> >>>> >         <artifactId>${rpm.name}</artifactId>
> >>>> >         <version>${project.version}-${rpm.release}</version>
> >>>> >         <classifier>noarch</classifier>
> >>>> >         <packaging>rpm</packaging>
> >>>> >       </configuration>
> >>>> >     </execution>
> >>>> >   </executions>
> >>>> > </plugin>
> >>>> >
> >>>> >
> >>>> >
> >>>> > On 12/07/2015 02:55 PM, Steve Cohen wrote:
> >>>> >>
> >>>> >> Actually, I found a way.  If I am willing to let my "short name"
> >>>> become
> >>>> >> the archiveId, (and thus live with the rpms in a different
> location),
> >>>> >> the following is possible with the maven-install-plugin, after
> >>>> packaging
> >>>> >> with the rpm-maven-plugin:
> >>>> >>
> >>>> >> <plugin>
> >>>> >>
> >>>> >> <groupId>org.apache.maven.plugins</groupId>
> >>>> >>
> >>>> >> <artifactId>maven-install-plugin</artifactId>
> >>>> >>
> >>>> >> <version>2.5.2</version>
> >>>> >>
> >>>> >>                  <executions>
> >>>> >>
> >>>> >> <execution>
> >>>> >>
> >>>> >>                                  <id>install-rpm</id>
> >>>> >>
> >>>> >>                                  <goals>
> >>>> >>
> >>>> >> <goal>install-file</goal>
> >>>> >>
> >>>> >>                                  </goals>
> >>>> >>
> >>>> >> <phase>install</phase>
> >>>> >>
> >>>> >>                  <configuration>
> >>>> >>
> >>>> >>
> >>>> >> <file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${
> >>>> rpm.name}-${project.version}-${rpm.release}.noarch.rpm</file>
> >>>> >>
> >>>> >>
> >>>> >> <groupId>${project.groupId}</groupId>
> >>>> >>
> >>>> >> <artifactId>${rpm.name}</artifactId>
> >>>> >>
> >>>> >> <version>${project.version}-${rpm.release}</version>
> >>>> >>
> >>>> >> <classifier>noarch</classifier>
> >>>> >>
> >>>> >> <packaging>rpm</packaging>
> >>>> >>
> >>>> >>                  </configuration>
> >>>> >>
> >>>> >> </execution>
> >>>> >>
> >>>> >>                  </executions>
> >>>> >>
> >>>> >> </plugin>
> >>>> >>
> >>>> >>
> >>>> >> On 12/07/2015 01:54 PM, Karl Heinz Marbaise wrote:
> >>>> >>>
> >>>> >>> Hi Steve,
> >>>> >>>
> >>>> >>> simply answer to this: It is not possible...
> >>>> >>>
> >>>> >>> Long answer: Maven repositories dependending on an appropriate
> naming
> >>>> >>> schema to find artifacts / versions etc. If you change that the
> whole
> >>>> >>> system will not work at all..
> >>>> >>>
> >>>> >>> So the name which is stored within a maven repository can't be
> >>>> changed.
> >>>> >>>
> >>>> >>> Kind regards
> >>>> >>> Karl Heinz Marbaise
> >>>> >>>
> >>>> >>> On 12/7/15 7:44 PM, Steve Cohen wrote:
> >>>> >>>>
> >>>> >>>> Our organization has a convention for naming rpms. Typically, the
> >>>> rpm
> >>>> >>>> will have a shorter base name than the Maven project. There is
> also
> >>>> a
> >>>> >>>> convention around how releases are named. So we want a name
> >>>> >>>> like|${shortname}-${project.version}-${release}.noarch.rpm|.
> >>>> >>>>
> >>>> >>>> I want to build such rpms using the rpm-maven-plugin rather than
> >>>> older
> >>>> >>>> nmake technology.
> >>>> >>>>
> >>>> >>>> And this is easily accomplished using the plugin's parameters.
> The
> >>>> rpm
> >>>> >>>> generated in the target directory has the desired name.
> >>>> >>>>
> >>>> >>>> However, when|mvn install|installs this rpm into the maven
> >>>> repository,
> >>>> >>>> it insists on storing it the "maven
> >>>> >>>> way":|${project.artifactId}-${project.version}.rpm|
> >>>> >>>>
> >>>> >>>> I want the rpm stored in the standard maven repository directory
> >>>> using
> >>>> >>>> the name that is initially created on package.
> >>>> >>>>
> >>>> >>>> I also tried using the maven-install-plugin (install-file goal)
> and
> >>>> did
> >>>> >>>> not get the results I was after.
> >>>> >>>>
> >>>> >>>> How may I accomplish this?
> >>>> >>>>
> >>>> >>>
> >>>> >>>
> ---------------------------------------------------------------------
> >>>> >>> 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
> >>>> >
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> 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: [rpm-maven-plugin] how to control the name under which rpm is stored in m2 repository?

Posted by Sverre Moe <sv...@gmail.com>.
I am using rpm-maven-plugin-2.1.4, and I can confirm that it is no
longer adding a trailing rpm if there is no classifier. I did not
notice that change.

The rpm-maven-plugin creates the rpm using the correct rpm naming
convention, but it looks like it is install/deploy plugin that renames
the file
[INFO] Installing
/home/user/workspace/my-gui/target/rpm/my-gui-jws-jws/RPMS/noarch/my-gui-jws-1.1.0-SNAPSHOT20151214120611.noarch.rpm
to /home/user/.m2/repository/com/company/my-gui/1.1.0-SNAPSHOT/my-gui-1.1.0-SNAPSHOT-jws.rpm

2015-12-10 5:03 GMT+01:00 Dan Tran <da...@gmail.com>:
> https://github.com/mojohaus/rpm-maven-plugin/commit/d61194c43d9884409db6e55ca5aef02cf7e55830
>
> On Wed, Dec 9, 2015 at 7:58 PM, Dan Tran <da...@gmail.com> wrote:
>
>> @Sverre Moe, i think the extra 'rpm' as classifier has been fixed.  What
>> version of rpm-m-p are you using?
>>
>> -Dan
>>
>> On Tue, Dec 8, 2015 at 1:29 PM, Dan Tran <da...@gmail.com> wrote:
>>
>>> I think we may be able to remove the extra 'rpm' classifier
>>>
>>> -D
>>>
>>> On Tue, Dec 8, 2015 at 8:34 AM, Sverre Moe <sv...@gmail.com> wrote:
>>>
>>>> I have a similar problem with RPM archiving with our Nexus Maven
>>>> Repository. I understand the reason for going the maven way for
>>>> naming, but when we want to use Nexus as our Yum repository manager it
>>>> should at least support naming the yum way.
>>>>
>>>> When I have several packages for one project, then maven rearranges
>>>> the classifier to the end of the file and when there is no classifier
>>>> it appends rpm to the end of the file name.
>>>> ${project.artifactId}-${project-version}.noarch.rpm =>
>>>> ${project.artifactId}-${project-version}.noarch-rpm.rpm
>>>> ${project.artifactId}-devel-${project-version}.noarch.rpm =>
>>>> ${project.artifactId}-${project-version}.noarch-devel.rpm
>>>> ${project.artifactId}-jws-${project-version}.noarch.rpm =>
>>>> ${project.artifactId}-${project-version}.noarch-jws.rpm
>>>>
>>>> I want to use Nexus as our RPM yum repository manager, but because of
>>>> this renaming of the RPM artefacts I am reluctant. I would have gone
>>>> for Artefactory if it didn't cost money for the RPM feature.
>>>>
>>>> 2015-12-07 22:05 GMT+01:00 Steve Cohen <sc...@javactivity.org>:
>>>> > Aargh!  Email formattting!
>>>> > <plugin>
>>>> >   <groupId>org.apache.maven.plugins</groupId>
>>>> >   <artifactId>maven-install-plugin</artifactId>
>>>> >   <version>2.5.2</version>
>>>> >   <executions>
>>>> >     <execution>
>>>> >       <id>install-rpm</id>
>>>> >       <goals>
>>>> >         <goal>install-file</goal>
>>>> >       </goals>
>>>> >       <phase>install</phase>
>>>> >       <configuration>
>>>> >
>>>> > <file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${
>>>> rpm.name}-${project.version}-${rpm.release}.noarch.rpm</file>
>>>> >         <groupId>${project.groupId}</groupId>
>>>> >         <artifactId>${rpm.name}</artifactId>
>>>> >         <version>${project.version}-${rpm.release}</version>
>>>> >         <classifier>noarch</classifier>
>>>> >         <packaging>rpm</packaging>
>>>> >       </configuration>
>>>> >     </execution>
>>>> >   </executions>
>>>> > </plugin>
>>>> >
>>>> >
>>>> >
>>>> > On 12/07/2015 02:55 PM, Steve Cohen wrote:
>>>> >>
>>>> >> Actually, I found a way.  If I am willing to let my "short name"
>>>> become
>>>> >> the archiveId, (and thus live with the rpms in a different location),
>>>> >> the following is possible with the maven-install-plugin, after
>>>> packaging
>>>> >> with the rpm-maven-plugin:
>>>> >>
>>>> >> <plugin>
>>>> >>
>>>> >> <groupId>org.apache.maven.plugins</groupId>
>>>> >>
>>>> >> <artifactId>maven-install-plugin</artifactId>
>>>> >>
>>>> >> <version>2.5.2</version>
>>>> >>
>>>> >>                  <executions>
>>>> >>
>>>> >> <execution>
>>>> >>
>>>> >>                                  <id>install-rpm</id>
>>>> >>
>>>> >>                                  <goals>
>>>> >>
>>>> >> <goal>install-file</goal>
>>>> >>
>>>> >>                                  </goals>
>>>> >>
>>>> >> <phase>install</phase>
>>>> >>
>>>> >>                  <configuration>
>>>> >>
>>>> >>
>>>> >> <file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${
>>>> rpm.name}-${project.version}-${rpm.release}.noarch.rpm</file>
>>>> >>
>>>> >>
>>>> >> <groupId>${project.groupId}</groupId>
>>>> >>
>>>> >> <artifactId>${rpm.name}</artifactId>
>>>> >>
>>>> >> <version>${project.version}-${rpm.release}</version>
>>>> >>
>>>> >> <classifier>noarch</classifier>
>>>> >>
>>>> >> <packaging>rpm</packaging>
>>>> >>
>>>> >>                  </configuration>
>>>> >>
>>>> >> </execution>
>>>> >>
>>>> >>                  </executions>
>>>> >>
>>>> >> </plugin>
>>>> >>
>>>> >>
>>>> >> On 12/07/2015 01:54 PM, Karl Heinz Marbaise wrote:
>>>> >>>
>>>> >>> Hi Steve,
>>>> >>>
>>>> >>> simply answer to this: It is not possible...
>>>> >>>
>>>> >>> Long answer: Maven repositories dependending on an appropriate naming
>>>> >>> schema to find artifacts / versions etc. If you change that the whole
>>>> >>> system will not work at all..
>>>> >>>
>>>> >>> So the name which is stored within a maven repository can't be
>>>> changed.
>>>> >>>
>>>> >>> Kind regards
>>>> >>> Karl Heinz Marbaise
>>>> >>>
>>>> >>> On 12/7/15 7:44 PM, Steve Cohen wrote:
>>>> >>>>
>>>> >>>> Our organization has a convention for naming rpms. Typically, the
>>>> rpm
>>>> >>>> will have a shorter base name than the Maven project. There is also
>>>> a
>>>> >>>> convention around how releases are named. So we want a name
>>>> >>>> like|${shortname}-${project.version}-${release}.noarch.rpm|.
>>>> >>>>
>>>> >>>> I want to build such rpms using the rpm-maven-plugin rather than
>>>> older
>>>> >>>> nmake technology.
>>>> >>>>
>>>> >>>> And this is easily accomplished using the plugin's parameters. The
>>>> rpm
>>>> >>>> generated in the target directory has the desired name.
>>>> >>>>
>>>> >>>> However, when|mvn install|installs this rpm into the maven
>>>> repository,
>>>> >>>> it insists on storing it the "maven
>>>> >>>> way":|${project.artifactId}-${project.version}.rpm|
>>>> >>>>
>>>> >>>> I want the rpm stored in the standard maven repository directory
>>>> using
>>>> >>>> the name that is initially created on package.
>>>> >>>>
>>>> >>>> I also tried using the maven-install-plugin (install-file goal) and
>>>> did
>>>> >>>> not get the results I was after.
>>>> >>>>
>>>> >>>> How may I accomplish this?
>>>> >>>>
>>>> >>>
>>>> >>> ---------------------------------------------------------------------
>>>> >>> 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
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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: [rpm-maven-plugin] how to control the name under which rpm is stored in m2 repository?

Posted by Dan Tran <da...@gmail.com>.
https://github.com/mojohaus/rpm-maven-plugin/commit/d61194c43d9884409db6e55ca5aef02cf7e55830

On Wed, Dec 9, 2015 at 7:58 PM, Dan Tran <da...@gmail.com> wrote:

> @Sverre Moe, i think the extra 'rpm' as classifier has been fixed.  What
> version of rpm-m-p are you using?
>
> -Dan
>
> On Tue, Dec 8, 2015 at 1:29 PM, Dan Tran <da...@gmail.com> wrote:
>
>> I think we may be able to remove the extra 'rpm' classifier
>>
>> -D
>>
>> On Tue, Dec 8, 2015 at 8:34 AM, Sverre Moe <sv...@gmail.com> wrote:
>>
>>> I have a similar problem with RPM archiving with our Nexus Maven
>>> Repository. I understand the reason for going the maven way for
>>> naming, but when we want to use Nexus as our Yum repository manager it
>>> should at least support naming the yum way.
>>>
>>> When I have several packages for one project, then maven rearranges
>>> the classifier to the end of the file and when there is no classifier
>>> it appends rpm to the end of the file name.
>>> ${project.artifactId}-${project-version}.noarch.rpm =>
>>> ${project.artifactId}-${project-version}.noarch-rpm.rpm
>>> ${project.artifactId}-devel-${project-version}.noarch.rpm =>
>>> ${project.artifactId}-${project-version}.noarch-devel.rpm
>>> ${project.artifactId}-jws-${project-version}.noarch.rpm =>
>>> ${project.artifactId}-${project-version}.noarch-jws.rpm
>>>
>>> I want to use Nexus as our RPM yum repository manager, but because of
>>> this renaming of the RPM artefacts I am reluctant. I would have gone
>>> for Artefactory if it didn't cost money for the RPM feature.
>>>
>>> 2015-12-07 22:05 GMT+01:00 Steve Cohen <sc...@javactivity.org>:
>>> > Aargh!  Email formattting!
>>> > <plugin>
>>> >   <groupId>org.apache.maven.plugins</groupId>
>>> >   <artifactId>maven-install-plugin</artifactId>
>>> >   <version>2.5.2</version>
>>> >   <executions>
>>> >     <execution>
>>> >       <id>install-rpm</id>
>>> >       <goals>
>>> >         <goal>install-file</goal>
>>> >       </goals>
>>> >       <phase>install</phase>
>>> >       <configuration>
>>> >
>>> > <file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${
>>> rpm.name}-${project.version}-${rpm.release}.noarch.rpm</file>
>>> >         <groupId>${project.groupId}</groupId>
>>> >         <artifactId>${rpm.name}</artifactId>
>>> >         <version>${project.version}-${rpm.release}</version>
>>> >         <classifier>noarch</classifier>
>>> >         <packaging>rpm</packaging>
>>> >       </configuration>
>>> >     </execution>
>>> >   </executions>
>>> > </plugin>
>>> >
>>> >
>>> >
>>> > On 12/07/2015 02:55 PM, Steve Cohen wrote:
>>> >>
>>> >> Actually, I found a way.  If I am willing to let my "short name"
>>> become
>>> >> the archiveId, (and thus live with the rpms in a different location),
>>> >> the following is possible with the maven-install-plugin, after
>>> packaging
>>> >> with the rpm-maven-plugin:
>>> >>
>>> >> <plugin>
>>> >>
>>> >> <groupId>org.apache.maven.plugins</groupId>
>>> >>
>>> >> <artifactId>maven-install-plugin</artifactId>
>>> >>
>>> >> <version>2.5.2</version>
>>> >>
>>> >>                  <executions>
>>> >>
>>> >> <execution>
>>> >>
>>> >>                                  <id>install-rpm</id>
>>> >>
>>> >>                                  <goals>
>>> >>
>>> >> <goal>install-file</goal>
>>> >>
>>> >>                                  </goals>
>>> >>
>>> >> <phase>install</phase>
>>> >>
>>> >>                  <configuration>
>>> >>
>>> >>
>>> >> <file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${
>>> rpm.name}-${project.version}-${rpm.release}.noarch.rpm</file>
>>> >>
>>> >>
>>> >> <groupId>${project.groupId}</groupId>
>>> >>
>>> >> <artifactId>${rpm.name}</artifactId>
>>> >>
>>> >> <version>${project.version}-${rpm.release}</version>
>>> >>
>>> >> <classifier>noarch</classifier>
>>> >>
>>> >> <packaging>rpm</packaging>
>>> >>
>>> >>                  </configuration>
>>> >>
>>> >> </execution>
>>> >>
>>> >>                  </executions>
>>> >>
>>> >> </plugin>
>>> >>
>>> >>
>>> >> On 12/07/2015 01:54 PM, Karl Heinz Marbaise wrote:
>>> >>>
>>> >>> Hi Steve,
>>> >>>
>>> >>> simply answer to this: It is not possible...
>>> >>>
>>> >>> Long answer: Maven repositories dependending on an appropriate naming
>>> >>> schema to find artifacts / versions etc. If you change that the whole
>>> >>> system will not work at all..
>>> >>>
>>> >>> So the name which is stored within a maven repository can't be
>>> changed.
>>> >>>
>>> >>> Kind regards
>>> >>> Karl Heinz Marbaise
>>> >>>
>>> >>> On 12/7/15 7:44 PM, Steve Cohen wrote:
>>> >>>>
>>> >>>> Our organization has a convention for naming rpms. Typically, the
>>> rpm
>>> >>>> will have a shorter base name than the Maven project. There is also
>>> a
>>> >>>> convention around how releases are named. So we want a name
>>> >>>> like|${shortname}-${project.version}-${release}.noarch.rpm|.
>>> >>>>
>>> >>>> I want to build such rpms using the rpm-maven-plugin rather than
>>> older
>>> >>>> nmake technology.
>>> >>>>
>>> >>>> And this is easily accomplished using the plugin's parameters. The
>>> rpm
>>> >>>> generated in the target directory has the desired name.
>>> >>>>
>>> >>>> However, when|mvn install|installs this rpm into the maven
>>> repository,
>>> >>>> it insists on storing it the "maven
>>> >>>> way":|${project.artifactId}-${project.version}.rpm|
>>> >>>>
>>> >>>> I want the rpm stored in the standard maven repository directory
>>> using
>>> >>>> the name that is initially created on package.
>>> >>>>
>>> >>>> I also tried using the maven-install-plugin (install-file goal) and
>>> did
>>> >>>> not get the results I was after.
>>> >>>>
>>> >>>> How may I accomplish this?
>>> >>>>
>>> >>>
>>> >>> ---------------------------------------------------------------------
>>> >>> 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
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>

Re: [rpm-maven-plugin] how to control the name under which rpm is stored in m2 repository?

Posted by Dan Tran <da...@gmail.com>.
@Sverre Moe, i think the extra 'rpm' as classifier has been fixed.  What
version of rpm-m-p are you using?

-Dan

On Tue, Dec 8, 2015 at 1:29 PM, Dan Tran <da...@gmail.com> wrote:

> I think we may be able to remove the extra 'rpm' classifier
>
> -D
>
> On Tue, Dec 8, 2015 at 8:34 AM, Sverre Moe <sv...@gmail.com> wrote:
>
>> I have a similar problem with RPM archiving with our Nexus Maven
>> Repository. I understand the reason for going the maven way for
>> naming, but when we want to use Nexus as our Yum repository manager it
>> should at least support naming the yum way.
>>
>> When I have several packages for one project, then maven rearranges
>> the classifier to the end of the file and when there is no classifier
>> it appends rpm to the end of the file name.
>> ${project.artifactId}-${project-version}.noarch.rpm =>
>> ${project.artifactId}-${project-version}.noarch-rpm.rpm
>> ${project.artifactId}-devel-${project-version}.noarch.rpm =>
>> ${project.artifactId}-${project-version}.noarch-devel.rpm
>> ${project.artifactId}-jws-${project-version}.noarch.rpm =>
>> ${project.artifactId}-${project-version}.noarch-jws.rpm
>>
>> I want to use Nexus as our RPM yum repository manager, but because of
>> this renaming of the RPM artefacts I am reluctant. I would have gone
>> for Artefactory if it didn't cost money for the RPM feature.
>>
>> 2015-12-07 22:05 GMT+01:00 Steve Cohen <sc...@javactivity.org>:
>> > Aargh!  Email formattting!
>> > <plugin>
>> >   <groupId>org.apache.maven.plugins</groupId>
>> >   <artifactId>maven-install-plugin</artifactId>
>> >   <version>2.5.2</version>
>> >   <executions>
>> >     <execution>
>> >       <id>install-rpm</id>
>> >       <goals>
>> >         <goal>install-file</goal>
>> >       </goals>
>> >       <phase>install</phase>
>> >       <configuration>
>> >
>> > <file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${rpm.name
>> }-${project.version}-${rpm.release}.noarch.rpm</file>
>> >         <groupId>${project.groupId}</groupId>
>> >         <artifactId>${rpm.name}</artifactId>
>> >         <version>${project.version}-${rpm.release}</version>
>> >         <classifier>noarch</classifier>
>> >         <packaging>rpm</packaging>
>> >       </configuration>
>> >     </execution>
>> >   </executions>
>> > </plugin>
>> >
>> >
>> >
>> > On 12/07/2015 02:55 PM, Steve Cohen wrote:
>> >>
>> >> Actually, I found a way.  If I am willing to let my "short name" become
>> >> the archiveId, (and thus live with the rpms in a different location),
>> >> the following is possible with the maven-install-plugin, after
>> packaging
>> >> with the rpm-maven-plugin:
>> >>
>> >> <plugin>
>> >>
>> >> <groupId>org.apache.maven.plugins</groupId>
>> >>
>> >> <artifactId>maven-install-plugin</artifactId>
>> >>
>> >> <version>2.5.2</version>
>> >>
>> >>                  <executions>
>> >>
>> >> <execution>
>> >>
>> >>                                  <id>install-rpm</id>
>> >>
>> >>                                  <goals>
>> >>
>> >> <goal>install-file</goal>
>> >>
>> >>                                  </goals>
>> >>
>> >> <phase>install</phase>
>> >>
>> >>                  <configuration>
>> >>
>> >>
>> >> <file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${
>> rpm.name}-${project.version}-${rpm.release}.noarch.rpm</file>
>> >>
>> >>
>> >> <groupId>${project.groupId}</groupId>
>> >>
>> >> <artifactId>${rpm.name}</artifactId>
>> >>
>> >> <version>${project.version}-${rpm.release}</version>
>> >>
>> >> <classifier>noarch</classifier>
>> >>
>> >> <packaging>rpm</packaging>
>> >>
>> >>                  </configuration>
>> >>
>> >> </execution>
>> >>
>> >>                  </executions>
>> >>
>> >> </plugin>
>> >>
>> >>
>> >> On 12/07/2015 01:54 PM, Karl Heinz Marbaise wrote:
>> >>>
>> >>> Hi Steve,
>> >>>
>> >>> simply answer to this: It is not possible...
>> >>>
>> >>> Long answer: Maven repositories dependending on an appropriate naming
>> >>> schema to find artifacts / versions etc. If you change that the whole
>> >>> system will not work at all..
>> >>>
>> >>> So the name which is stored within a maven repository can't be
>> changed.
>> >>>
>> >>> Kind regards
>> >>> Karl Heinz Marbaise
>> >>>
>> >>> On 12/7/15 7:44 PM, Steve Cohen wrote:
>> >>>>
>> >>>> Our organization has a convention for naming rpms. Typically, the rpm
>> >>>> will have a shorter base name than the Maven project. There is also a
>> >>>> convention around how releases are named. So we want a name
>> >>>> like|${shortname}-${project.version}-${release}.noarch.rpm|.
>> >>>>
>> >>>> I want to build such rpms using the rpm-maven-plugin rather than
>> older
>> >>>> nmake technology.
>> >>>>
>> >>>> And this is easily accomplished using the plugin's parameters. The
>> rpm
>> >>>> generated in the target directory has the desired name.
>> >>>>
>> >>>> However, when|mvn install|installs this rpm into the maven
>> repository,
>> >>>> it insists on storing it the "maven
>> >>>> way":|${project.artifactId}-${project.version}.rpm|
>> >>>>
>> >>>> I want the rpm stored in the standard maven repository directory
>> using
>> >>>> the name that is initially created on package.
>> >>>>
>> >>>> I also tried using the maven-install-plugin (install-file goal) and
>> did
>> >>>> not get the results I was after.
>> >>>>
>> >>>> How may I accomplish this?
>> >>>>
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> 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
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

Re: [rpm-maven-plugin] how to control the name under which rpm is stored in m2 repository?

Posted by Dan Tran <da...@gmail.com>.
I think we may be able to remove the extra 'rpm' classifier

-D

On Tue, Dec 8, 2015 at 8:34 AM, Sverre Moe <sv...@gmail.com> wrote:

> I have a similar problem with RPM archiving with our Nexus Maven
> Repository. I understand the reason for going the maven way for
> naming, but when we want to use Nexus as our Yum repository manager it
> should at least support naming the yum way.
>
> When I have several packages for one project, then maven rearranges
> the classifier to the end of the file and when there is no classifier
> it appends rpm to the end of the file name.
> ${project.artifactId}-${project-version}.noarch.rpm =>
> ${project.artifactId}-${project-version}.noarch-rpm.rpm
> ${project.artifactId}-devel-${project-version}.noarch.rpm =>
> ${project.artifactId}-${project-version}.noarch-devel.rpm
> ${project.artifactId}-jws-${project-version}.noarch.rpm =>
> ${project.artifactId}-${project-version}.noarch-jws.rpm
>
> I want to use Nexus as our RPM yum repository manager, but because of
> this renaming of the RPM artefacts I am reluctant. I would have gone
> for Artefactory if it didn't cost money for the RPM feature.
>
> 2015-12-07 22:05 GMT+01:00 Steve Cohen <sc...@javactivity.org>:
> > Aargh!  Email formattting!
> > <plugin>
> >   <groupId>org.apache.maven.plugins</groupId>
> >   <artifactId>maven-install-plugin</artifactId>
> >   <version>2.5.2</version>
> >   <executions>
> >     <execution>
> >       <id>install-rpm</id>
> >       <goals>
> >         <goal>install-file</goal>
> >       </goals>
> >       <phase>install</phase>
> >       <configuration>
> >
> > <file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${rpm.name
> }-${project.version}-${rpm.release}.noarch.rpm</file>
> >         <groupId>${project.groupId}</groupId>
> >         <artifactId>${rpm.name}</artifactId>
> >         <version>${project.version}-${rpm.release}</version>
> >         <classifier>noarch</classifier>
> >         <packaging>rpm</packaging>
> >       </configuration>
> >     </execution>
> >   </executions>
> > </plugin>
> >
> >
> >
> > On 12/07/2015 02:55 PM, Steve Cohen wrote:
> >>
> >> Actually, I found a way.  If I am willing to let my "short name" become
> >> the archiveId, (and thus live with the rpms in a different location),
> >> the following is possible with the maven-install-plugin, after packaging
> >> with the rpm-maven-plugin:
> >>
> >> <plugin>
> >>
> >> <groupId>org.apache.maven.plugins</groupId>
> >>
> >> <artifactId>maven-install-plugin</artifactId>
> >>
> >> <version>2.5.2</version>
> >>
> >>                  <executions>
> >>
> >> <execution>
> >>
> >>                                  <id>install-rpm</id>
> >>
> >>                                  <goals>
> >>
> >> <goal>install-file</goal>
> >>
> >>                                  </goals>
> >>
> >> <phase>install</phase>
> >>
> >>                  <configuration>
> >>
> >>
> >> <file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${rpm.name
> }-${project.version}-${rpm.release}.noarch.rpm</file>
> >>
> >>
> >> <groupId>${project.groupId}</groupId>
> >>
> >> <artifactId>${rpm.name}</artifactId>
> >>
> >> <version>${project.version}-${rpm.release}</version>
> >>
> >> <classifier>noarch</classifier>
> >>
> >> <packaging>rpm</packaging>
> >>
> >>                  </configuration>
> >>
> >> </execution>
> >>
> >>                  </executions>
> >>
> >> </plugin>
> >>
> >>
> >> On 12/07/2015 01:54 PM, Karl Heinz Marbaise wrote:
> >>>
> >>> Hi Steve,
> >>>
> >>> simply answer to this: It is not possible...
> >>>
> >>> Long answer: Maven repositories dependending on an appropriate naming
> >>> schema to find artifacts / versions etc. If you change that the whole
> >>> system will not work at all..
> >>>
> >>> So the name which is stored within a maven repository can't be changed.
> >>>
> >>> Kind regards
> >>> Karl Heinz Marbaise
> >>>
> >>> On 12/7/15 7:44 PM, Steve Cohen wrote:
> >>>>
> >>>> Our organization has a convention for naming rpms. Typically, the rpm
> >>>> will have a shorter base name than the Maven project. There is also a
> >>>> convention around how releases are named. So we want a name
> >>>> like|${shortname}-${project.version}-${release}.noarch.rpm|.
> >>>>
> >>>> I want to build such rpms using the rpm-maven-plugin rather than older
> >>>> nmake technology.
> >>>>
> >>>> And this is easily accomplished using the plugin's parameters. The rpm
> >>>> generated in the target directory has the desired name.
> >>>>
> >>>> However, when|mvn install|installs this rpm into the maven repository,
> >>>> it insists on storing it the "maven
> >>>> way":|${project.artifactId}-${project.version}.rpm|
> >>>>
> >>>> I want the rpm stored in the standard maven repository directory using
> >>>> the name that is initially created on package.
> >>>>
> >>>> I also tried using the maven-install-plugin (install-file goal) and
> did
> >>>> not get the results I was after.
> >>>>
> >>>> How may I accomplish this?
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: [rpm-maven-plugin] how to control the name under which rpm is stored in m2 repository?

Posted by Sverre Moe <sv...@gmail.com>.
I have a similar problem with RPM archiving with our Nexus Maven
Repository. I understand the reason for going the maven way for
naming, but when we want to use Nexus as our Yum repository manager it
should at least support naming the yum way.

When I have several packages for one project, then maven rearranges
the classifier to the end of the file and when there is no classifier
it appends rpm to the end of the file name.
${project.artifactId}-${project-version}.noarch.rpm =>
${project.artifactId}-${project-version}.noarch-rpm.rpm
${project.artifactId}-devel-${project-version}.noarch.rpm =>
${project.artifactId}-${project-version}.noarch-devel.rpm
${project.artifactId}-jws-${project-version}.noarch.rpm =>
${project.artifactId}-${project-version}.noarch-jws.rpm

I want to use Nexus as our RPM yum repository manager, but because of
this renaming of the RPM artefacts I am reluctant. I would have gone
for Artefactory if it didn't cost money for the RPM feature.

2015-12-07 22:05 GMT+01:00 Steve Cohen <sc...@javactivity.org>:
> Aargh!  Email formattting!
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-install-plugin</artifactId>
>   <version>2.5.2</version>
>   <executions>
>     <execution>
>       <id>install-rpm</id>
>       <goals>
>         <goal>install-file</goal>
>       </goals>
>       <phase>install</phase>
>       <configuration>
>
> <file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${rpm.name}-${project.version}-${rpm.release}.noarch.rpm</file>
>         <groupId>${project.groupId}</groupId>
>         <artifactId>${rpm.name}</artifactId>
>         <version>${project.version}-${rpm.release}</version>
>         <classifier>noarch</classifier>
>         <packaging>rpm</packaging>
>       </configuration>
>     </execution>
>   </executions>
> </plugin>
>
>
>
> On 12/07/2015 02:55 PM, Steve Cohen wrote:
>>
>> Actually, I found a way.  If I am willing to let my "short name" become
>> the archiveId, (and thus live with the rpms in a different location),
>> the following is possible with the maven-install-plugin, after packaging
>> with the rpm-maven-plugin:
>>
>> <plugin>
>>
>> <groupId>org.apache.maven.plugins</groupId>
>>
>> <artifactId>maven-install-plugin</artifactId>
>>
>> <version>2.5.2</version>
>>
>>                  <executions>
>>
>> <execution>
>>
>>                                  <id>install-rpm</id>
>>
>>                                  <goals>
>>
>> <goal>install-file</goal>
>>
>>                                  </goals>
>>
>> <phase>install</phase>
>>
>>                  <configuration>
>>
>>
>> <file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${rpm.name}-${project.version}-${rpm.release}.noarch.rpm</file>
>>
>>
>> <groupId>${project.groupId}</groupId>
>>
>> <artifactId>${rpm.name}</artifactId>
>>
>> <version>${project.version}-${rpm.release}</version>
>>
>> <classifier>noarch</classifier>
>>
>> <packaging>rpm</packaging>
>>
>>                  </configuration>
>>
>> </execution>
>>
>>                  </executions>
>>
>> </plugin>
>>
>>
>> On 12/07/2015 01:54 PM, Karl Heinz Marbaise wrote:
>>>
>>> Hi Steve,
>>>
>>> simply answer to this: It is not possible...
>>>
>>> Long answer: Maven repositories dependending on an appropriate naming
>>> schema to find artifacts / versions etc. If you change that the whole
>>> system will not work at all..
>>>
>>> So the name which is stored within a maven repository can't be changed.
>>>
>>> Kind regards
>>> Karl Heinz Marbaise
>>>
>>> On 12/7/15 7:44 PM, Steve Cohen wrote:
>>>>
>>>> Our organization has a convention for naming rpms. Typically, the rpm
>>>> will have a shorter base name than the Maven project. There is also a
>>>> convention around how releases are named. So we want a name
>>>> like|${shortname}-${project.version}-${release}.noarch.rpm|.
>>>>
>>>> I want to build such rpms using the rpm-maven-plugin rather than older
>>>> nmake technology.
>>>>
>>>> And this is easily accomplished using the plugin's parameters. The rpm
>>>> generated in the target directory has the desired name.
>>>>
>>>> However, when|mvn install|installs this rpm into the maven repository,
>>>> it insists on storing it the "maven
>>>> way":|${project.artifactId}-${project.version}.rpm|
>>>>
>>>> I want the rpm stored in the standard maven repository directory using
>>>> the name that is initially created on package.
>>>>
>>>> I also tried using the maven-install-plugin (install-file goal) and did
>>>> not get the results I was after.
>>>>
>>>> How may I accomplish this?
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>

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


Re: [rpm-maven-plugin] how to control the name under which rpm is stored in m2 repository?

Posted by Steve Cohen <sc...@javactivity.org>.
Aargh!  Email formattting!
<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-install-plugin</artifactId>
   <version>2.5.2</version>
   <executions>
     <execution>
       <id>install-rpm</id>
       <goals>
         <goal>install-file</goal>
       </goals>
       <phase>install</phase>
       <configuration>
 
<file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${rpm.name}-${project.version}-${rpm.release}.noarch.rpm</file> 

         <groupId>${project.groupId}</groupId>
         <artifactId>${rpm.name}</artifactId>
         <version>${project.version}-${rpm.release}</version>
         <classifier>noarch</classifier>
         <packaging>rpm</packaging>
       </configuration>
     </execution>
   </executions>
</plugin>



On 12/07/2015 02:55 PM, Steve Cohen wrote:
> Actually, I found a way.  If I am willing to let my "short name" become
> the archiveId, (and thus live with the rpms in a different location),
> the following is possible with the maven-install-plugin, after packaging
> with the rpm-maven-plugin:
>
> <plugin>
>
> <groupId>org.apache.maven.plugins</groupId>
>
> <artifactId>maven-install-plugin</artifactId>
>
> <version>2.5.2</version>
>
>                  <executions>
>
> <execution>
>
>                                  <id>install-rpm</id>
>
>                                  <goals>
>
> <goal>install-file</goal>
>
>                                  </goals>
>
> <phase>install</phase>
>
>                  <configuration>
>
> <file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${rpm.name}-${project.version}-${rpm.release}.noarch.rpm</file>
>
>
> <groupId>${project.groupId}</groupId>
>
> <artifactId>${rpm.name}</artifactId>
>
> <version>${project.version}-${rpm.release}</version>
>
> <classifier>noarch</classifier>
>
> <packaging>rpm</packaging>
>
>                  </configuration>
>
> </execution>
>
>                  </executions>
>
> </plugin>
>
>
> On 12/07/2015 01:54 PM, Karl Heinz Marbaise wrote:
>> Hi Steve,
>>
>> simply answer to this: It is not possible...
>>
>> Long answer: Maven repositories dependending on an appropriate naming
>> schema to find artifacts / versions etc. If you change that the whole
>> system will not work at all..
>>
>> So the name which is stored within a maven repository can't be changed.
>>
>> Kind regards
>> Karl Heinz Marbaise
>>
>> On 12/7/15 7:44 PM, Steve Cohen wrote:
>>> Our organization has a convention for naming rpms. Typically, the rpm
>>> will have a shorter base name than the Maven project. There is also a
>>> convention around how releases are named. So we want a name
>>> like|${shortname}-${project.version}-${release}.noarch.rpm|.
>>>
>>> I want to build such rpms using the rpm-maven-plugin rather than older
>>> nmake technology.
>>>
>>> And this is easily accomplished using the plugin's parameters. The rpm
>>> generated in the target directory has the desired name.
>>>
>>> However, when|mvn install|installs this rpm into the maven repository,
>>> it insists on storing it the "maven
>>> way":|${project.artifactId}-${project.version}.rpm|
>>>
>>> I want the rpm stored in the standard maven repository directory using
>>> the name that is initially created on package.
>>>
>>> I also tried using the maven-install-plugin (install-file goal) and did
>>> not get the results I was after.
>>>
>>> How may I accomplish this?
>>>
>>
>> ---------------------------------------------------------------------
>> 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: [rpm-maven-plugin] how to control the name under which rpm is stored in m2 repository?

Posted by Steve Cohen <sc...@javactivity.org>.
Actually, I found a way.  If I am willing to let my "short name" become 
the archiveId, (and thus live with the rpms in a different location), 
the following is possible with the maven-install-plugin, after packaging 
with the rpm-maven-plugin:

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-install-plugin</artifactId>

<version>2.5.2</version>

                 <executions>

<execution>

                                 <id>install-rpm</id>

                                 <goals>

<goal>install-file</goal>

                                 </goals>

<phase>install</phase>

                 <configuration>

<file>${project.build.directory}/rpm/${rpm.name}/RPMS/noarch/${rpm.name}-${project.version}-${rpm.release}.noarch.rpm</file>

<groupId>${project.groupId}</groupId>

<artifactId>${rpm.name}</artifactId>

<version>${project.version}-${rpm.release}</version>

<classifier>noarch</classifier>

<packaging>rpm</packaging>

                 </configuration>

</execution>

                 </executions>

</plugin>


On 12/07/2015 01:54 PM, Karl Heinz Marbaise wrote:
> Hi Steve,
>
> simply answer to this: It is not possible...
>
> Long answer: Maven repositories dependending on an appropriate naming 
> schema to find artifacts / versions etc. If you change that the whole 
> system will not work at all..
>
> So the name which is stored within a maven repository can't be changed.
>
> Kind regards
> Karl Heinz Marbaise
>
> On 12/7/15 7:44 PM, Steve Cohen wrote:
>> Our organization has a convention for naming rpms. Typically, the rpm
>> will have a shorter base name than the Maven project. There is also a
>> convention around how releases are named. So we want a name
>> like|${shortname}-${project.version}-${release}.noarch.rpm|.
>>
>> I want to build such rpms using the rpm-maven-plugin rather than older
>> nmake technology.
>>
>> And this is easily accomplished using the plugin's parameters. The rpm
>> generated in the target directory has the desired name.
>>
>> However, when|mvn install|installs this rpm into the maven repository,
>> it insists on storing it the "maven
>> way":|${project.artifactId}-${project.version}.rpm|
>>
>> I want the rpm stored in the standard maven repository directory using
>> the name that is initially created on package.
>>
>> I also tried using the maven-install-plugin (install-file goal) and did
>> not get the results I was after.
>>
>> How may I accomplish this?
>>
>
> ---------------------------------------------------------------------
> 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: [rpm-maven-plugin] how to control the name under which rpm is stored in m2 repository?

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

simply answer to this: It is not possible...

Long answer: Maven repositories dependending on an appropriate naming 
schema to find artifacts / versions etc. If you change that the whole 
system will not work at all..

So the name which is stored within a maven repository can't be changed.

Kind regards
Karl Heinz Marbaise

On 12/7/15 7:44 PM, Steve Cohen wrote:
> Our organization has a convention for naming rpms. Typically, the rpm
> will have a shorter base name than the Maven project. There is also a
> convention around how releases are named. So we want a name
> like|${shortname}-${project.version}-${release}.noarch.rpm|.
>
> I want to build such rpms using the rpm-maven-plugin rather than older
> nmake technology.
>
> And this is easily accomplished using the plugin's parameters. The rpm
> generated in the target directory has the desired name.
>
> However, when|mvn install|installs this rpm into the maven repository,
> it insists on storing it the "maven
> way":|${project.artifactId}-${project.version}.rpm|
>
> I want the rpm stored in the standard maven repository directory using
> the name that is initially created on package.
>
> I also tried using the maven-install-plugin (install-file goal) and did
> not get the results I was after.
>
> How may I accomplish this?
>

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