Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,21 @@ OCI Registry as Storage enables libraries to push OCI Artifacts to [OCI Conforma

## Consuming SDK

SNAPSHOT version are published on GitHub Maven package.
SNAPSHOT version are published on GitHub Maven packages.
Releases are published on Maven Central

Javadoc is published from main branch into: https://oras-project.github.io/oras-java/

```xml
<dependency>
<groupId>land.oras</groupId>
<artifactId>oras-java-sdk</artifactId>
<version>VERSION_HERE</version>
</dependency>
```

### Only for SNAPSHOTS (only for testing)

GitHub requires authentication to download packages. You can use a personal access token to authenticate with GitHub Packages. To authenticate with GitHub Packages, you need to update your `~/.m2/settings.xml` file to include your personal access token.

```xml
Expand Down Expand Up @@ -79,19 +90,13 @@ Registry registry = Registry.Builder.builder().insecure().build();
registry.pullArtifact(ContainerRef.parse("localhost:5000/hello:v1"), Path.of("folder"));
```

### Deploy to GitHub Packages
### Deploy SNAPSHOTS

This is temporary until published to Maven Central with a proper workflow.

The maven resolver must be switched to `wagon` to deploy to GitHub Packages.

```shell
mvn -Dmaven.resolver.transport=wagon -DskipTests -Poras-java clean deploy
```
SNAPSHOTS are automatically deployed when the `main` branch is updated. See the [GitHub Actions](.github/workflows/deploy-snapshots.yml) for more details.

### Perform release

- Ensure the draft release version correspond to the version on the `pom.xml`
- Ensure the draft release version correspond to the version on the `pom.xml`. Specially if changing the major or minor version. Patch releases are automatically updated.
- Run the release workflow

## Code of Conduct
Expand Down
6 changes: 2 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
<modelVersion>4.0.0</modelVersion>

<groupId>land.oras.java</groupId>
<groupId>land.oras</groupId>
<artifactId>oras-java-sdk</artifactId>
<version>0.1.10-SNAPSHOT</version>
<version>0.2.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<description>ORAS Java SDK</description>
Expand Down Expand Up @@ -538,12 +538,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<!--
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down