Skip to content

Commit

Permalink
Maven artifacts relases into Apache (apache#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat authored Jul 29, 2017
1 parent 85a1c6c commit 1305439
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 98 deletions.
17 changes: 7 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,16 @@ script:
- (cd site && make travis_build)

deploy:
# Disabled the deployment of snapshots jars to Maven central for now
# until we figure out a way to deploy them through the proper Apache
# route.
# -
# provider: script
# skip_cleanup: true
# script: mvn deploy -DskipTests --settings .travis/settings.xml
# on:
# tags: false
-
provider: script
skip_cleanup: true
script: mvn deploy -DskipTests --settings .travis/settings.xml
on:
tags: false
-
provider: script
skip_cleanup: true
script: mvn install deploy -Prelease -DskipTests --settings .travis/settings.xml
script: mvn install deploy -Papache-release -DskipTests --settings .travis/settings.xml
on:
repo: apache/incubator-pulsar
tags: true
Expand Down
42 changes: 25 additions & 17 deletions .travis/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,31 @@
-->
<settings>
<servers>
<server>
<!-- Maven Central Deployment -->
<id>ossrh</id>
<username>${env.SONATYPE_USERNAME}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
<!-- To publish a snapshot of some part of Maven -->
<server>
<id>apache.snapshots.https</id>
<username>${env.APACHE_USER}</username>
<password>${env.APACHE_PASSWORD}</password>
</server>

<!-- To stage a release of some part of Maven -->
<server>
<id>apache.releases.https</id>
<username>${env.APACHE_USER}</username>
<password>${env.APACHE_PASSWORD}</password>
</server>
</servers>

<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>${env.GPG_EXECUTABLE}</gpg.executable>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>
<profile>
<id>apache</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>${env.GPG_EXECUTABLE}</gpg.executable>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
77 changes: 6 additions & 71 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
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>
<packaging>pom</packaging>

<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>18</version>
</parent>

<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar</artifactId>
Expand Down Expand Up @@ -846,66 +852,6 @@ flexible messaging model and an intuitive client API.</description>
</plugins>
</reporting>
</profile>

<profile>
<!-- For releases, attach javadoc, source jar and gpg signatures -->
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>

</profile>
</profiles>

<repositories>
Expand All @@ -927,15 +873,4 @@ flexible messaging model and an intuitive client API.</description>
<url>http://yahoo.bintray.com/maven</url>
</repository>
</repositories>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</project>

0 comments on commit 1305439

Please sign in to comment.