Skip to content

Commit d28763f

Browse files
authored
Merge pull request #2 from arago/development
Development
2 parents 73e588c + b61eed1 commit d28763f

15 files changed

Lines changed: 159 additions & 31 deletions

File tree

.github/workflows/maven-publish.yml renamed to .github/workflows/maven-publish-github.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
name: Maven CI
55

66
on:
7-
release:
8-
types: [ created ]
97
push:
108
tags:
119
- t*
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2+
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-Apache-Maven
3+
4+
name: Maven CI
5+
6+
on:
7+
release:
8+
types: [ created ]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up JDK 11
21+
uses: actions/setup-java@v2
22+
with:
23+
java-version: '11'
24+
distribution: 'adopt'
25+
cache: maven
26+
- name: Install gpg secret key
27+
run: |
28+
cat <(echo -e "${{ secrets.ARAGO_GPG_KEY }}") | gpg --batch --import
29+
gpg --list-secret-keys --keyid-format LONG
30+
- name: Set up Maven Central Repository
31+
uses: actions/setup-java@v2
32+
with:
33+
java-version: '11'
34+
distribution: 'adopt'
35+
server-id: ossrh
36+
server-username: MAVEN_USERNAME
37+
server-password: MAVEN_PASSWORD
38+
- name: Publish to Maven Central Repository
39+
run: make deploy
40+
env:
41+
MVN_OPTIONS: "--batch-mode --no-transfer-progress -DuseRepo=global -Dgpg.passphrase=${{ secrets.ARAGO_GPG_KEY_PASSWORD }}"
42+
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USER }}
43+
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# v0.1.2
2+
3+
Make API classes extendable
4+
5+
# v0.1.1
6+
7+
Deployment fixes
8+
19
# v0.1.0
210

311
Initial release

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ implemented are `app`, `auth`, `graph`, `event-ws` and `action-ws` )
1717

1818
You need at least Java 11.
1919

20-
https://github.com/arago/java-project and the respective packages under https://github.com/orgs/arago/packages.
20+
https://github.com/arago/java-project and the respective packages under https://github.com/orgs/arago/packages or
21+
the Maven Central Library.
2122

2223
## Quickstart
2324

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.0
1+
0.1.2

pom.xml

Lines changed: 80 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<modelVersion>4.0.0</modelVersion>
66

77
<groupId>co.arago.hiro.client</groupId>
8-
<artifactId>java-hiro-clients</artifactId>
9-
<version>0.1.0</version>
8+
<artifactId>hiro-client-java</artifactId>
9+
<version>0.1.2</version>
1010

1111
<organization>
1212
<name>arago GmbH</name>
@@ -17,10 +17,24 @@
1717
<description>
1818
This project is a library to access the Graph API of HIRO
1919
</description>
20-
<url>https://github.com/arago/java-hiro-clients</url>
20+
<url>https://github.com/arago/hiro-client-java</url>
21+
22+
<developers>
23+
<developer>
24+
<id>whuebner</id>
25+
<name>Wolfgang Hübner</name>
26+
<email>whuebner@arago.co</email>
27+
<organization>arago GmbH</organization>
28+
<organizationUrl>https://www.arago.co</organizationUrl>
29+
<roles>
30+
<role>Developer</role>
31+
</roles>
32+
<timezone>Europe/Berlin</timezone>
33+
</developer>
34+
</developers>
2135

2236
<scm>
23-
<url>scm:git:https://github.com/arago/java-hiro-clients.git</url>
37+
<url>scm:git:https://github.com/arago/hiro-client-java.git</url>
2438
</scm>
2539

2640
<licenses>
@@ -52,20 +66,68 @@
5266
</repository>
5367
</repositories>
5468

55-
<distributionManagement>
56-
<repository>
57-
<id>github</id>
58-
<uniqueVersion>false</uniqueVersion>
59-
<name>arago GitHub Maven Repository</name>
60-
<url>https://maven.pkg.github.com/arago/repository-public</url>
61-
</repository>
62-
<snapshotRepository>
63-
<id>github</id>
64-
<uniqueVersion>false</uniqueVersion>
65-
<name>arago GitHub Maven Repository</name>
66-
<url>https://maven.pkg.github.com/arago/repository-public</url>
67-
</snapshotRepository>
68-
</distributionManagement>
69+
<profiles>
70+
<profile>
71+
<id>github-repositories</id>
72+
<activation>
73+
<property>
74+
<name>!useRepo</name>
75+
</property>
76+
</activation>
77+
<distributionManagement>
78+
<repository>
79+
<id>github</id>
80+
<uniqueVersion>false</uniqueVersion>
81+
<name>arago GitHub Maven Repository</name>
82+
<url>https://maven.pkg.github.com/arago/repository-public</url>
83+
</repository>
84+
<snapshotRepository>
85+
<id>github</id>
86+
<uniqueVersion>false</uniqueVersion>
87+
<name>arago GitHub Maven Repository</name>
88+
<url>https://maven.pkg.github.com/arago/repository-public</url>
89+
</snapshotRepository>
90+
</distributionManagement>
91+
</profile>
92+
<profile>
93+
<id>global-repository</id>
94+
<activation>
95+
<property>
96+
<name>useRepo</name>
97+
<value>global</value>
98+
</property>
99+
</activation>
100+
<distributionManagement>
101+
<snapshotRepository>
102+
<id>ossrh</id>
103+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
104+
</snapshotRepository>
105+
<repository>
106+
<id>ossrh</id>
107+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
108+
</repository>
109+
</distributionManagement>
110+
</profile>
111+
<profile>
112+
<id>arago-private</id>
113+
<activation>
114+
<property>
115+
<name>useRepo</name>
116+
<value>aragoPrivate</value>
117+
</property>
118+
</activation>
119+
<distributionManagement>
120+
<repository>
121+
<id>arago-private</id>
122+
<uniqueVersion>false</uniqueVersion>
123+
</repository>
124+
<snapshotRepository>
125+
<id>arago-private</id>
126+
<uniqueVersion>false</uniqueVersion>
127+
</snapshotRepository>
128+
</distributionManagement>
129+
</profile>
130+
</profiles>
69131

70132
<build>
71133
<plugins>

src/main/java/co/arago/hiro/client/connection/token/EnvironmentTokenAPIHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ public T setTokenEnv(String tokenEnv) {
2727
this.tokenEnv = tokenEnv;
2828
return self();
2929
}
30+
31+
public abstract EnvironmentTokenAPIHandler build();
3032
}
3133

3234
public static final class Builder extends Conf<Builder> {
@@ -58,7 +60,7 @@ protected EnvironmentTokenAPIHandler(Conf<?> builder) {
5860
this.tokenEnv = builder.getTokenEnv();
5961
}
6062

61-
public static Builder newBuilder() {
63+
public static Conf<?> newBuilder() {
6264
return new Builder();
6365
}
6466

src/main/java/co/arago/hiro/client/connection/token/FixedTokenAPIHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public T setToken(String token) {
2929
this.token = token;
3030
return self();
3131
}
32+
33+
public abstract FixedTokenAPIHandler build();
3234
}
3335

3436
public static final class Builder extends Conf<Builder> {
@@ -59,7 +61,7 @@ protected FixedTokenAPIHandler(Conf<Builder> builder) {
5961
this.token = notNull(builder.getToken(), "token");
6062
}
6163

62-
public static Builder newBuilder() {
64+
public static Conf<?> newBuilder() {
6365
return new Builder();
6466
}
6567

src/main/java/co/arago/hiro/client/connection/token/PasswordAuthTokenAPIHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ public T setApiPath(String apiPath) {
166166
this.apiPath = apiPath;
167167
return self();
168168
}
169+
170+
public abstract PasswordAuthTokenAPIHandler build();
169171
}
170172

171173
public static final class Builder extends Conf<Builder> {
@@ -293,7 +295,7 @@ protected PasswordAuthTokenAPIHandler(Conf<?> builder) {
293295
}
294296
}
295297

296-
public static Builder newBuilder() {
298+
public static Conf<?> newBuilder() {
297299
return new Builder();
298300
}
299301

src/main/java/co/arago/hiro/client/rest/AppAPI.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public class AppAPI extends AuthenticatedAPIHandler {
1616
// ###############################################################################################
1717

1818
public static abstract class Conf<T extends Conf<T>> extends AuthenticatedAPIHandler.Conf<T> {
19+
20+
public abstract AppAPI build();
1921
}
2022

2123
public static final class Builder extends Conf<Builder> {
@@ -54,7 +56,7 @@ protected AppAPI(Conf<?> builder) {
5456
* @param tokenAPIHandler The API handler for this websocket.
5557
* @return The {@link Builder} for {@link AppAPI}.
5658
*/
57-
public static Builder newBuilder(AbstractTokenAPIHandler tokenAPIHandler) {
59+
public static Conf<?> newBuilder(AbstractTokenAPIHandler tokenAPIHandler) {
5860
return new Builder("app", tokenAPIHandler);
5961
}
6062

0 commit comments

Comments
 (0)