| <?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>jar</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 |
| --> |
| |
| <properties> |
| <catalog.server-url>https://repository.sonatype.org</catalog.server-url> |
| <catalog.repo-name>forge-sites</catalog.repo-name> |
| |
| <catalog.repo-path>m2e-discovery-catalog</catalog.repo-path> |
| <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}/nexus/content/sites/${catalog.repo-name}</catalog.repo-url> |
| </properties> |
| |
| <build> |
| <resources> |
| <resource> |
| <targetPath>.</targetPath> |
| <filtering>false</filtering> |
| <directory>${basedir}/</directory> |
| <includes> |
| <include>plugin.*</include> |
| <include>images/**</include> |
| <include>lifecycle/**</include> |
| </includes> |
| </resource> |
| </resources> |
| |
| <plugins> |
| <plugin> |
| <groupId>org.sonatype.m2e.discovery.publisher</groupId> |
| <artifactId>org.sonatype.m2e.discovery.publisher.maven-plugin</artifactId> |
| <version>0.0.1-SNAPSHOT</version> |
| <executions> |
| <execution> |
| <id>standard</id> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| <configuration> |
| <p2RepositoryUrl>${catalog.repo-url}</p2RepositoryUrl> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-assembly-plugin</artifactId> |
| <configuration> |
| <descriptors> |
| <descriptor>src/main/assembly/assembly.xml</descriptor> |
| </descriptors> |
| </configuration> |
| <executions> |
| <execution> |
| <id>make-assembly</id> |
| <phase>package</phase> |
| <goals> |
| <goal>single</goal> |
| </goals> |
| </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>org.sonatype.m2e.discovery.publisher</groupId> |
| <artifactId>org.sonatype.m2e.discovery.publisher.maven-plugin</artifactId> |
| <versionRange>[0.0.1-SNAPSHOT,)</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>publish-site</id> |
| <build> |
| <plugins> |
| <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}-${project.version}-catalog.zip</file> |
| <serverId>forge-releases</serverId> |
| <repositoryUrl>${catalog.repo-url-compressed}</repositoryUrl> |
| <repositoryPath>${catalog.repo-path}</repositoryPath> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| |
| <profile> |
| <id>local-nexus</id> |
| <properties> |
| <catalog.server-url>http://localhost:8081/nexus</catalog.server-url> |
| <catalog.repo-name>xx</catalog.repo-name> |
| </properties> |
| </profile> |
| </profiles> |
| </project> |