maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Cohen <sco...@javactivity.org>
Subject Re: assembly plugin - pass property from pom.xml to assembly descriptor
Date Wed, 28 Nov 2012 15:44:17 GMT
On 11/28/2012 09:27 AM, Thomas Broyer wrote:
> On Wed, Nov 28, 2012 at 4:06 PM, Steve Cohen <stevecoh1@comcast.net> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message