Skip to content
Java/JVM implementation of the package url spec
Java Shell
Branch: master
Clone or download
sschuberth Merge pull request #18 from maxhbr/maxhbr/addEqualsMethod
Generate .equals() and .hashCode() method
Latest commit 21f69f4 Oct 25, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src generate .equals() and .hashCode() methods Oct 25, 2019
.gitignore initial ignore Jan 10, 2019
.travis.yml Changed to OpenJDK 8 Aug 26, 2019
LICENSE Create LICENSE Dec 11, 2017
README.md README: Update links to point to travis.com Aug 28, 2019
pom.xml README: Update links to point to travis.com Aug 28, 2019
release.sh initial commit Nov 27, 2018

README.md

Build Status Maven Central License

Package URL (purl) for Java

This project implements a purl parser and class for Java.

Compiling

mvn clean install

Maven Usage

Package URL is available on the Maven Central Repository. These can be used without having to compile the project yourself.

<dependencies>
    <dependency>
        <groupId>com.github.package-url</groupId>
        <artifactId>packageurl-java</artifactId>
        <version>1.1.1</version>
    </dependency>
</dependencies>

Usage

Creates a new PackageURL object from a purl string:

PackageURL purl = new PackageURL(purlString);

Creates a new PackageURL object from parameters:

PackageURL purl = new PackageURL(type, namespace, name, version, qualifiers, subpath);

Creates a new PackageURL object using the builder pattern:

PackageURL purl = PackageURLBuilder.aPackageURL()
    .withType("type")
    .withNamespace("namespace")
    .withName("name")
    .withVersion("version")
    .withQualifier("key","value")
    .withSubpath("subpath")
    .build();

License

Permission to modify and redistribute is granted under the terms of the MIT License

You can’t perform that action at this time.