Hi Christian,

You can't - artifacts in a maven repository adhere to a specific naming 
convention.

What you can do is rename the RPM when it is downloaded (there is enough info 
in the RPM headers to extract this information to be able to write a script to 
do it).

/James

From: Christian Andersson A [mailto:[email protected]]
Sent: 14 March 2014 08:33
To: [email protected]
Subject: [mojo-user] [rpm-maven-plugin] rpm artifact filename changed

hi,

Why is the name of the rpm changed from noarch.rpm to -rpm.rpm? And how can I 
stop it to be changed, when running install or deploy.

---
from log output:
[INFO] Installing 
..workspace../com.comp.art/target/rpm/art/RPMS/noarch/art-0.0.1-SNAPSHOT20140314074613.noarch.rpm
 to .../.m2/repository/com/comp/art/0.0.1-SNAPSHOT/art-0.0.1-SNAPSHOT-rpm.rpm

My pom.xml
---
<project 
xmlns="http://maven.apache.org/POM/4.0.0";<http://maven.apache.org/POM/4.0.0> 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";<http://www.w3.org/2001/XMLSchema-instance>
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";<http://maven.apache.org/POM/4.0.0http:/maven.apache.org/xsd/maven-4.0.0.xsd>>[email protected]<mailto:[email protected]>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.comp</groupId>
    <artifactId>art</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>rpm-maven-plugin</artifactId>
                <version>2.1-alpha-3</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <goals>
                            <goal>attached-rpm</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <group>Applications/Communications</group>
                    <copyright>2014</copyright>
                    <mappings>
                        <mapping>
                            <directory>/opt/test</directory>
                        </mapping>
                    </mappings>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
---

$ mvn -version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 
14:51:28+0100)
Maven home: ..
Java version: 1.7.0_40, vendor: Oracle Corporation
Java home: ..
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.4.0-030400-generic", arch: "amd64", family: "unix"

//chibbe

Reply via email to