Publish Maven artifacts to GitHub
This commit is contained in:
72
pom.xml
72
pom.xml
@@ -35,6 +35,7 @@
|
|||||||
<site.dest>${project.basedir}/target/site-src</site.dest>
|
<site.dest>${project.basedir}/target/site-src</site.dest>
|
||||||
<site.profile>pre-release</site.profile>
|
<site.profile>pre-release</site.profile>
|
||||||
<github.site.dir>${project.basedir}/src/github</github.site.dir>
|
<github.site.dir>${project.basedir}/src/github</github.site.dir>
|
||||||
|
<maven2.repo.dir>${project.build.directory}/mvn-repo</maven2.repo.dir>
|
||||||
<tagNameFormat>@{project.version}</tagNameFormat>
|
<tagNameFormat>@{project.version}</tagNameFormat>
|
||||||
</properties>
|
</properties>
|
||||||
<scm>
|
<scm>
|
||||||
@@ -291,10 +292,53 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<!-- Generate source JAR. -->
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-sources</id>
|
||||||
|
<!-- phase package -->
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<!-- Generate Javadoc JAR. -->
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>${maven.javadoc.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-javadocs</id>
|
||||||
|
<!-- phase package -->
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<!-- SonarQube analysis. -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.sonarsource.scanner.maven</groupId>
|
||||||
|
<artifactId>sonar-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
<!-- Deploy the Maven artifacts to a local directory for publishing to GitHub. -->
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>2.8.2</version>
|
||||||
|
<configuration>
|
||||||
|
<altDeploymentRepository>
|
||||||
|
internal.repo::default::file://${maven2.repo.dir}
|
||||||
|
</altDeploymentRepository>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<!-- Generate GitHub README.md. -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<!-- Generate GitHub README.md. -->
|
|
||||||
<execution>
|
<execution>
|
||||||
<id>generate-github-readme</id>
|
<id>generate-github-readme</id>
|
||||||
<phase>site</phase>
|
<phase>site</phase>
|
||||||
@@ -317,12 +361,35 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- Push Maven site to GitHub. -->
|
<!-- Push stuff to GitHub. -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.github.github</groupId>
|
<groupId>com.github.github</groupId>
|
||||||
<artifactId>site-maven-plugin</artifactId>
|
<artifactId>site-maven-plugin</artifactId>
|
||||||
<version>0.12</version>
|
<version>0.12</version>
|
||||||
<executions>
|
<executions>
|
||||||
|
<!-- Push Maven artifacts to GitHub. -->
|
||||||
|
<execution>
|
||||||
|
<id>push-artifacts-to-github</id>
|
||||||
|
<phase>deploy</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>site</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<server>github</server><!-- settings.xml -->
|
||||||
|
<repositoryName>maven2-test</repositoryName>
|
||||||
|
<repositoryOwner>rjenkinsjr</repositoryOwner>
|
||||||
|
<branch>refs/heads/master</branch>
|
||||||
|
<message>Publishing artifacts for
|
||||||
|
${project.groupId}:${project.artifactId}:${project.version}</message>
|
||||||
|
<outputDirectory>${maven2.repo.dir}</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*</include>
|
||||||
|
</includes>
|
||||||
|
<merge>true</merge>
|
||||||
|
<noJekyll>true</noJekyll>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<!-- Push Maven site to GitHub. -->
|
||||||
<execution>
|
<execution>
|
||||||
<id>push-site-to-github</id>
|
<id>push-site-to-github</id>
|
||||||
<phase>site-deploy</phase>
|
<phase>site-deploy</phase>
|
||||||
@@ -332,7 +399,6 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<server>github</server><!-- settings.xml -->
|
<server>github</server><!-- settings.xml -->
|
||||||
<message>Publishing site for version ${project.version}</message>
|
<message>Publishing site for version ${project.version}</message>
|
||||||
<merge>true</merge>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|||||||
Reference in New Issue
Block a user