Skip to content

Commit

Permalink
Add release profile and use it to deploy artifacts (#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
mziccard committed Apr 12, 2016
1 parent 099ada0 commit de23a12
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 30 deletions.
61 changes: 35 additions & 26 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,32 +234,6 @@
<compilerArgument>-Xlint:unchecked</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.0</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>
<version>2.10.3</version>
<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>
Expand Down Expand Up @@ -444,4 +418,39 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.0</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>
<version>2.10.3</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
4 changes: 2 additions & 2 deletions utilities/after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then

cd ..
utilities/update_docs_version.sh # Update version in READMEs
mvn clean deploy --settings ~/.m2/settings.xml -P sign-deploy
mvn clean deploy --settings ~/.m2/settings.xml -P sign-deploy,release
else
mvn clean deploy -DskipTests=true -Dgpg.skip=true --settings ~/.m2/settings.xml
mvn clean deploy -DskipTests=true -Dgpg.skip=true --settings ~/.m2/settings.xml -P release
fi
else
echo "Not deploying artifacts. This is only done with non-pull-request commits to master branch with Oracle Java 7 builds."
Expand Down
4 changes: 2 additions & 2 deletions utilities/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
chmod 700 $TRAVIS_BUILD_DIR/signing-tools
tar xvf $TRAVIS_BUILD_DIR/signing-tools.tar -C $TRAVIS_BUILD_DIR/signing-tools
# Run verify
mvn verify
mvn verify -P release
else
mvn verify -DskipITs
mvn verify -DskipITs -P release
fi

0 comments on commit de23a12

Please sign in to comment.