diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index b6df50b..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Maven CI - -on: [ push, pull_request ] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-java@v1 - with: - java-version: 17 - - - uses: actions/cache@v2 - with: - path: ~/.m2 - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - - - name: Maven build - run: mvn -B -U -ff tidy:check com.mycila:license-maven-plugin:check com.github.spotbugs:spotbugs-maven-plugin:check verify - - - name: Setup settings.xml - if: github.event_name == 'push' && github.ref == 'refs/heads/develop' - uses: s4u/maven-settings-action@v2.4.0 - with: - servers: | - [{ - "id": "nexus-snapshots", - "username": "${{ secrets.NEXUS_USERNAME }}", - "password": "${{ secrets.NEXUS_PASSWORD }}" - }] - - - name: Deploy snapshot - if: github.event_name == 'push' && github.ref == 'refs/heads/develop' - run: mvn -B package javadoc:jar source:jar deploy diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml new file mode 100644 index 0000000..126313c --- /dev/null +++ b/.github/workflows/maven-ci.yml @@ -0,0 +1,24 @@ +name: Maven CI + +on: [ push, pull_request ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + # temurin LTS versions + version: [17, 21] + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.version }} + distribution: 'temurin' + cache: maven + + - name: Maven build (skip gpg signing) + run: mvn --batch-mode --update-snapshots --fail-fast -Dgpg.skip tidy:check com.mycila:license-maven-plugin:check com.github.spotbugs:spotbugs-maven-plugin:check verify diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 0000000..cba2114 --- /dev/null +++ b/.github/workflows/maven-publish.yml @@ -0,0 +1,37 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path + +name: Maven Publish + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + # https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven + # https://github.com/actions/setup-java + - uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@v4 + with: + # using java 17 for now, to match original + # todo: migrate to java 21 (LTS) + java-version: 17 + distribution: 'temurin' + server-id: central + server-username: MAVEN_CENTRAL_USERNAME + server-password: MAVEN_CENTRAL_TOKEN + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Publish to Maven Central Portal + # visit https://central.sonatype.com/publishing/deployments in case of validation issues + run: mvn --batch-mode deploy + env: + GROUP_ID: ${{ vars.GROUP_ID }} + # https://central.sonatype.org/publish/generate-portal-token/ + MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} diff --git a/.gitignore b/.gitignore index 0e13eeb..efd4118 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ buildNumber.properties .mvn/timing.properties # https://github.com/takari/maven-wrapper#usage-without-binary-jar .mvn/wrapper/maven-wrapper.jar +.flattened-pom.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index 27992d7..87deec6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,18 @@ # Changelog All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -[Unreleased]: https://github.com/fairdevkit/rdf-resource-resolver/compare/master...HEAD + +## [0.2.0] - 2024 Oct 28 + +### Changed (backward incompatible) + +- changed package namespace from `nl.dtls` to `org.fairdatateam` +- changed `groupId` to `org.fairdatateam.rdf` + +[Unreleased]: https://github.com/fairdatateam/rdf-resource-resolver/compare/master...HEAD +[0.2.0]: https://github.com/fairdatateam/rdf-resource-resolver-fork/releases/tag/0.2.0 diff --git a/pom.xml b/pom.xml index 0ac20c6..4ae85ca 100644 --- a/pom.xml +++ b/pom.xml @@ -24,14 +24,17 @@ SOFTWARE. --> - + 4.0.0 - com.github.fairdevkit + org.fairdatateam.rdf rdf-resource-resolver - 0.1.2-SNAPSHOT + ${revision} pom + rdf-resource-resolver + Takes a resource identifier and attempts to resolve the resource's content. + https://github.com/FAIRDataTeam/rdf-resource-resolver MIT License @@ -40,20 +43,37 @@ + + + dennisvang + https://github.com/dennisvang + + + Kees Burger + https://github.com/kburger + + + Marek Suchánek + https://github.com/MarekSuchanek + + + rdf-resource-resolver-api rdf-resource-resolver-core - - - nexus-snapshots - Nexus Snapshots - https://nexus.internal.fairdatapoint.org/repository/maven-snapshots/ - - + + scm:git:https://github.com/FAIRDataTeam/rdf-resource-resolver.git + scm:git:ssh://github.com/FAIRDataTeam/rdf-resource-resolver.git + https://github.com/FAIRDataTeam/rdf-resource-resolver + + + + 0.2.0 + UTF-8 UTF-8 @@ -64,6 +84,7 @@ 1.7.30 3.7.0 + 1.6.0 4.2.3 @@ -102,6 +123,7 @@ src/test/groovy + @@ -149,6 +171,111 @@ + + + + org.codehaus.mojo + flatten-maven-plugin + ${flatten.version} + + true + resolveCiFriendliesOnly + + + + + flatten + process-resources + + flatten + + + + + flatten.clean + clean + + clean + + + + + + + + + org.sonatype.central + central-publishing-maven-plugin + 0.6.0 + true + + central + false + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.7 + + + sign-artifacts + verify + + sign + + + true + + + + + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.10.1 + + + attach-javadocs + + jar + + + + + + + + + + + env.GROUP_ID + + + + ${env.GROUP_ID} + + + diff --git a/rdf-resource-resolver-api/pom.xml b/rdf-resource-resolver-api/pom.xml index 98d2a25..f19bed9 100644 --- a/rdf-resource-resolver-api/pom.xml +++ b/rdf-resource-resolver-api/pom.xml @@ -24,13 +24,13 @@ SOFTWARE. --> - + 4.0.0 - com.github.fairdevkit + org.fairdatateam.rdf rdf-resource-resolver - 0.1.2-SNAPSHOT + ${revision} rdf-resource-resolver-api diff --git a/rdf-resource-resolver-api/src/main/java/com/github/fairdevkit/rdf/resolver/api/ResolverStrategy.java b/rdf-resource-resolver-api/src/main/java/org/fairdatateam/rdf/resolver/api/ResolverStrategy.java similarity index 97% rename from rdf-resource-resolver-api/src/main/java/com/github/fairdevkit/rdf/resolver/api/ResolverStrategy.java rename to rdf-resource-resolver-api/src/main/java/org/fairdatateam/rdf/resolver/api/ResolverStrategy.java index a7fbf12..09714bc 100644 --- a/rdf-resource-resolver-api/src/main/java/com/github/fairdevkit/rdf/resolver/api/ResolverStrategy.java +++ b/rdf-resource-resolver-api/src/main/java/org/fairdatateam/rdf/resolver/api/ResolverStrategy.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.github.fairdevkit.rdf.resolver.api; +package org.fairdatateam.rdf.resolver.api; import java.io.IOException; import java.io.InputStream; diff --git a/rdf-resource-resolver-api/src/main/java/com/github/fairdevkit/rdf/resolver/api/ResourceResolver.java b/rdf-resource-resolver-api/src/main/java/org/fairdatateam/rdf/resolver/api/ResourceResolver.java similarity index 98% rename from rdf-resource-resolver-api/src/main/java/com/github/fairdevkit/rdf/resolver/api/ResourceResolver.java rename to rdf-resource-resolver-api/src/main/java/org/fairdatateam/rdf/resolver/api/ResourceResolver.java index efde756..4f7b1bf 100644 --- a/rdf-resource-resolver-api/src/main/java/com/github/fairdevkit/rdf/resolver/api/ResourceResolver.java +++ b/rdf-resource-resolver-api/src/main/java/org/fairdatateam/rdf/resolver/api/ResourceResolver.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.github.fairdevkit.rdf.resolver.api; +package org.fairdatateam.rdf.resolver.api; import java.io.IOException; import java.io.InputStream; diff --git a/rdf-resource-resolver-api/src/main/java/com/github/fairdevkit/rdf/resolver/api/package-info.java b/rdf-resource-resolver-api/src/main/java/org/fairdatateam/rdf/resolver/api/package-info.java similarity index 96% rename from rdf-resource-resolver-api/src/main/java/com/github/fairdevkit/rdf/resolver/api/package-info.java rename to rdf-resource-resolver-api/src/main/java/org/fairdatateam/rdf/resolver/api/package-info.java index ad33839..11b2202 100644 --- a/rdf-resource-resolver-api/src/main/java/com/github/fairdevkit/rdf/resolver/api/package-info.java +++ b/rdf-resource-resolver-api/src/main/java/org/fairdatateam/rdf/resolver/api/package-info.java @@ -26,4 +26,4 @@ * API types for the RDF resolver library. */ @javax.annotation.ParametersAreNonnullByDefault -package com.github.fairdevkit.rdf.resolver.api; +package org.fairdatateam.rdf.resolver.api; diff --git a/rdf-resource-resolver-core/pom.xml b/rdf-resource-resolver-core/pom.xml index 8d21a3d..4ebfd21 100644 --- a/rdf-resource-resolver-core/pom.xml +++ b/rdf-resource-resolver-core/pom.xml @@ -24,13 +24,13 @@ SOFTWARE. --> - + 4.0.0 - com.github.fairdevkit + org.fairdatateam.rdf rdf-resource-resolver - 0.1.2-SNAPSHOT + ${revision} rdf-resource-resolver-core @@ -38,7 +38,7 @@ - ${project.groupId} + org.fairdatateam.rdf rdf-resource-resolver-api ${project.version} diff --git a/rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/AbstractResolverStrategy.java b/rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/AbstractResolverStrategy.java similarity index 96% rename from rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/AbstractResolverStrategy.java rename to rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/AbstractResolverStrategy.java index 170e614..ff9de92 100644 --- a/rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/AbstractResolverStrategy.java +++ b/rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/AbstractResolverStrategy.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.github.fairdevkit.rdf.resolver.core; +package org.fairdatateam.rdf.resolver.core; -import com.github.fairdevkit.rdf.resolver.api.ResolverStrategy; +import org.fairdatateam.rdf.resolver.api.ResolverStrategy; import java.io.IOException; import java.io.InputStream; import java.net.http.HttpClient; diff --git a/rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/ContentNegotiationStrategy.java b/rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/ContentNegotiationStrategy.java similarity index 97% rename from rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/ContentNegotiationStrategy.java rename to rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/ContentNegotiationStrategy.java index 34ab2ee..7280277 100644 --- a/rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/ContentNegotiationStrategy.java +++ b/rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/ContentNegotiationStrategy.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.github.fairdevkit.rdf.resolver.core; +package org.fairdatateam.rdf.resolver.core; import java.io.InputStream; import java.net.URI; diff --git a/rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/CoreResourceResolver.java b/rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/CoreResourceResolver.java similarity index 93% rename from rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/CoreResourceResolver.java rename to rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/CoreResourceResolver.java index 4ddf0e1..e7dde19 100644 --- a/rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/CoreResourceResolver.java +++ b/rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/CoreResourceResolver.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.github.fairdevkit.rdf.resolver.core; +package org.fairdatateam.rdf.resolver.core; -import com.github.fairdevkit.rdf.resolver.api.ResolverStrategy; -import com.github.fairdevkit.rdf.resolver.api.ResourceResolver; +import org.fairdatateam.rdf.resolver.api.ResolverStrategy; +import org.fairdatateam.rdf.resolver.api.ResourceResolver; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; diff --git a/rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/PathExtensionStrategy.java b/rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/PathExtensionStrategy.java similarity index 97% rename from rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/PathExtensionStrategy.java rename to rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/PathExtensionStrategy.java index 90d5a58..77193f4 100644 --- a/rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/PathExtensionStrategy.java +++ b/rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/PathExtensionStrategy.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.github.fairdevkit.rdf.resolver.core; +package org.fairdatateam.rdf.resolver.core; import java.io.InputStream; import java.net.URI; diff --git a/rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/package-info.java b/rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/package-info.java similarity index 96% rename from rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/package-info.java rename to rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/package-info.java index 4cb14d2..043ddfb 100644 --- a/rdf-resource-resolver-core/src/main/java/com/github/fairdevkit/rdf/resolver/core/package-info.java +++ b/rdf-resource-resolver-core/src/main/java/org/fairdatateam/rdf/resolver/core/package-info.java @@ -26,4 +26,4 @@ * Core implementations of the RDF Resolver APIs. */ @javax.annotation.ParametersAreNonnullByDefault -package com.github.fairdevkit.rdf.resolver.core; +package org.fairdatateam.rdf.resolver.core;