Skip to content

Commit

Permalink
merge into origin/master
Browse files Browse the repository at this point in the history
  • Loading branch information
lalbertson authored and lalbertson committed May 5, 2020
2 parents 5194628 + f1d3e9d commit a75fd60
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ fabric.properties
# Editor-based Rest Client
.idea/httpRequests

# Visual studio
/.vs/*

# Visual studio code
/.vscode/*

**/target/
**/bin/
*.iml
Expand Down
24 changes: 24 additions & 0 deletions .maven.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/SETTINGS/1.0.0" xsi:schemalocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- For automating the maven release using Travis. See: https://www.phillip-kruger.com/post/continuous_integration_to_maven_ce -->
<servers>
<server>
<!-- Maven Central Deployment -->
<id>ossrh</id>
<username>${env.SONATYPE_USERNAME}</username>
<password>${env.SONATYPE_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>
</settings>
53 changes: 51 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
language: java
jdk:
- oraclejdk8
jdk: # jdk versions to test against - https://www.deps.co/guides/travis-ci-latest-java/
# Open JDK support: https://adoptopenjdk.net/support.html
- openjdk8 # LTS through at least 2023.09
# It would be nice to test these, but multiple tests mean that Travis will do multiple
# deploys, only one of which would succeed.
#- openjdk11 # LTS through at least 2022.09
#- openjdk-ea # early release - allow failures, but be aware that there *are* errors

matrix:
allow_failures: # https://docs.travis-ci.com/user/build-matrix/#rows-that-are-allowed-to-fail
- jdk: openjdk-ea # allow early access version to fail

before_install:
## export GPG details
- echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import
- echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust

install:
mvn --settings .maven.xml install -DskipTests=true -Dgpg.skip -Dmaven.javadoc.skip=true -B -V

script:
## Build and release to maven central
mvn clean deploy --settings .maven.xml -DskipTests=true -B -U -P prepare_release

before_deploy:
# Begin Extract the project version
- mvn help:evaluate -N -Dexpression=project.version|grep -v '\['
- export project_version=$(mvn help:evaluate -N -Dexpression=project.version|grep -v '\[')
# End Extract

deploy:
draft: false # set draft to true for testing - creates a draft build accessible only by collaborators
name: $project_version # use the project version extracted in before_deploy as the name
skip_cleanup: true # don't cleanup - we need the artifacts for deploying

on:
repo: gettyimages/gettyimages-api_java
tags: true # only build tagged commits

file:
- gettyimagesapi-sdk/target/gettyimagesapi-sdk-$project_version.jar


provider: releases # https://docs.travis-ci.com/user/deployment/releases

# GITHUB_PERSONAL_ACCESS_TOKEN is an environment variable set in Travis-CI
# https://travis-ci.org/gettyimages/gettyimages-api_java/settings
# https://stackoverflow.com/questions/33735992/travis-ci-using-repository-environment-variables-in-travis-yml
# It must be enabled for the branch you're working on. NOTE: you can't use an environment variable because they're not set here.
api_key:
secure: pJkTcxWJUO0eJK6fH5D7Vb3BEQoc9tnKGX5pTa7n6OCqJU3qQHJVVpAphoCW5BfYQl1A7svNYGNZh7l/quzznxhBLS1HoV78AJcM4PnL1L/WuSgSIHDwOUZpZ1xctqMcZFh1+oavR4tRTk/mvcjBmUrcR1nOgctdx19i5/FzN7AlVwQZDZi80pd1Q/XnK0ID71GDQ0Zrb0w3Txi4/xHgsDbkN6By0wdCKd3slnYX6Bdd3zLSSGYmqdWWHMUgWrU8yMXwAP5G0lgksNBKv71JxBx6ZJE0QOeqvbIeIn9zLbRxHQKgbw9gJBeXHmlQBcbE+yJ5SqAfuPguSWQRs9PbCEx4GiXvgnU2G45qIBDm5d+82U+Sag+fLdl1/tktnVX7Hn6rJHGWUme/91wObvQRIV52CmV2+G3e49hR5DkNN7+yd/aL6fBTmT5wLKyabI2wf3birmlRScYtKT7uhi4pbBbolDJKubizegJB/48VhKHj6s4XujTCycorE9ucHLbgaAEDQID3inMvHy/fCH0PucAsToae+Yu+MmbSqqsu/899M2jzckCB42oWwseaFmKfGWTdrIwWkz5Bjp73f9dpcD25zo3q9gIFrbuyv2+XJMkQj2OLpTXXK84RW13YsMD8DmrEQya9rFhJsnN8uujoRBk4L9yCYy/PqfST9DV56vQ=
26 changes: 20 additions & 6 deletions gettyimagesapi-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.gettyimages</groupId>
<artifactId>gettyimagesapi-sdk</artifactId>
<version>3.0.0</version>
<version>3.0.3</version>
<name>gettyimagesapi-sdk</name>
<description>A SDK for Getty Images API</description>
<url>http://api.gettyimages.com</url>
Expand Down Expand Up @@ -34,6 +34,17 @@
<url>https://github.com/gettyimages/gettyimages-api_java</url>
</scm>

<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>

<dependencies>
<dependency>
<groupId>org.json</groupId>
Expand Down Expand Up @@ -106,18 +117,18 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -130,7 +141,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<version>2.10.4</version>
<configuration>
<source>8</source>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -143,7 +157,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down
13 changes: 12 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.gettyimages</groupId>
<artifactId>gettyimagesapi</artifactId>
<version>3.0.0</version>
<version>3.0.3</version>
<packaging>pom</packaging>

<name>gettyimagesapi</name>
Expand All @@ -17,4 +17,15 @@
<modules>
<module>gettyimagesapi-sdk</module>
</modules>

<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 a75fd60

Please sign in to comment.