Skip to content

Commit a51aee1

Browse files
committed
2.0 release
1 parent c4c7fdd commit a51aee1

File tree

6 files changed

+56
-23
lines changed

6 files changed

+56
-23
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ install:
88
- mvn -B install -U
99

1010
after_success:
11-
- util/deploy_snapshot.sh
11+
# - util/deploy.sh
1212
- util/deploy_docs.sh
1313

1414
branches:

pom.xml

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
<version>2.0</version>
88
<packaging>jar</packaging>
99

10-
<parent>
11-
<groupId>org.sonatype.oss</groupId>
12-
<artifactId>oss-parent</artifactId>
13-
<version>7</version>
14-
</parent>
15-
1610
<properties>
1711
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1812
</properties>
@@ -39,7 +33,19 @@
3933
<url>[email protected]:ipinfo/java.git</url>
4034
<connection>scm:git:[email protected]:ipinfo/java.git</connection>
4135
<developerConnection>scm:git:[email protected]:ipinfo/java.git</developerConnection>
42-
</scm>
36+
<tag>HEAD</tag>
37+
</scm>
38+
39+
<distributionManagement>
40+
<snapshotRepository>
41+
<id>ossrh</id>
42+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
43+
</snapshotRepository>
44+
<repository>
45+
<id>ossrh</id>
46+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
47+
</repository>
48+
</distributionManagement>
4349

4450
<developers>
4551
<developer>
@@ -105,6 +111,17 @@
105111
</resources>
106112

107113
<plugins>
114+
<plugin>
115+
<groupId>org.sonatype.plugins</groupId>
116+
<artifactId>nexus-staging-maven-plugin</artifactId>
117+
<version>1.6.8</version>
118+
<extensions>true</extensions>
119+
<configuration>
120+
<serverId>ossrh</serverId>
121+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
122+
<autoReleaseAfterClose>false</autoReleaseAfterClose>
123+
</configuration>
124+
</plugin>
108125
<plugin>
109126
<groupId>org.apache.maven.plugins</groupId>
110127
<artifactId>maven-compiler-plugin</artifactId>
@@ -141,6 +158,28 @@
141158
</execution>
142159
</executions>
143160
</plugin>
161+
<plugin>
162+
<groupId>org.apache.maven.plugins</groupId>
163+
<artifactId>maven-release-plugin</artifactId>
164+
<version>2.5.3</version>
165+
<configuration>
166+
<goals>deploy</goals>
167+
</configuration>
168+
</plugin>
169+
<plugin>
170+
<groupId>org.apache.maven.plugins</groupId>
171+
<artifactId>maven-gpg-plugin</artifactId>
172+
<version>1.5</version>
173+
<executions>
174+
<execution>
175+
<id>sign-artifacts</id>
176+
<phase>verify</phase>
177+
<goals>
178+
<goal>sign</goal>
179+
</goals>
180+
</execution>
181+
</executions>
182+
</plugin>
144183
</plugins>
145184
</build>
146185
</project>

src/test/java/io/ipinfo/IPinfoTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public void testGetBatchAsns() {
228228
() -> assertEquals(res2.getRegistry(), "arin"),
229229
() -> assertEquals(res2.getDomain(), "mail.mil"),
230230
() -> assertEquals(res2.getNumIps(), new Integer(66048)),
231-
() -> assertEquals(res2.getType(), "business")
231+
() -> assertEquals(res2.getType(), "isp")
232232
);
233233
} catch (RateLimitedException e) {
234234
fail(e);
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ function mvn_deploy() {
66
mvn clean source:jar javadoc:jar deploy --settings="$(dirname $0)/settings.xml"
77
}
88

9-
10-
if [ "$TRAVIS_REPO_SLUG" == "ipinfo/java" ] && \
11-
[ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && \
12-
[ "$TRAVIS_PULL_REQUEST" == "false" ] && \
9+
if [ "$TRAVIS_REPO_SLUG" == "ipinfo/java" ] && \
10+
[ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && \
11+
[ "$TRAVIS_PULL_REQUEST" == "false" ] && \
1312
[ "$TRAVIS_BRANCH" == "master" ]; then
1413
echo "Publishing Maven snapshot..."
15-
1614
mvn_deploy
1715
echo "Maven snapshot published."
1816
fi

util/deploy_docs.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,22 @@
22

33
set -e -u
44

5-
6-
if [ "$TRAVIS_REPO_SLUG" == "ipinfo/java" ] && \
7-
[ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && \
8-
[ "$TRAVIS_PULL_REQUEST" == "false" ] && \
5+
if [ "$TRAVIS_REPO_SLUG" == "ipinfo/java" ] && \
6+
[ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && \
7+
[ "$TRAVIS_PULL_REQUEST" == "false" ] && \
98
[ "$TRAVIS_BRANCH" == "master" ]; then
109
echo "Publishing Javadoc and JDiff..."
1110
git config --global user.email "[email protected]"
1211
git config --global user.name "travis-ci"
1312

14-
cd java-ipinfo/target
13+
cd ./target
1514

1615
git clone -q -b gh-pages https://${GH_TOKEN}@github.com/ipinfo/java gh-pages > /dev/null
1716
cd gh-pages
18-
1917
cp -rf ../apidocs/* .
2018

2119
git add --all
22-
2320
git commit -m "Deploy javadocs to GitHub Pages Travis build: ${TRAVIS_BUILD_NUMBER}" -m "Commit: ${TRAVIS_COMMIT}"
24-
2521
git push -fq origin gh-pages > /dev/null
2622

2723
echo "Javadoc and JDiff published to gh-pages."

util/settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
44
<servers>
55
<server>
6-
<id>sonatype-nexus-snapshots</id>
6+
<id>ossrh</id>
77
<username>${env.CI_DEPLOY_USERNAME}</username>
88
<password>${env.CI_DEPLOY_PASSWORD}</password>
99
</server>

0 commit comments

Comments
 (0)