Skip to content

Instantly share code, notes, and snippets.

@SimonScholz
Created January 29, 2015 20:19
Show Gist options
  • Save SimonScholz/a76d9f3ee8cdfbd34636 to your computer and use it in GitHub Desktop.
Save SimonScholz/a76d9f3ee8cdfbd34636 to your computer and use it in GitHub Desktop.
Product pom
<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>
<parent>
<groupId>com.example.e4.rcp</groupId>
<artifactId>com.example.todo.build.parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../com.example.todo.build.parent</relativePath>
</parent>
<artifactId>com.example.e4.rcp.todo.product</artifactId>
<packaging>eclipse-repository</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>${tycho-version}</version>
<!-- install the product for all configured os/ws/arch environments using
p2 director -->
<executions>
<execution>
<id>materialize-products</id>
<phase>package</phase>
<goals>
<goal>materialize-products</goal>
</goals>
</execution>
<!-- (optional) create product zips (one per os/ws/arch) -->
<execution>
<id>archive-products</id>
<phase>verify</phase>
<goals>
<goal>archive-products</goal>
</goals>
</execution>
</executions>
<!-- (optional) customize the root folder name of the product zip -->
<configuration>
<products>
<product>
<id>${product-id}</id>
<rootFolder>Todo-RCP</rootFolder>
</product>
</products>
</configuration>
</plugin>
<!-- workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=349421 -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/products/${product-id}/icons/</outputDirectory>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>ico</nonFilteredFileExtension>
<nonFilteredFileExtension>xpm</nonFilteredFileExtension>
</nonFilteredFileExtensions>
<resources>
<resource>
<directory>icons</directory>
</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