Created
April 7, 2011 12:25
-
-
Save briandealwis/907654 to your computer and use it in GitHub Desktop.
Tycho pom.xml demonstrating how to build multiple products
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<modelVersion>4.0.0</modelVersion> | |
<!-- | |
Complete pom.xml for building two products described in | |
files "productFile1.product" and "productFile2.product". | |
Note that app icons are copied in from another plugin using | |
an Ant task: Tycho resolves the icons from the target/products/<product.id> | |
directory whereas PDE seems to implicitly prefix the icon path | |
with 'platform:/plugin' and then resolve it appropriately... | |
--> | |
<parent> | |
<groupId>groupId</groupId> | |
<artifactId>parentId</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
</parent> | |
<artifactId>products</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<packaging>eclipse-repository</packaging> | |
<build> | |
<plugins> | |
<plugin> | |
<artifactId>maven-antrun-plugin</artifactId> | |
<version>1.6</version> | |
<executions> | |
<execution> | |
<phase>process-resources</phase> | |
<configuration> | |
<target> | |
<echo message="Copying app icons into place" /> | |
<!-- would be nicer if we could iterate on all the defined products | |
${project.build.directory}/products/${product.id} --> | |
<copy todir="${project.build.directory}/products/productFile1.product"> | |
<fileset dir=".."> | |
<include name="asset-plugin/icons/**" /> | |
</fileset> | |
</copy> | |
<copy todir="${project.build.directory}/products/productFile2.product"> | |
<fileset dir=".."> | |
<include name="asset-plugin/icons/**" /> | |
</fileset> | |
</copy> | |
</target> | |
</configuration> | |
<goals> | |
<goal>run</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<groupId>${tycho.groupId}</groupId> | |
<artifactId>tycho-p2-publisher-plugin</artifactId> | |
<version>${tycho.version}</version> | |
<configuration> | |
<publishArtifacts>true</publishArtifacts> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>${tycho.groupId}</groupId> | |
<artifactId>tycho-p2-director-plugin</artifactId> | |
<version>${tycho.version}</version> | |
<executions> | |
<execution> | |
<id>materialize-products</id> | |
<goals> | |
<goal>materialize-products</goal> | |
</goals> | |
</execution> | |
<execution> | |
<id>archive-products</id> | |
<goals> | |
<goal>archive-products</goal> | |
</goals> | |
</execution> | |
</executions> | |
<configuration> | |
<products> | |
<product> | |
<id>productFile1.product</id> | |
<attachId>product1</attachId> | |
</product> | |
<product> | |
<id>productFile2.product</id> | |
<attachId>product2</attachId> | |
</product> | |
</products> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment