Created
November 28, 2012 21:39
-
-
Save xnopre/4164769 to your computer and use it in GitHub Desktop.
Ordered unpack dependencies with copy-maven-plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>xno</groupId> | |
<artifactId>test-unpack</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>pom</packaging> | |
<properties> | |
<unpackdir>${project.build.directory}/unpack</unpackdir> | |
</properties> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>com.github.goldin</groupId> | |
<artifactId>copy-maven-plugin</artifactId> | |
<version>0.2.5</version> | |
<executions> | |
<execution> | |
<id>create-archive</id> | |
<phase>package</phase> | |
<goals> | |
<goal>copy</goal> | |
</goals> | |
<configuration> | |
<resources> | |
<!-- Unzip ressources in desired order --> | |
<resource> | |
<targetPath>${unpackdir}</targetPath> | |
<dependencies> | |
<dependency> | |
<groupId>xno</groupId> | |
<artifactId>zip1</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<type>zip</type> | |
<classifier>v2</classifier> | |
</dependency> | |
</dependencies> | |
<unpack>true</unpack> | |
</resource> | |
<resource> | |
<targetPath>${unpackdir}</targetPath> | |
<dependencies> | |
<dependency> | |
<groupId>xno</groupId> | |
<artifactId>zip1</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<type>zip</type> | |
<classifier>aa</classifier> | |
</dependency> | |
</dependencies> | |
<unpack>true</unpack> | |
</resource> | |
<resource> | |
<targetPath>${unpackdir}</targetPath> | |
<dependencies> | |
<dependency> | |
<groupId>xno</groupId> | |
<artifactId>zip1</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<type>zip</type> | |
<classifier>v1</classifier> | |
</dependency> | |
</dependencies> | |
<unpack>true</unpack> | |
</resource> | |
<!-- Create final ZIP --> | |
<resource> | |
<directory>${unpackdir}</directory> | |
<targetPath>${project.build.directory}/result.zip</targetPath> | |
<pack>true</pack> | |
</resource> | |
</resources> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment