diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml
new file mode 100644
index 0000000..662a1c3
--- /dev/null
+++ b/.github/workflows/ci-cd.yml
@@ -0,0 +1,85 @@
+name: ci-cd
+
+on:
+ push:
+ branches: [master]
+ tags: [1.*]
+ paths:
+ - ".github/workflows/ci-cd.yml"
+ - "src/**"
+ - "pom.xml"
+ # pull_request:
+ # branches: [master]
+ schedule:
+ # ┌───────────── minute (0 - 59)
+ # │ ┌───────────── hour (0 - 23)
+ # │ │ ┌───────────── day of the month (1 - 31)
+ # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
+ # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
+ # │ │ │ │ │
+ # │ │ │ │ │
+ # │ │ │ │ │
+ # * * * * *
+ - cron: "15 1 * * *"
+
+permissions:
+ contents: write
+
+concurrency:
+ group: ci-cd
+ cancel-in-progress: false
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ env:
+ MVN: mvn --show-version --batch-mode
+ steps:
+ - name: jdk11
+ uses: actions/setup-java@v2
+ with:
+ java-version: "11"
+ distribution: "adopt"
+ server-id: ossrh
+ server-username: OSSRH_USR
+ server-password: OSSRH_PWD
+ gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
+ - name: checkout
+ uses: actions/checkout@v2
+ - name: cache ~/.m2
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ - name: version set
+ if: startsWith(github.ref, 'refs/tags/')
+ run: $MVN versions:set -DnewVersion=${GITHUB_REF#refs/tags/}
+ - name: mvn clean compile
+ run: $MVN clean compile
+ - name: mvn test
+ run: $MVN test
+ - name: mvn deploy
+ run: $MVN --activate-profiles deploy --define gpg.passphrase=${{ secrets.GPG_PASSPHRASE }} --define skipTests deploy
+ env:
+ OSSRH_USR: ${{ secrets.OSSRH_USR }}
+ OSSRH_PWD: ${{ secrets.OSSRH_PWD }}
+ - name: mvn release
+ if: startsWith(github.ref, 'refs/tags/')
+ run: $MVN --activate-profiles deploy nexus-staging:release
+ env:
+ OSSRH_USR: ${{ secrets.OSSRH_USR }}
+ OSSRH_PWD: ${{ secrets.OSSRH_PWD }}
+ - name: github release
+ uses: softprops/action-gh-release@v1
+ if: startsWith(github.ref, 'refs/tags/')
+ with:
+ files: |
+ target/payload-*.jar
+ target/payload-*.jar.asc
+
+ # - name: Step To run on failure
+ # if: ${{ failure() }}
+ # run: $MVN --activate-profiles deploy nexus-staging:drop
+ # env:
+ # OSSRH_USR: ${{ secrets.OSSRH_USR }}
+ # OSSRH_PWD: ${{ secrets.OSSRH_PWD }}
diff --git a/.travis.yml b/.travis.yml
index 1c32470..db6b8a6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,12 +33,12 @@ script:
after_success:
- if [[ -n "$TRAVIS_TAG" && "$TRAVIS_JDK_VERSION" == "openjdk11" ]]; then
- $MAVEN_CMD nexus-staging:release --settings settings.xml;
+ $MAVEN_CMD nexus-staging:release --activate-profiles deploy --settings settings.xml;
fi
after_failure:
- if [[ -n "$TRAVIS_TAG" && "$TRAVIS_JDK_VERSION" == "openjdk11" ]]; then
- $MAVEN_CMD nexus-staging:drop --settings settings.xml;
+ $MAVEN_CMD nexus-staging:drop --activate-profiles deploy --settings settings.xml;
fi
deploy:
diff --git a/README.md b/README.md
index 60f053a..7341f97 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# Payload
-[![Build Status](https://travis-ci.com/juliaaano/payload.svg)](https://travis-ci.com/juliaaano/payload)
+[![ci](https://github.com/juliaaano/payload/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/juliaaano/payload/actions/workflows/ci-cd.yml)
[![Release](https://img.shields.io/github/release/juliaaano/payload.svg)](https://github.com/juliaaano/payload/releases/latest)
[![Maven Central](https://img.shields.io/maven-central/v/com.juliaaano/payload.svg)](https://maven-badges.herokuapp.com/maven-central/com.juliaaano/payload)
[![Javadocs](http://www.javadoc.io/badge/com.juliaaano/payload.svg?color=blue)](http://www.javadoc.io/doc/com.juliaaano/payload)
@@ -53,7 +53,7 @@ pre defined providers in the classpath. You can also [implement your own](#custo
com.juliaaano
payload
- 1.1.1
+ 1.1.3
```
diff --git a/pom.xml b/pom.xml
index 3dd8c8a..28cf9c6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,13 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.juliaaano
payload
- 1.1.2-SNAPSHOT
+ 1.1.4-SNAPSHOT
jar
Payload
@@ -16,7 +17,7 @@
MIT License
- http://www.juliaaano.com/LICENSE
+ https://www.juliaaano.com/LICENSE
@@ -24,7 +25,7 @@
Juliano Mohr
juliaaano@gmail.com
- Juliaaano
+ juliaaano
https://www.juliaaano.com
@@ -215,12 +216,12 @@
sign
-
+
diff --git a/settings.xml b/settings.xml
deleted file mode 100644
index 08b7908..0000000
--- a/settings.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- ossrh
- ${env.OSSRH_USERNAME}
- ${env.OSSRH_PASSWORD}
-
-
-
diff --git a/src/main/java/com/juliaaano/payload/InvalidMediaTypeException.java b/src/main/java/com/juliaaano/payload/InvalidMediaTypeException.java
index 5763a1d..84e2f22 100644
--- a/src/main/java/com/juliaaano/payload/InvalidMediaTypeException.java
+++ b/src/main/java/com/juliaaano/payload/InvalidMediaTypeException.java
@@ -4,7 +4,7 @@
* Thrown to indicate that a client has passed an invalid or unsupported
* {@link MediaType}.
*
- * @author Juliano Mohr
+ * @author JM
*/
public class InvalidMediaTypeException extends IllegalArgumentException {
diff --git a/src/main/java/com/juliaaano/payload/MediaType.java b/src/main/java/com/juliaaano/payload/MediaType.java
index ce0d3cc..2030599 100644
--- a/src/main/java/com/juliaaano/payload/MediaType.java
+++ b/src/main/java/com/juliaaano/payload/MediaType.java
@@ -26,7 +26,7 @@
* type. Use it to retrieve {@link Payload} with the corresponding
* {@link PayloadFactory}.
*
- * @author Juliano Mohr
+ * @author JM
*/
public enum MediaType {
diff --git a/src/main/java/com/juliaaano/payload/Payload.java b/src/main/java/com/juliaaano/payload/Payload.java
index 42ac8d5..13eeefb 100644
--- a/src/main/java/com/juliaaano/payload/Payload.java
+++ b/src/main/java/com/juliaaano/payload/Payload.java
@@ -9,7 +9,7 @@
*
* @param the Java object type for which this payload is represented by.
*
- * @author Juliano Mohr
+ * @author JM
*/
public interface Payload {
diff --git a/src/main/java/com/juliaaano/payload/PayloadFactory.java b/src/main/java/com/juliaaano/payload/PayloadFactory.java
index 36e1144..0510a15 100644
--- a/src/main/java/com/juliaaano/payload/PayloadFactory.java
+++ b/src/main/java/com/juliaaano/payload/PayloadFactory.java
@@ -7,7 +7,7 @@
* therefore implementations of this factory should be media type specific,
* such as {@link com.juliaaano.payload.xml.XmlProviderFactory}.
*
- * @author Juliano Mohr
+ * @author JM
*/
public interface PayloadFactory {
diff --git a/src/main/java/com/juliaaano/payload/provider/Provider.java b/src/main/java/com/juliaaano/payload/provider/Provider.java
index 86a62ec..3bc0dd2 100644
--- a/src/main/java/com/juliaaano/payload/provider/Provider.java
+++ b/src/main/java/com/juliaaano/payload/provider/Provider.java
@@ -7,7 +7,7 @@
* It should be extended by clients of the library who wish to support
* additional (custom) providers.
*
- * @author Juliano Mohr
+ * @author JM
*/
public interface Provider {
diff --git a/src/main/java/com/juliaaano/payload/provider/ProviderException.java b/src/main/java/com/juliaaano/payload/provider/ProviderException.java
index 1c0e159..db1ee00 100644
--- a/src/main/java/com/juliaaano/payload/provider/ProviderException.java
+++ b/src/main/java/com/juliaaano/payload/provider/ProviderException.java
@@ -4,7 +4,7 @@
* General internal exception to be thrown when there are Provider related
* issues.
*
- * @author Juliano Mohr
+ * @author JM
*/
public class ProviderException extends RuntimeException {
diff --git a/src/main/java/com/juliaaano/payload/provider/ProviderFactory.java b/src/main/java/com/juliaaano/payload/provider/ProviderFactory.java
index 3c49f32..66a8c93 100644
--- a/src/main/java/com/juliaaano/payload/provider/ProviderFactory.java
+++ b/src/main/java/com/juliaaano/payload/provider/ProviderFactory.java
@@ -10,7 +10,7 @@
* listed in META-INF/services files, following {@link java.util.ServiceLoader}
* specification.
*
- * @author Juliano Mohr
+ * @author JM
*/
public interface ProviderFactory {
diff --git a/src/main/java/com/juliaaano/payload/provider/ProviderStrategy.java b/src/main/java/com/juliaaano/payload/provider/ProviderStrategy.java
index 628cf95..97f243f 100644
--- a/src/main/java/com/juliaaano/payload/provider/ProviderStrategy.java
+++ b/src/main/java/com/juliaaano/payload/provider/ProviderStrategy.java
@@ -7,7 +7,7 @@
* META-INF/services files, as per specified in Java's
* {@link java.util.ServiceLoader}
*
- * @author Juliano Mohr
+ * @author JM
*/
public interface ProviderStrategy {
diff --git a/src/main/java/com/juliaaano/payload/provider/sourcing/SourcingProviderStrategy.java b/src/main/java/com/juliaaano/payload/provider/sourcing/SourcingProviderStrategy.java
index 7082272..813c2e7 100644
--- a/src/main/java/com/juliaaano/payload/provider/sourcing/SourcingProviderStrategy.java
+++ b/src/main/java/com/juliaaano/payload/provider/sourcing/SourcingProviderStrategy.java
@@ -15,7 +15,7 @@
* This strategy enables custom mechanisms to supply provider factories
* through the {@link ProviderFactorySource}.
*
- * @author Juliano Mohr
+ * @author JM
*/
public class SourcingProviderStrategy implements ProviderStrategy {
diff --git a/src/main/java/com/juliaaano/payload/provider/sourcing/SvcLoaderProviderFactorySource.java b/src/main/java/com/juliaaano/payload/provider/sourcing/SvcLoaderProviderFactorySource.java
index 70cd221..d71a2ec 100644
--- a/src/main/java/com/juliaaano/payload/provider/sourcing/SvcLoaderProviderFactorySource.java
+++ b/src/main/java/com/juliaaano/payload/provider/sourcing/SvcLoaderProviderFactorySource.java
@@ -8,7 +8,7 @@
* Source provider factories using {@link java.util.ServiceLoader} with
* implementations of {@link ProviderFactory}.
*
- * @author Juliano Mohr
+ * @author JM
*/
public class SvcLoaderProviderFactorySource implements ProviderFactorySource {