[ http://jira.codehaus.org/browse/MASSEMBLY-71?page=all ]
Brett Porter updated MASSEMBLY-71: ---------------------------------- Fix Version: 2.1 > Allow an archive base directory that accepts variables > ------------------------------------------------------ > > Key: MASSEMBLY-71 > URL: http://jira.codehaus.org/browse/MASSEMBLY-71 > Project: Maven 2.x Assembly Plugin > Type: New Feature > Versions: 2.0.1, 2.0 > Reporter: Gary Murphy > Fix For: 2.1 > Attachments: MASSEMBLY-71-maven-assembly-plugin.patch > > > Much like the request in MASSEMBLY-40, I wanted to be able to use profile > variables in the specification of the location of items to include in the > assembly. I also wanted to be able to specify the base directory when > constructing the assembly. That is, I was getting: > Archive: commons-bin.zip > Length Method Size Ratio Date Time CRC-32 Name > -------- ------ ------- ----- ---- ---- ------ ---- > 0 Stored 0 0% 02-17-06 07:19 00000000 c:/ > 0 Stored 0 0% 09-24-05 15:47 00000000 c:/home/ > 0 Stored 0 0% 02-17-06 16:40 00000000 c:/home/glm/ > 0 Stored 0 0% 11-18-05 09:23 00000000 c:/home/glm/develop/ > . > . > . > 21798 Defl:N 19746 9% 02-18-06 08:22 a9ca0394 > c:/home/glm/develop/jar/commons-1.2-SNAPSHOT.jar > -------- ------- --- ------- > 21798 19746 9% 12 files > in the archive, but I wanted: > Archive: commons-bin.zip > Length Method Size Ratio Date Time CRC-32 Name > -------- ------ ------- ----- ---- ---- ------ ---- > 0 Stored 0 0% 02-18-06 08:51 00000000 jar/ > 21798 Defl:N 19745 9% 02-18-06 08:51 1232e35d > jar/commons-1.2-SNAPSHOT.jar > -------- ------- --- ------- > 21798 19745 9% 2 files > I took an approach that achieves both of these goals. I added a > archiveBaseDirectory property to the AssemblyMojo that allows the base of the > archive to be specified as a parameter as the example shows: > <project> > . > . > . > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-assembly-plugin</artifactId> > <version>2.1-SNAPSHOT</version> > <configuration> > <descriptor>${basedir}/assembly.xml</descriptor> > <finalName>${artifactId}</finalName> > > <archiveBaseDirectory>${buildPath}/${artifactId}</archiveBaseDirectory> > > <outputDirectory>${assemblyPath}/assembly/${artifactId}</outputDirectory> > > <workDirectory>${assemblyPath}/tmp/assembly/${artifactId}</workDirectory> > </configuration> > </plugin> > . > . > . > </project> > where ${buildpath} comes from my profile: > <profiles> > <profile> > <activation> > <activeByDefault>true</activeByDefault> > </activation> > <id>aentendre</id> > <properties> > <buildPath>/home/glm/develop</buildPath> > </properties> > </profile> > </profiles> > I will attach the patch after I get the JIRA number. -- 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, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]