maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Cohen <sco...@javactivity.org>
Subject Re: [rpm-maven-plugin] how to control the name under which rpm is stored in m2 repository?
Date Mon, 07 Dec 2015 21:05:22 GMT
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


Mime
View raw message