maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zebahmad <coolz...@gmail.com>
Subject Assembly plugin with multiple XMLs - appending assembly ID
Date Sat, 24 Mar 2012 14:36:48 GMT
I'm using the assembly plugin to create two assemblies for a deliverable -
one for the binary and one for sources

DeliverableX
--| ProjectA
--| ProjectB

So on invoking maven build of DeliverableX, projects A & B will be built and
assembly plugin is used to create two artifacts
DeliverableX-bin.jar
DeliverableX-sources.jar

Corresponding pom configuration entry for the plugin:
                         <configuration>
				<descriptors>
					<descriptor>assembly-bin.xml</descriptor>
					<descriptor>assembly-sources.xml</descriptor>
				</descriptors>
			<appendAssemblyId>true</appendAssemblyId>
			</configuration>


assembly-bin.xml file:
<id>bin</id>
  <formats>
    <format>jar</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <dependencySets>
    <dependencySet>
      <outputDirectory>/</outputDirectory>
      <useProjectArtifact>true</useProjectArtifact>
      <includes>
      	<include>com.mycompany.myproject.ProjectA:jar:1.0.3</include>
      	<include>com.mycompany.myproject.ProjectB:jar:1.0.3</include>
      </includes>
      <unpack>true</unpack>
      <scope>runtime</scope>
    </dependencySet>
  </dependencySets>
</assembly>

Correspondingn assembly-sources.xml file:
  <id>sources</id>
  <formats>
    <format>jar</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <dependencySets>
    <dependencySet>
      <outputDirectory>/</outputDirectory>
      <useProjectArtifact>true</useProjectArtifact>
      <includes>
      	<include>*:sources</include>
      </includes>
      <unpack>true</unpack>
      <scope>runtime</scope>
    </dependencySet>
  </dependencySets>
</assembly>


My problem is that I want the final artifacts to be DeliverableX.jar and
DeliverableX-sources.jar, similar to normal maven conventions. By the above
script I get DeliverableX-bin.jar and DeliverableX-sources.jar. If I change
the value of <appendAssemblyId> then that gets changed for both the assembly
files. 

Any suggestion the best way to handle this?

Thanking you in advance!!! :)

Zeba


--
View this message in context: http://maven.40175.n5.nabble.com/Assembly-plugin-with-multiple-XMLs-appending-assembly-ID-tp5591772p5591772.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message