Skip to content

Commit b1387b7

Browse files
committed
added travis + readme + extended pom for release
1 parent 85df234 commit b1387b7

File tree

7 files changed

+220
-6
lines changed

7 files changed

+220
-6
lines changed

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: java
2+
jdk:
3+
- openjdk8
4+
## gpg stuff
5+
before_install:
6+
- if [ ! -z "$GPG_EXECUTABLE" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
7+
- if [ ! -z "$GPG_EXECUTABLE" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
8+
## default build
9+
script: mvn --settings .travis/settings.xml -U clean verify
10+
## release on tag
11+
deploy:
12+
- provider: script
13+
script: ".travis/deploy.sh"
14+
skip_cleanup: true
15+
on:
16+
tags: true
17+
## disable emailing
18+
#notifications:
19+
# email: false

.travis/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# how to deploy to sonartype
2+
3+
the travis build will perform an deploy in case of an tag
4+
5+
````bash
6+
git tag ${versionNumber}
7+
git push --tags
8+
````
9+
10+
the given tag-name will be used as version...

.travis/deploy.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
# only do deployment, when travis detects a new tag
6+
if [ ! -z "$TRAVIS_TAG" ]
7+
then
8+
echo "on a tag -> set pom.xml <version> to $TRAVIS_TAG"
9+
mvn versions:set -DnewVersion=$TRAVIS_TAG
10+
mvn versions:commit
11+
12+
echo "version set now perform deploy"
13+
mvn --settings .travis/settings.xml clean deploy -DskipTests=true -B -U -Prelease
14+
else
15+
echo "not on a tag -> keep snapshot version in pom.xml"
16+
fi

.travis/settings.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
http://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
<servers>
6+
<server>
7+
<!-- Maven Central Deployment -->
8+
<id>ossrh</id>
9+
<username>${env.SONATYPE_USERNAME}</username>
10+
<password>${env.SONATYPE_PASSWORD}</password>
11+
</server>
12+
</servers>
13+
<profiles>
14+
<profile>
15+
<id>ossrh</id>
16+
<activation>
17+
<activeByDefault>true</activeByDefault>
18+
</activation>
19+
<properties>
20+
<gpg.executable>${env.GPG_EXECUTABLE}</gpg.executable>
21+
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
22+
</properties>
23+
</profile>
24+
</profiles>
25+
</settings>

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,28 @@
1-
# imgproxy-java
1+
# imgproxy-java
2+
3+
![logo](assets/imgproxy-java-logo.svg)
4+
5+
6+
[![Build Status](https://travis-ci.org/rocketbase-io/imgproxy-java.svg?branch=master)](https://travis-ci.org/rocketbase-io/imgproxy-java)
7+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.rocketbase.commons/imgproxy-java/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.rocketbase.asset/imgproxy)
8+
9+
fluently generate asset urls for img-proxy within java
10+
11+
## example usage
12+
13+
````java
14+
// simple unsigned
15+
String url = Signature.of(new SignatureConfiguration(BASE_URL))
16+
.size(100, 100)
17+
.url(SOURCE_URL)
18+
19+
20+
// advanced with key + salt
21+
Signature signature = Signature.of(new SignatureConfiguration(imgproxyProperties.getBaseurl(),
22+
imgproxyProperties.getKey(),
23+
imgproxyProperties.getSalt()));
24+
25+
signature.resize(ResizeType.fit, 300, 300, true);
26+
String url = signature.url("s3://bucket-name/" + assetReference.getUrlPath());
27+
28+
````

assets/imgproxy-java-logo.svg

Lines changed: 1 addition & 0 deletions
Loading

pom.xml

Lines changed: 121 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,57 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>io.rocketbase.asset</groupId>
66
<artifactId>imgproxy</artifactId>
7-
<version>0.0.1-SNAPSHOT</version>
7+
<version>LATEST-SNAPSHOT</version>
8+
89
<name>imgproxy</name>
9-
<description>URL Generator for imgproxy</description>
10+
<description>fluently generate asset urls for img-proxy within java</description>
11+
<url>https://github.com/rocketbase-io/imgproxy-java/</url>
12+
<inceptionYear>2019</inceptionYear>
13+
14+
<licenses>
15+
<license>
16+
<name>MIT License</name>
17+
<url>https://opensource.org/licenses/MIT</url>
18+
</license>
19+
</licenses>
20+
21+
<issueManagement>
22+
<system>github</system>
23+
<url>https://github.com/rocketbase-io/imgproxy-java/issues</url>
24+
</issueManagement>
25+
26+
<scm>
27+
<connection>scm:git:git://github.com/rocketbase-io/imgproxy-java.git</connection>
28+
<developerConnection>scm:git:[email protected]:rocketbase-io/imgproxy-java.git</developerConnection>
29+
<url>https://github.com/rocketbase-io/imgproxy-java/tree/master/</url>
30+
</scm>
31+
32+
<developers>
33+
<developer>
34+
<name>Niels Schelbach</name>
35+
<id>captainnilo</id>
36+
<email>[email protected]</email>
37+
<organization>rocketbase.io software productions GmbH</organization>
38+
</developer>
39+
<developer>
40+
<name>Marten Prieß</name>
41+
<id>melistik</id>
42+
<email>[email protected]</email>
43+
<organization>rocketbase.io software productions GmbH</organization>
44+
</developer>
45+
</developers>
46+
47+
<distributionManagement>
48+
<snapshotRepository>
49+
<id>ossrh</id>
50+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
51+
</snapshotRepository>
52+
<repository>
53+
<id>ossrh</id>
54+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
55+
</repository>
56+
</distributionManagement>
57+
1058

1159
<properties>
1260
<java.version>1.8</java.version>
@@ -15,26 +63,94 @@
1563
<maven.compiler.source>1.8</maven.compiler.source>
1664
<maven.compiler.target>1.8</maven.compiler.target>
1765
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
66+
67+
<guava.version>28.1-jre</guava.version>
68+
<lombok.version>1.18.10</lombok.version>
69+
<junit.version>4.12</junit.version>
1870
</properties>
1971

2072
<dependencies>
2173
<dependency>
2274
<groupId>com.google.guava</groupId>
2375
<artifactId>guava</artifactId>
24-
<version>28.1-jre</version>
76+
<version>${guava.version}</version>
2577
</dependency>
2678
<dependency>
2779
<groupId>org.projectlombok</groupId>
2880
<artifactId>lombok</artifactId>
29-
<version>1.18.10</version>
81+
<version>${lombok.version}</version>
3082
<scope>provided</scope>
3183
</dependency>
3284
<dependency>
3385
<groupId>junit</groupId>
3486
<artifactId>junit</artifactId>
35-
<version>4.12</version>
87+
<version>${junit.version}</version>
3688
<scope>test</scope>
3789
</dependency>
3890
</dependencies>
3991

92+
<profiles>
93+
<profile>
94+
<id>release</id>
95+
<build>
96+
<plugins>
97+
<plugin>
98+
<groupId>org.sonatype.plugins</groupId>
99+
<artifactId>nexus-staging-maven-plugin</artifactId>
100+
<version>1.6.8</version>
101+
<extensions>true</extensions>
102+
<configuration>
103+
<serverId>ossrh</serverId>
104+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
105+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
106+
</configuration>
107+
</plugin>
108+
<plugin>
109+
<groupId>org.apache.maven.plugins</groupId>
110+
<artifactId>maven-source-plugin</artifactId>
111+
<version>3.0.1</version>
112+
<executions>
113+
<execution>
114+
<id>attach-sources</id>
115+
<goals>
116+
<goal>jar-no-fork</goal>
117+
</goals>
118+
</execution>
119+
</executions>
120+
</plugin>
121+
<plugin>
122+
<groupId>org.apache.maven.plugins</groupId>
123+
<artifactId>maven-javadoc-plugin</artifactId>
124+
<version>3.0.0</version>
125+
<executions>
126+
<execution>
127+
<id>attach-javadocs</id>
128+
<goals>
129+
<goal>jar</goal>
130+
</goals>
131+
<configuration>
132+
<doclint>none</doclint>
133+
</configuration>
134+
</execution>
135+
</executions>
136+
</plugin>
137+
<plugin>
138+
<groupId>org.apache.maven.plugins</groupId>
139+
<artifactId>maven-gpg-plugin</artifactId>
140+
<version>1.6</version>
141+
<executions>
142+
<execution>
143+
<id>sign-artifacts</id>
144+
<phase>verify</phase>
145+
<goals>
146+
<goal>sign</goal>
147+
</goals>
148+
</execution>
149+
</executions>
150+
</plugin>
151+
</plugins>
152+
</build>
153+
</profile>
154+
</profiles>
155+
40156
</project>

0 commit comments

Comments
 (0)