Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
214 lines (199 sloc) 7.66 KB
<?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">
<parent>
<groupId>org.eclipse.m2e</groupId>
<artifactId>org.eclipse.m2e.discovery-directory</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.eclipse.m2e.discovery.oss</artifactId>
<packaging>null</packaging>
<!--
Here is what happens here
1. discovery.publisher.maven-plugin generates p2 repository and catalog jar
2. assembly-plugin creates zip file with p2 repository and catalog jar
3. zip file is uploaded to special "compressed" nexus url
4. nexus cleans desination directory and unzips everything there
This assumes nexus-pro with nexus-unpack-plugin
-->
<build>
<resources>
<resource>
<targetPath>.</targetPath>
<filtering>false</filtering>
<directory>${basedir}/</directory>
<includes>
<include>plugin.*</include>
<include>images/**</include>
<include>lifecycle/**</include>
</includes>
</resource>
<resource>
<directory>src/main/resources-filtered</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>resources</id>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.takari</groupId>
<artifactId>maven-nolifecycle-plugin</artifactId>
<version>0.0.1</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>io.takari.m2e.discovery.publisher</groupId>
<artifactId>org.sonatype.m2e.discovery.publisher.maven-plugin</artifactId>
<version>0.4.1</version>
<executions>
<execution>
<id>catalog-1.4</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<descriptor>${project.build.directory}/classes/connectors.xml</descriptor>
<outputdir>${project.build.directory}/catalog-1.4</outputdir>
<m2eversion>1.4</m2eversion>
</configuration>
</execution>
<execution>
<id>catalog-1.5</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<descriptor>${project.build.directory}/classes/connectors.xml</descriptor>
<outputdir>${project.build.directory}/catalog-1.5</outputdir>
<m2eversion>1.5</m2eversion>
</configuration>
</execution>
<execution>
<id>catalog-1.6</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<descriptor>${project.build.directory}/classes/connectors.xml</descriptor>
<outputdir>${project.build.directory}/catalog-1.6</outputdir>
<m2eversion>1.6</m2eversion>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/catalog-1.4.xml</descriptor>
<descriptor>src/main/assembly/catalog-1.5.xml</descriptor>
<descriptor>src/main/assembly/catalog-1.6.xml</descriptor>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}</finalName>
<appendAssemblyId>true</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>maven-upload-plugin</artifactId>
<version>0.0.1</version>
<executions>
<execution>
<id>deploy-p2-repository</id>
<phase>install</phase>
<goals>
<goal>upload-file</goal>
</goals>
<configuration>
<file>${project.build.directory}/${project.artifactId}-assembly.zip</file>
<serverId>${catalog.repo-name}</serverId>
<repositoryUrl>${catalog.repo-url-compressed}</repositoryUrl>
<repositoryPath>/</repositoryPath>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!-- This plugin's configuration is used in m2e only.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>io.takari.m2e.discovery.publisher</groupId>
<artifactId>org.sonatype.m2e.discovery.publisher.maven-plugin</artifactId>
<versionRange>[0.0.1,)</versionRange>
<goals>
<goal>generate</goal>
</goals>
</pluginExecutionFilter>
<action>
<!-- org.sonatype.m2e.discovery.publisher.maven-plugin uses an Equinox instance, so it cannot be executed from within eclipse -->
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>catalog-stage</id>
<activation><activeByDefault>true</activeByDefault></activation>
<properties>
<catalog.server-url>https://repository.takari.io</catalog.server-url>
<!-- Name of the hosted repository -->
<catalog.repo-name>m2e.discovery.stage</catalog.repo-name>
<catalog.repo-url-compressed>${catalog.server-url}/service/local/repositories/${catalog.repo-name}/content-compressed</catalog.repo-url-compressed>
<catalog.repo-url>${catalog.server-url}/content/repositories/${catalog.repo-name}</catalog.repo-url>
<connectorUrl>${catalog.server-url}/content/sites/m2e.extras</connectorUrl>
</properties>
</profile>
<profile>
<id>catalog-release</id>
<properties>
<catalog.server-url>https://repository.takari.io</catalog.server-url>
<!-- Name of the hosted repository -->
<catalog.repo-name>m2e.discovery.release</catalog.repo-name>
<catalog.repo-url-compressed>${catalog.server-url}/service/local/repositories/${catalog.repo-name}/content-compressed</catalog.repo-url-compressed>
<catalog.repo-url>${catalog.server-url}/content/repositories/${catalog.repo-name}</catalog.repo-url>
<connectorUrl>http://repo1.maven.org/maven2/.m2e/connectors</connectorUrl>
</properties>
</profile>
</profiles>
</project>