...
We'll configure theĀ maven-depenency-plugin
to copy both our application jars and the jar with our custom panel. Here's how it looks (see the inline XML comments for more details):
Code Block | ||||
---|---|---|---|---|
| ||||
<plugin> <artifactId>maven-dependency-plugin</artifactId> <configuration> <excludeTransitive>false</excludeTransitive> <executions> <stripVersion>true</stripVersion> <overWriteReleases>true</overWriteReleases> <overWriteSnapshots>true</overWriteSnapshots> <execution><overWriteIfNewer>true</overWriteIfNewer> </configuration> <executions> <execution> <!-- copy *application* jars to izpack staging lib --> <id>copy-product-dependencies</id> <phase>prepare-package</phase> <goals> <goal>copy-dependencies</goal> <goals> </goals> <configuration> <goal>copy-dependencies</goal><outputDirectory>${izpack.staging}/lib</outputDirectory> <excludeScope>system</excludeScope> <!-- this excludes </goals>tools.jar, e.g. --> <excludeArtifactIds>mycustompanels</excludeArtifactIds> <!-- IMPORTANT: <configuration>don't copy custom panels where our application jars live --> <excludeGroupIds>org.codehaus.izpack</excludeGroupIds> <outputDirectory>${izpack.staging}/lib</outputDirectory> <excludeTransitive>false</excludeTransitive> <stripVersion>true</stripVersion> <overWriteReleases>true</overWriteReleases> <overWriteSnapshots>true</overWriteSnapshots> <overWriteIfNewer>true</overWriteIfNewer> <excludeScope>system</excludeScope> <!-- this excludes tools.jar, e.g. --> <excludeArtifactIds>mycustompanels</excludeArtifactIds> <!-- IMPORTANT: don't copy custom panels where our application jars live --> <excludeGroupIds>org.codehaus.izpack</excludeGroupIds> <!-- IMPORTANT: we don't want to copy the izpack dependency where our application jars live --> </configuration> </execution> <execution> <!-- copy izpack custom (custom panels, etc.) jars to izpack staging custom --> <id>copy-izpack-dependencies</id> <phase>prepare-package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${izpack.staging}/custom</outputDirectory> <!-- IMPORTANT: we don't want to copy the izpack dependency where our application jars live --> </configuration> <excludeTransitive>false<</excludeTransitive>execution> <execution> <!-- copy izpack custom (custom panels, <stripVersion>true</stripVersion> etc.) jars to izpack staging custom --> <id>copy-izpack-dependencies</id> <overWriteReleases>true</overWriteReleases><phase>prepare-package</phase> <goals> <goal>copy-dependencies</goal> <overWriteSnapshots>true</overWriteSnapshots> </goals> <configuration> <overWriteIfNewer>true</overWriteIfNewer> <outputDirectory>${izpack.staging}/custom</outputDirectory> <includeArtifactIds>mycustompanels</includeArtifactIds> <includeArtifactIds>mycustompanels</includeArtifactIds> <!-- IMPORTANT: this causes *only* our custom panels to be copied --> </configuration> </execution> </executions> </plugin> |
Some key points:
...