Sure!

two separate executions in the assembly <plugin>, put the <configuration> for 
each in one of the <execution> stanzas, and put each with a separate <phase>.

Read 
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html 
for more info on what phases are available, but as long as they are after your 
other work (compile/test I presume) then you can do them sequentially (for 
example, you could do <phase>package</phase> for the second one and 
<phase>prepare-package</phase> for the first one.)

It's not "normal" maven behavior, and splitting into separate modules 
frequently makes sense, but I do this in more than one place in my project.  
Note that you're bypassing Maven's "dependency" scheme by doing this, though.  
You're accessing the files directly rather than using the dependency 
conventions.

Dana Lacoste

-----Original Message-----
From: Radim Kolar [mailto:[email protected]] 
Sent: Wednesday, October 21, 2009 3:52 PM
To: [email protected]
Subject: order of builds in assembly plugin


is there way to change order of builds in assembly plugin? i need to build
jar-with-dependencies first,
descriptor zip.xml second (depends on jar-with-deps).

      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <configuration>
             <descriptorRefs>
                <descriptorRef>jar-with-dependencies</descriptorRef>
             </descriptorRefs>
             <descriptors>
                    <descriptor>zip.xml</descriptor>
             </descriptors>
             <archive>
                <manifest>
                    <mainClass>dmachine</mainClass>
                </manifest>
             </archive>
          </configuration>
          <executions>
            <execution>
              <id>make-assembly</id>
              <phase>package</phase>
              <goals>
                <goal>single</goal>
                <goal>directory-inline</goal>
              </goals>
          </execution>
        </executions>
      </plugin>
-- 
View this message in context: 
http://www.nabble.com/order-of-builds-in-assembly-plugin-tp26001508p26001508.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


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

Reply via email to