Skip to content

Commit

Permalink
Set up jack to publish to central
Browse files Browse the repository at this point in the history
  • Loading branch information
bpodgursky committed Jun 16, 2019
1 parent ba6ad57 commit af49570
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 41 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language:
rvm:
- '2.3'
jdk:
- oraclejdk8
- openjdk10
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
Expand All @@ -26,8 +26,15 @@ before_deploy:
- openssl aes-256-cbc -K $encrypted_498697054cdc_key -iv $encrypted_498697054cdc_iv
-in .travis/gpg.asc.enc -out .travis/gpg.asc -d
deploy:
-
skip_cleanup: true
provider: script
script: rvm use $TRAVIS_RUBY_VERSION do ./deploy
on:
branch: master
-
skip_cleanup: true
provider: script
script: rvm use $TRAVIS_RUBY_VERSION do ./deploy
on:
tags: true
8 changes: 8 additions & 0 deletions deploy
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,13 @@ fi
# beforehand)
gpg --fast-import .travis/gpg.asc

if [ ! -z "$TRAVIS_TAG" ]
then
echo "on a tag -> set pom.xml <version> to $TRAVIS_TAG"
mvn --settings "${TRAVIS_BUILD_DIR}/.travis/mvn-settings.xml" org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=$TRAVIS_TAG 1>/dev/null 2>/dev/null
else
echo "not on a tag -> keep snapshot version in pom.xml"
fi

# Run the maven deploy steps
mvn deploy -P publish -DskipTests=true --settings "${TRAVIS_BUILD_DIR}/.travis/mvn-settings.xml"
70 changes: 30 additions & 40 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.liveramp</groupId>
<artifactId>jack</artifactId>
<version>1.2-SNAPSHOT</version>
<packaging>pom</packaging>

<parent>
<groupId>com.liveramp</groupId>
<artifactId>pom-common</artifactId>
<version>1.1-SNAPSHOT</version>
</parent>

<name>Jack</name>
<description>A set of scripts for generating fully functional Java database models from Ruby's ActiveRecord models and migrations.</description>
<description>A set of scripts for generating fully functional Java database models from Ruby's ActiveRecord models and
migrations.
</description>
<developers>
<developer>
<name>LiveRamp Engineering</name>
Expand Down Expand Up @@ -58,33 +55,26 @@
<module>jack-test</module>
</modules>

<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>sonatype-releases</id>
<url>http://oss.sonatype.org/content/repositories/releases</url>
</pluginRepository>
<pluginRepository>
<id>clojars.org</id>
<url>http://clojars.org/repo</url>
</pluginRepository>
</pluginRepositories>

<build>
<plugins>

<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<version>1.3.2</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<release>8</release>
</configuration>
</plugin>

</plugins>
</build>

Expand All @@ -95,17 +85,17 @@
<plugins>
<!-- Used to build a JAR containing the source code from this project -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Used to generate javadocs for this project -->
Expand All @@ -115,8 +105,8 @@
<version>3.0.0</version>
<executions>
<execution>
<!-- Disable javadoc linting until CD is setup, then you
can enable it if you'd like -->
<!-- Disable javadoc linting until CD is setup, then you
can enable it if you'd like -->
<configuration>
<doclint>none</doclint>
</configuration>
Expand Down

0 comments on commit af49570

Please sign in to comment.