diff --git a/bnd.bnd b/bnd.bnd new file mode 100644 index 0000000..d80d4f0 --- /dev/null +++ b/bnd.bnd @@ -0,0 +1,55 @@ +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +## + +# Create OSGi and JPMS module names based on the `groupId` and `artifactId`. +# This almost agrees with `maven-bundle-plugin`, but replaces non-alphanumeric characters +# with full stops `.`. +Bundle-SymbolicName: com.github.packageurl +-jpms-module-info: $[Bundle-SymbolicName];access=0 + +# Convert API leakage warnings to errors +-fixupmessages.priv_refs: "private references";restrict:=warning;is:=error + +# Options specific to dependency packages: +# +# Jakarta Validation and JSpecify are optional dependencies. +Import-Package: \ + jakarta.validation;resolution:=optional,\ + org.jspecify.annotations;resolution:=optional,\ + * + +# Options specific to dependency modules: +# +# Optional dependencies can not be `transitive`, otherwise consumers will need them at compile time. +-jpms-module-info-options: \ + jakarta.validation;transitive=false,\ + org.jspecify;transitive=false + +# Adds certain `Implementation-*` and `Specification-*` entries to the generated `MANIFEST.MF`. +# We set these values to their Maven Archiver defaults: https://maven.apache.org/shared/maven-archiver/#class_manifest +Implementation-Title: ${project.name} +# Implementation-Vendor: ${project.organization.name} +Implementation-Version: ${project.version} +Specification-Title: ${project.name} +# Specification-Vendor: ${project.organization.name} +Specification-Version: ${parsedVersion.majorVersion}.${parsedVersion.minorVersion} diff --git a/pom.xml b/pom.xml index b5c93b2..8fa55f7 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.github.package-url packageurl-java - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT jar Package URL @@ -41,6 +41,13 @@ UTF-8 false + + 2025-03-15T10:12:28Z + + 7.1.0 + 3.6.0 2.9.1 3.4.1 3.14.0 @@ -131,6 +140,12 @@ true provided + + org.osgi + org.osgi.annotation.bundle + 2.0.0 + provided + org.jspecify jspecify @@ -157,6 +172,16 @@ + + biz.aQute.bnd + bnd-baseline-maven-plugin + ${bnd.maven.plugin.version} + + + biz.aQute.bnd + bnd-maven-plugin + ${bnd.maven.plugin.version} + org.apache.maven.plugins maven-clean-plugin @@ -215,6 +240,25 @@ + + + org.codehaus.mojo + build-helper-maven-plugin + ${builder.helper.maven.plugin.version} + + + parse-version + + parse-version + + validate + + + org.apache.maven.plugins maven-enforcer-plugin @@ -345,6 +389,54 @@ + + + biz.aQute.bnd + bnd-maven-plugin + + true + + + generate-jar-and-module-descriptors + + jar + + + + + + + biz.aQute.bnd + bnd-baseline-maven-plugin + + + check-api-compatibility + + baseline + + + + org.cyclonedx cyclonedx-maven-plugin diff --git a/src/main/java/com/github/packageurl/package-info.java b/src/main/java/com/github/packageurl/package-info.java index 55397be..5312caa 100644 --- a/src/main/java/com/github/packageurl/package-info.java +++ b/src/main/java/com/github/packageurl/package-info.java @@ -24,6 +24,8 @@ *

https://github.com/package-url/purl-spec

*/ @NullMarked +@Export package com.github.packageurl; -import org.jspecify.annotations.NullMarked; \ No newline at end of file +import org.jspecify.annotations.NullMarked; +import org.osgi.annotation.bundle.Export; diff --git a/src/main/java/com/github/packageurl/validator/package-info.java b/src/main/java/com/github/packageurl/validator/package-info.java index 03dc629..5cd633e 100644 --- a/src/main/java/com/github/packageurl/validator/package-info.java +++ b/src/main/java/com/github/packageurl/validator/package-info.java @@ -19,7 +19,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ +/** + * This package contains a validator for Jakarta Validation. + */ @NullMarked +@Export package com.github.packageurl.validator; -import org.jspecify.annotations.NullMarked; \ No newline at end of file +import org.jspecify.annotations.NullMarked; +import org.osgi.annotation.bundle.Export;