Skip to content

Commit

Permalink
Upload snapshot artifacts in maven batch mode
Browse files Browse the repository at this point in the history
  • Loading branch information
beikov committed Oct 7, 2019
1 parent 3cfcaec commit 33a84d7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .travis-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ if [ "$TRAVIS_REPO_SLUG" == "Blazebit/blaze-persistence" ] &&
[ "$TRAVIS_PULL_REQUEST" == "false" ] &&
[ "$JPAPROVIDER" == "hibernate-5.2" ] &&
[ "$RDBMS" == "h2" ] &&
[ "x$JDK" == "x" ]; then
[ "$JDK" == "9" ] &&
[ "$SNAPSHOT_PUBLISH" == "true" ]; then

echo "Starting snapshot deployment..."
mvn -s .travis-settings.xml -DperformRelease -DskipTests -Dgpg.skip=true -Dquiet=true clean deploy
export MAVEN_OPTS="$MAVEN_OPTS -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
mvn -B -P blazebit-release -s .travis-settings.xml -DperformRelease -DskipTests -Dgpg.skip=true -Dquiet=true clean deploy
echo "Snapshots deployed!"

else
Expand Down
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ matrix:
################################################
# hibernate-5.2
################################################
- env: JPAPROVIDER=hibernate-5.2 RDBMS=h2 JDK=9 SNAPSHOT_PUBLISH=true
before_install:
- wget https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh
- . ./install-jdk.sh -F 9 -L GPL
- rm "${JAVA_HOME}/lib/security/cacerts"
- ln -s /etc/ssl/certs/java/cacerts "${JAVA_HOME}/lib/security/cacerts"
script:
- "echo 'Publishing snapshots only, skipping build...'"
- env: JPAPROVIDER=hibernate-5.2 RDBMS=h2
jdk: oraclejdk8
- env: JPAPROVIDER=hibernate-5.2 RDBMS=mysql
Expand Down Expand Up @@ -487,6 +495,8 @@ matrix:
before_install:
- wget https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh
- . ./install-jdk.sh -F 9 -L GPL
- rm "${JAVA_HOME}/lib/security/cacerts"
- ln -s /etc/ssl/certs/java/cacerts "${JAVA_HOME}/lib/security/cacerts"
- env: JPAPROVIDER=datanucleus-5 RDBMS=h2 JDK=9
before_install:
- wget https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<img src="https://persistence.blazebit.com/images/blaze_persistence_logo_colors_render.png" width="200" />

[![Build Status](https://travis-ci.org/Blazebit/blaze-persistence.svg?branch=master)](https://travis-ci.org/Blazebit/blaze-persistence)

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.blazebit/blaze-persistence-core-impl/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.blazebit/blaze-persistence-core-impl)
Expand Down
4 changes: 3 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@
} else {
System.setProperty("jdk8.classes.jar.escaped", s + java.io.File.separator + "jre" + java.io.File.separator + "lib" + java.io.File.separator + "rt.jar");
}
System.out.println(System.getProperty("jdk8.classes.jar.escaped"));
System.out.println(System.getProperty("java.specification.version"));
]]>
</script>
</scripts>
Expand Down Expand Up @@ -256,7 +258,7 @@
<rules>
<evaluateBeanshell>
<message>To create a release build of this project with JDK 11+ you need to provide a system property "jdk8.home" that can be used to access the rt.jar or classes.jar on Mac</message>
<condition>new java.io.File(System.getProperty("jdk8.classes.jar.escaped")).exists()</condition>
<condition>System.getProperty("java.specification.version").contains(".") || Integer.parseInt(System.getProperty("java.specification.version")) &lt; 11 || new java.io.File(System.getProperty("jdk8.classes.jar.escaped")).exists()</condition>
</evaluateBeanshell>
</rules>
</configuration>
Expand Down

0 comments on commit 33a84d7

Please sign in to comment.