You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Petar Tahchiev (JIRA)" <ji...@codehaus.org> on 2008/08/28 13:20:48 UTC

[jira] Commented: (MASSEMBLY-331) assembly descriptor doesn't seem to property substitute properties

    [ http://jira.codehaus.org/browse/MASSEMBLY-331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=146291#action_146291 ] 

Petar Tahchiev commented on MASSEMBLY-331:
------------------------------------------

Hi Jon,

you are right - the command line should override the pom.xml properties, and, indeeed, this is a bug. 
The point is that pre-(maven 2.0.9) the -D properties were system properties and now in maven 2.0.9 they are session execution properties. 
I have created a patch for this issue. It involves changing 6 classes:
-AssemblyFormatUtils.java
-ModuleSetAssemblyPhase.java
-AssemblerConfigurationSource.java
-AddArtifactTask.java
-AddDependencySetsTask.java
-AbstractAssemblyMojo.java

The bad side of this patch is that it changes the signatures of several public methods.
It also breaks several of the test-cases.
I have also created a patch to repair the test-cases, so that they function as before.


Cheers, Petar.

> assembly descriptor doesn't seem to property substitute properties
> ------------------------------------------------------------------
>
>                 Key: MASSEMBLY-331
>                 URL: http://jira.codehaus.org/browse/MASSEMBLY-331
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-2
>            Reporter: Jon Osborn
>
> For the following assembly.xml:
> <assembly>
>     <formats>
>         <format>tar.gz</format>
>     </formats>
>     <includeBaseDirectory>false</includeBaseDirectory>
>     <fileSets>
>         <fileSet>
>             <directory>src/main/resources/appcontent</directory>
>             <outputDirectory>${build.environment}/${build.view}/appcontent</outputDirectory>
>             <includes>
>                 <include>**</include>
>             </includes>
>         </fileSet>
>     </fileSets>
> </assembly>
> ${build.environment} and ${build.view} are declared as <properties> in parent POM. They retain their 'default' value and cannot be overridden from the command line using the -D  (-Dbuild.environment=UAT) syntax.
> The intent of the properties is to build the tar.gz file with different paths based on the two variables.

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