Skip to content

Commit 35db15b

Browse files
authored
Merge pull request #1 from codecentric/codecentric-refactoring
Codecentric refactoring
2 parents a5c3a6b + 29d6b3d commit 35db15b

File tree

224 files changed

+1455
-1294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+1455
-1294
lines changed

.github/workflows/maven.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Maven Build
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
10+
- uses: actions/checkout@v2
11+
12+
- name: Set up JDK 11
13+
uses: actions/setup-java@v1
14+
with:
15+
java-version: 11
16+
17+
- name: Build with Maven
18+
run: mvn -B install --no-transfer-progress --file pom.xml
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: release-to-maven-central
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
releaseversion:
6+
description: 'Release version'
7+
required: true
8+
default: '1.1.0'
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- run: echo "Will start a Maven Central upload with version ${{ github.event.inputs.releaseversion }}"
14+
15+
- uses: actions/checkout@v2
16+
17+
- name: Set up settings.xml for Maven Central Repository
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 11
21+
server-id: oss.sonatype.org
22+
server-username: MAVEN_USERNAME
23+
server-password: MAVEN_PASSWORD
24+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
25+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
26+
27+
- name: Set projects Maven version to GitHub Action GUI set version
28+
run: mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}" --no-transfer-progress
29+
30+
- name: Publish package
31+
run: mvn --batch-mode clean deploy --no-transfer-progress -P central-deploy -DskipTests=true
32+
env:
33+
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
34+
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
35+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
36+
37+
- name: Generate changelog
38+
id: changelog
39+
uses: metcalfc/changelog-generator@v0.4.4
40+
with:
41+
myToken: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Create GitHub Release
44+
id: create_release
45+
uses: actions/create-release@v1
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
with:
49+
tag_name: ${{ github.event.inputs.releaseversion }}
50+
release_name: ${{ github.event.inputs.releaseversion }}
51+
body: |
52+
Grab the new version from Maven central https://repo1.maven.org/maven2/de/codecentric/reedelk/reedelk-runtime/${{ github.event.inputs.releaseversion }}/
53+
### Things that changed in this release
54+
${{ steps.changelog.outputs.changelog }}
55+
draft: false
56+
prerelease: false

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ REST components and connectors for Reedelk Integration Platform: https://www.ree
44

55
### Creating a test only SSL Certificate
66

7-
* Create a certificate with com.reedelk.rest.utils.SelfSignedCertificateBuilder
7+
* Create a certificate with SelfSignedCertificateBuilder
88
* cacerts file (stores the certificates) is in the Java Home (e.g /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/jre/lib/security)
99
* List certificates: keytool -list -keystore cacerts
1010
* Delete certificate (by given alias): sudo keytool -delete -alias reedelktest -keystore cacerts

pom.xml

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

77
<parent>
8-
<groupId>com.reedelk</groupId>
8+
<groupId>de.codecentric.reedelk</groupId>
99
<artifactId>module-parent</artifactId>
10-
<version>1.0.6</version>
10+
<version>2.0.0</version>
1111
</parent>
1212

1313
<packaging>bundle</packaging>
14-
<version>1.0.6</version>
14+
<version>2.0.0</version>
1515
<artifactId>module-rest</artifactId> <!-- NAME_CONVENTION -->
1616

1717
<properties>
18-
<reedelk.openapi.version>1.0.6</reedelk.openapi.version>
18+
<reedelk.openapi.version>2.0.0</reedelk.openapi.version>
1919
<maven.compiler.release>8</maven.compiler.release>
2020
<reactor.addons.version>3.3.3.RELEASE</reactor.addons.version>
2121
<reactor.netty.version>0.9.8.RELEASE</reactor.netty.version>
@@ -29,6 +29,14 @@
2929
<jacoco.version>0.8.2</jacoco.version>
3030
<mockito.version>2.23.0</mockito.version>
3131
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
32+
33+
<!-- Maven Central Release tools -->
34+
<versions-maven-plugin.version>2.8.1</versions-maven-plugin.version>
35+
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
36+
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
37+
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
38+
<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
39+
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
3240
</properties>
3341

3442
<dependencies>
@@ -43,7 +51,7 @@
4351
<version>${reactor.addons.version}</version>
4452
</dependency>
4553
<dependency>
46-
<groupId>com.reedelk</groupId>
54+
<groupId>de.codecentric.reedelk</groupId>
4755
<artifactId>reedelk-openapi</artifactId>
4856
<version>${reedelk.openapi.version}</version>
4957
</dependency>
@@ -154,4 +162,96 @@
154162
</plugin>
155163
</plugins>
156164
</build>
165+
<profiles>
166+
<!-- plugins needed to deploy to Maven Central -->
167+
<profile>
168+
<id>central-deploy</id>
169+
<build>
170+
<plugins>
171+
<plugin>
172+
<artifactId>maven-gpg-plugin</artifactId>
173+
<version>${maven-gpg-plugin.version}</version>
174+
<executions>
175+
<execution>
176+
<id>sign-artifacts</id>
177+
<phase>verify</phase>
178+
<goals>
179+
<goal>sign</goal>
180+
</goals>
181+
<configuration>
182+
<!-- This is necessary for gpg to not try to use the pinentry programs -->
183+
<gpgArguments>
184+
<arg>--pinentry-mode</arg>
185+
<arg>loopback</arg>
186+
</gpgArguments>
187+
</configuration>
188+
</execution>
189+
</executions>
190+
</plugin>
191+
<plugin>
192+
<groupId>org.codehaus.mojo</groupId>
193+
<artifactId>versions-maven-plugin</artifactId>
194+
<version>${versions-maven-plugin.version}</version>
195+
<configuration>
196+
<generateBackupPoms>false</generateBackupPoms>
197+
</configuration>
198+
</plugin>
199+
<plugin>
200+
<artifactId>maven-deploy-plugin</artifactId>
201+
<version>${maven-deploy-plugin.version}</version>
202+
<configuration>
203+
<skip>true</skip>
204+
</configuration>
205+
</plugin>
206+
<plugin>
207+
<groupId>org.apache.maven.plugins</groupId>
208+
<artifactId>maven-source-plugin</artifactId>
209+
<version>${maven-source-plugin.version}</version>
210+
<executions>
211+
<execution>
212+
<id>attach-sources</id>
213+
<goals>
214+
<goal>jar</goal>
215+
</goals>
216+
</execution>
217+
</executions>
218+
</plugin>
219+
<plugin>
220+
<groupId>org.apache.maven.plugins</groupId>
221+
<artifactId>maven-javadoc-plugin</artifactId>
222+
<version>${maven-javadoc-plugin.version}</version>
223+
<executions>
224+
<execution>
225+
<id>attach-javadocs</id>
226+
<goals>
227+
<goal>jar</goal>
228+
</goals>
229+
</execution>
230+
</executions>
231+
</plugin>
232+
<plugin>
233+
<groupId>org.sonatype.plugins</groupId>
234+
<artifactId>nexus-staging-maven-plugin</artifactId>
235+
<version>${nexus-staging-maven-plugin.version}</version>
236+
<extensions>true</extensions>
237+
<configuration>
238+
<serverId>oss.sonatype.org</serverId>
239+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
240+
<description>${project.version}</description>
241+
</configuration>
242+
<executions>
243+
<execution>
244+
<id>deploy-to-sonatype</id>
245+
<phase>deploy</phase>
246+
<goals>
247+
<goal>deploy</goal>
248+
<goal>release</goal>
249+
</goals>
250+
</execution>
251+
</executions>
252+
</plugin>
253+
</plugins>
254+
</build>
255+
</profile>
256+
</profiles>
157257
</project>

src/main/java/com/reedelk/rest/ModuleDefinition.java

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/main/java/com/reedelk/rest/component/client/Proxy.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/main/java/com/reedelk/rest/component/listener/openapi/v3/PredefinedSchema.java

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package de.codecentric.reedelk.rest;
2+
3+
import de.codecentric.reedelk.runtime.api.annotation.Module;
4+
5+
@Module("REST Module")
6+
public class ModuleDefinition {
7+
}

src/main/java/com/reedelk/rest/component/MultipartMessage.java renamed to src/main/java/de/codecentric/reedelk/rest/component/MultipartMessage.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
package com.reedelk.rest.component;
2-
3-
import com.reedelk.rest.component.multipart.PartDefinition;
4-
import com.reedelk.runtime.api.annotation.*;
5-
import com.reedelk.runtime.api.commons.StringUtils;
6-
import com.reedelk.runtime.api.component.ProcessorSync;
7-
import com.reedelk.runtime.api.flow.FlowContext;
8-
import com.reedelk.runtime.api.message.Message;
9-
import com.reedelk.runtime.api.message.MessageBuilder;
10-
import com.reedelk.runtime.api.message.content.Attachment;
11-
import com.reedelk.runtime.api.message.content.MimeType;
12-
import com.reedelk.runtime.api.script.ScriptEngineService;
13-
import com.reedelk.runtime.api.script.dynamicmap.DynamicStringMap;
14-
import com.reedelk.runtime.api.script.dynamicvalue.DynamicByteArray;
1+
package de.codecentric.reedelk.rest.component;
2+
3+
import de.codecentric.reedelk.rest.component.multipart.PartDefinition;
4+
import de.codecentric.reedelk.runtime.api.annotation.*;
5+
import de.codecentric.reedelk.runtime.api.commons.StringUtils;
6+
import de.codecentric.reedelk.runtime.api.component.ProcessorSync;
7+
import de.codecentric.reedelk.runtime.api.flow.FlowContext;
8+
import de.codecentric.reedelk.runtime.api.message.Message;
9+
import de.codecentric.reedelk.runtime.api.message.MessageBuilder;
10+
import de.codecentric.reedelk.runtime.api.message.content.Attachment;
11+
import de.codecentric.reedelk.runtime.api.message.content.MimeType;
12+
import de.codecentric.reedelk.runtime.api.script.ScriptEngineService;
13+
import de.codecentric.reedelk.runtime.api.script.dynamicmap.DynamicStringMap;
14+
import de.codecentric.reedelk.runtime.api.script.dynamicvalue.DynamicByteArray;
1515
import org.osgi.service.component.annotations.Component;
1616
import org.osgi.service.component.annotations.Reference;
1717

src/main/java/com/reedelk/rest/component/RESTClient.java renamed to src/main/java/de/codecentric/reedelk/rest/component/RESTClient.java

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
package com.reedelk.rest.component;
2-
3-
import com.reedelk.rest.component.client.BufferConfiguration;
4-
import com.reedelk.rest.internal.attribute.RESTClientAttributes;
5-
import com.reedelk.rest.internal.client.HttpClient;
6-
import com.reedelk.rest.internal.client.HttpClientFactory;
7-
import com.reedelk.rest.internal.client.HttpClientResultCallback;
8-
import com.reedelk.rest.internal.client.body.BodyEvaluator;
9-
import com.reedelk.rest.internal.client.body.BodyProvider;
10-
import com.reedelk.rest.internal.client.header.HeaderProvider;
11-
import com.reedelk.rest.internal.client.header.HeadersEvaluator;
12-
import com.reedelk.rest.internal.client.strategy.ExecutionStrategyBuilder;
13-
import com.reedelk.rest.internal.client.strategy.Strategy;
14-
import com.reedelk.rest.internal.client.uri.UriEvaluator;
15-
import com.reedelk.rest.internal.client.uri.UriProvider;
16-
import com.reedelk.rest.internal.commons.RestMethod;
17-
import com.reedelk.rest.internal.commons.StreamingMode;
18-
import com.reedelk.runtime.api.annotation.*;
19-
import com.reedelk.runtime.api.component.OnResult;
20-
import com.reedelk.runtime.api.component.ProcessorAsync;
21-
import com.reedelk.runtime.api.converter.ConverterService;
22-
import com.reedelk.runtime.api.flow.FlowContext;
23-
import com.reedelk.runtime.api.message.Message;
24-
import com.reedelk.runtime.api.script.ScriptEngineService;
25-
import com.reedelk.runtime.api.script.dynamicmap.DynamicStringMap;
26-
import com.reedelk.runtime.api.script.dynamicvalue.DynamicObject;
1+
package de.codecentric.reedelk.rest.component;
2+
3+
import de.codecentric.reedelk.rest.component.client.BufferConfiguration;
4+
import de.codecentric.reedelk.rest.internal.attribute.RESTClientAttributes;
5+
import de.codecentric.reedelk.rest.internal.client.HttpClient;
6+
import de.codecentric.reedelk.rest.internal.client.HttpClientFactory;
7+
import de.codecentric.reedelk.rest.internal.client.HttpClientResultCallback;
8+
import de.codecentric.reedelk.rest.internal.client.body.BodyEvaluator;
9+
import de.codecentric.reedelk.rest.internal.client.body.BodyProvider;
10+
import de.codecentric.reedelk.rest.internal.client.header.HeaderProvider;
11+
import de.codecentric.reedelk.rest.internal.client.header.HeadersEvaluator;
12+
import de.codecentric.reedelk.rest.internal.client.strategy.ExecutionStrategyBuilder;
13+
import de.codecentric.reedelk.rest.internal.client.strategy.Strategy;
14+
import de.codecentric.reedelk.rest.internal.client.uri.UriEvaluator;
15+
import de.codecentric.reedelk.rest.internal.client.uri.UriProvider;
16+
import de.codecentric.reedelk.rest.internal.commons.RestMethod;
17+
import de.codecentric.reedelk.rest.internal.commons.StreamingMode;
18+
import de.codecentric.reedelk.runtime.api.annotation.*;
19+
import de.codecentric.reedelk.runtime.api.component.OnResult;
20+
import de.codecentric.reedelk.runtime.api.component.ProcessorAsync;
21+
import de.codecentric.reedelk.runtime.api.converter.ConverterService;
22+
import de.codecentric.reedelk.runtime.api.flow.FlowContext;
23+
import de.codecentric.reedelk.runtime.api.message.Message;
24+
import de.codecentric.reedelk.runtime.api.script.ScriptEngineService;
25+
import de.codecentric.reedelk.runtime.api.script.dynamicmap.DynamicStringMap;
26+
import de.codecentric.reedelk.runtime.api.script.dynamicvalue.DynamicObject;
2727
import org.osgi.service.component.annotations.Component;
2828
import org.osgi.service.component.annotations.Reference;
2929

0 commit comments

Comments
 (0)