[ 
http://jira.codehaus.org/browse/MRPM-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=189079#action_189079
 ] 

Luke Forehand commented on MRPM-42:
-----------------------------------

You are right, this can be accomplished by using the dependency plugin, 
executing the copy goal in the compile phase.  Here is a working example of 
dependency plugin working with rpm plugin, accomplishing the stripping of the 
dependency's version:
{code:xml}
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
                <execution>
                        <id>copy</id>
                        <phase>compile</phase>
                        <goals>
                                <goal>copy</goal>
                        </goals>
                        <configuration>
                                <artifactItems>
                                        <artifactItem>
                                                <groupId>my.group</groupId>
                                                
<artifactId>my.artifact</artifactId>
                                                <version>my.version</version>
                                                <type>war</type>
                                        </artifactItem>
                                </artifactItems>
                                <stripVersion>true</stripVersion>
                                
<outputDirectory>${project.build.directory}</outputDirectory>
                        </configuration>
                </execution>
        </executions>
</plugin>
<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>rpm-maven-plugin</artifactId>
        <version>2.0-beta-3</version>
        <extensions>true</extensions>
        <configuration>
                ...
                <mappings>
                        <mapping>
                                ...
                                <sources>
                                        <source>
                                                
<location>${project.build.directory}/my.artifact.war</location>
                                        </source>
                                </sources>
                        </mapping>
                </mappings>
                ...
        </configuration>
</plugin>
{code}

> Add ability to specify an outputFileNameMapping for an included dependency
> --------------------------------------------------------------------------
>
>                 Key: MRPM-42
>                 URL: http://jira.codehaus.org/browse/MRPM-42
>             Project: Mojo RPM Plugin
>          Issue Type: New Feature
>          Components: rpm
>    Affects Versions: 2.0-beta-3
>            Reporter: Luke Forehand
>            Assignee: Brett Okken
>
> Use Case:
> Assembling an RPM that includes a WAR repository artifact.  
> The RPM install script copies the versioned artifact to a server deployment 
> location, where the WAR is automatically unpacked and deployed.  
> Since the context path of the webapp is inferred from the filename of the WAR 
> artifact, it is important for the filename to remain the same.
> Specifying an outputFileNameMapping for the dependency would allow the WAR 
> artifact to be renamed before it was added to the RPM.
> I think there are probably other similar use cases.  This feature exists in 
> the maven-assembly-plugin.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to