On 11/28/2012 09:27 AM, Thomas Broyer wrote:
On Wed, Nov 28, 2012 at 4:06 PM, Steve Cohen <[email protected]> wrote:
Are properties defined in pom.xml available in the execution of an assembly
descriptor invoked from pom.xml via the assembly plugin?

I don't think so (TBH, I didn't even try, because I first saw… see below)

If not, is there a way to pass such definitions to the assembly plugin?

You can use the maven-resources-plugin to copy and filter the
descriptor, and point the maven-assembly-plugin at the filtered
descriptor. This is what Sonatype does when packaging Nexus:
https://github.com/sonatype/nexus/blob/master/nexus/nexus-oss-webapp/pom.xml

--
Thomas Broyer
/tɔ.ma.bʁwa.je/

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Actually, to answer my own question, I found that they are.

Given
<properties>
        <mykey>myvalue</mykey>
</properties>

in pom.xml

the assembly descriptor has access to this property via

${project.properties.mykey}



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to