blob: 0c3d6eabcaa33d9127465480e7ae840d98412d9a [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<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>org.eclipse.mylyn.docs</groupId>
<artifactId>epub.core</artifactId>
<version>4.0.7-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>epub.core.repository</artifactId>
<name>Mylyn EPUB Core p2 Repository</name>
<packaging>pom</packaging>
<properties>
<!-- artifacts.sign>true</artifacts.sign -->
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<!-- prepare pom for generating p2 site -->
<id>create-unsigned-p2-site</id>
<phase>generate-sources</phase>
<configuration>
<target>
<property name="epub.version" value="${project.version}" />
<echo level="info">creating repository with version ${epub.version}</echo>
<copy file="repository-pom-template.xml" tofile="repository-pom.xml" overwrite="true">
<filterset>
<filter token="EPUB_VERSION" value="${epub.version}" />
</filterset>
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<!-- remove p2 metadata to avoid broken checksums when signing -->
<id>prepare-p2-site</id>
<phase>generate-resources</phase>
<configuration>
<target>
<delete file="${project.build.directory}/repository/artifacts.jar" />
<copy file="site.xml" tofile="${project.build.directory}/repository/site.xml" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<!-- sign p2 repository artifacts -->
<id>sign-p2-site-artifacts</id>
<phase>process-resources</phase>
<configuration>
<target if="artifacts.sign">
<echo level="info">Signing p2 artifacts:</echo>
<apply executable="curl" parallel="false" dir="${project.build.directory}/repository/plugins" relative="true">
<arg value="--output" />
<targetfile />
<arg value="--form" />
<srcfile prefix="file=@" />
<arg value="--silent" />
<arg value="--show-error" />
<arg value="--fail" />
<arg value="http://build.eclipse.org:31338/sign" />
<fileset dir="${project.build.directory}/repository/plugins">
<include name="*.jar" />
</fileset>
<mapper type="glob" from="*.jar" to="*.jar" />
</apply>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>2.0.0</version>
<configuration>
<pom>repository-pom.xml</pom>
<streamLogs>true</streamLogs>
<localRepositoryPath>.local-repo</localRepositoryPath>
<disableReports>false</disableReports>
<reportsDirectory>${project.build.directory}</reportsDirectory>
<goals>
<goal>clean</goal>
<goal>package</goal>
</goals>
</configuration>
<executions>
<execution>
<!-- create the p2 repository -->
<id>two-part-repository-build</id>
<phase>process-sources</phase>
<goals>
<goal>install</goal>
<!-- install to avoid stale p2 cache with locally built artifacts -->
<goal>run</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<!-- regenerate p2 repository metadata after signing -->
<id>generate-p2-metadata</id>
<phase>prepare-package</phase>
<configuration>
<target>${project.build.directory}/repository</target>
</configuration>
<goals>
<goal>update-site-p2-metadata</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>reficio</id>
<url>http://repo.reficio.org/maven/</url>
</pluginRepository>
</pluginRepositories>
</project>