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

Robert Munteanu commented on MRPM-62:
-------------------------------------

In reply to comment #6:
> Could you attach your pom and maven's output? Both rpm.release and rpm.version
> should be set (by default) for a packaging type of rpm.

I can't attach the project right now since it's a largeish multi-module build. 
I'll try to snip some of the relevant parts and will come up with a full 
example tomorrow.

The rpm goal is attached to one of the modules, using a profile

{code}
        <profiles>
                <profile>
                        <id>hudson</id>
                        <activation>
                                <property>
                                        <name>BUILD_NUMBER</name>
                                </property>
                        </activation>
                        <build>
                                <plugins>
                                        <plugin>
                                                
<groupId>org.codehaus.mojo</groupId>
                                                
<artifactId>rpm-maven-plugin</artifactId>
                                                <executions>
                                                        <execution>
                                                                <goals>
                                                                        
<goal>rpm</goal>
                                                                </goals>
                                                        </execution>
                                                </executions>
                                                <configuration>
                                                        <description>Shared 
files.</description>
                                                        
<defaultUsername>root</defaultUsername>
                                                        
<defaultGroupname>root</defaultGroupname>
                                                        <name>scripts</name>
                                                        
<requires><require>something = 
${rpm.version}-${rpm.release}</require></requires>
                                                        <mappings>
                                                                <mapping>
                                                                        
<directory>/usr/bin</directory>
                                                                        
<filemode>0755</filemode>
                                                                        
<sources>
                                                                                
<source>
                                                                                
        <location>${build.scriptSourceDirectory}</location>
                                                                                
</source>
                                                                        
</sources>
                                                                </mapping>
                                                        </mappings>
                                                </configuration>
                                        </plugin>
                                </plugins>
                        </build>
                </profile>
        </profiles>
{code}

I added the requires lines just for testing. I am building the module using

{code}mvn -DBUILD_NUMBER=123 -o -am -pl resources/ package{code}

and the requires line ends up as something = null-123.1 . Just now I realised 
that I (unintentionally) overwrote the rpm.release property to be 
${BUILD_NUMBER}.1 . Therefore neither property is getting set.

I think there's a difference between executing the package phase, when rpm is 
attached to the _default_ execution:

{code}[INFO] [rpm:rpm {execution: default}]{code}

and the rpm:version goal, when rpm is attached to the _default-cli_ phase

{code}[INFO] [rpm:version {execution: default-cli}]{code}


> Provide expression for release attribute
> ----------------------------------------
>
>                 Key: MRPM-62
>                 URL: http://jira.codehaus.org/browse/MRPM-62
>             Project: Mojo RPM Plugin
>          Issue Type: Improvement
>          Components: rpm
>    Affects Versions: 2.0-beta-4
>            Reporter: Robert Munteanu
>            Assignee: Brett Okken
>            Priority: Minor
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> When building a multi-module project , e.g.
> project
> \- sub-project-a
> \- sub-project-b
> \- scripts
> It's useful to declare that the RPMs for both _sub-project a_ and  
> _sub-project-b_ depend on the _scripts_ RPM. At the moment I can't declare an 
> exact version requirement, since I don't have access to the release version 
> of the project ( 
> http://mojo.codehaus.org/rpm-maven-plugin/rpm-mojo.html#release ) , which 
> would allow me to use:
> {code}
> <requires>
>     <require>scripts = ${project.version}-${project.rpm.release}</require>
> </requires>
> {code}
> Please consider providing this expression.

-- 
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