Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artifacts not in Maven Central #1

Open
skynetcap opened this issue Oct 1, 2024 · 2 comments
Open

Artifacts not in Maven Central #1

skynetcap opened this issue Oct 1, 2024 · 2 comments

Comments

@skynetcap
Copy link

skynetcap commented Oct 1, 2024

I added the dependencies for 1.9.3 (from https://github.com/sava-software/sava/packages/2225240) to my POM and Maven can't find it in the central artifactory. Any plans to support that? I believe if the artifact isn't published to maven central (Sonatype), you'll have to add a repository to your POM (as it currently stands, I believe). Or is this only a Gradle project?

Also this codebase is super impressive and modern. Amazing work.

Could not find artifact software.sava:sava-rpc:jar:1.9.3 in central (https://repo.maven.apache.org/maven2)

Random note: Making it easy to verify the dependency matches the code (via checksum/SHA512) would help a lot, which is my current task. Since it's a "new" library, it's of high importance, given security considerations.

@jpe7s
Copy link
Member

jpe7s commented Oct 2, 2024

I publish to the Github package repository, you will need to wire in your Github username and a classic personal access token with read access to packages as the password. Here is an example in Gradle, I am not savvy with Maven, but I imagine they have something similar for authenticating to a maven repository.

I do not have time right now to figure out the checksum verification, but completely agree. Happy to accept any PR to publish anything else using the Gradle maven-publish plugin to help facilitate.

Thank you very much for the kind words.

@oursy
Copy link

oursy commented Oct 3, 2024

Add the following to your pom.xml to include the required dependencies and repositories:

<dependencies>
    <!-- Sava framework core functionality -->
    <dependency>
        <groupId>software.sava</groupId>
        <artifactId>sava-core</artifactId>
        <version>1.8.19</version>
    </dependency>

    <!-- Sava framework RPC functionality -->
    <dependency>
        <groupId>software.sava</groupId>
        <artifactId>sava-rpc</artifactId>
        <version>1.8.19</version>
    </dependency>
</dependencies>

<repositories>
    <!-- GitHub repository for Sava framework dependencies -->
    <repository>
        <id>gh1</id>
        <name>sava-software</name>
        <url>https://maven.pkg.github.com/sava-software/software.sava</url>
    </repository>

    <!-- GitHub repository for json-iterator library dependencies -->
    <repository>
        <id>gh2</id>
        <name>comodal</name>
        <url>https://maven.pkg.github.com/comodal/json-iterator</url>
    </repository>
</repositories>

You will need to wire in your GitHub username and a classic personal access token PAT with read access to packages as the password.

Next, configure the authentication details in your conf/settings.xml:

<servers>
    <!-- Authentication for the GitHub repository hosting Sava software -->
    <server>
        <id>gh1</id>
        <username>username</username>  <!-- Replace with your GitHub username -->
        <password>access_token</password>  <!-- Replace with your GitHub personal access token -->
    </server>

    <!-- Authentication for the GitHub repository hosting json-iterator -->
    <server>
        <id>gh2</id>
        <username>username</username>  <!-- Replace with your GitHub username -->
        <password>access_token</password>  <!-- Replace with your GitHub personal access token -->
    </server>
</servers>

Instructions:

  • GitHub Username: Replace username with your actual GitHub username.
  • Personal Access Token (PAT): Replace access_token with a GitHub personal access token that has read access to your packages. You can generate this token from your GitHub account under Settings > Developer Settings > Personal Access Tokens.

This configuration allows Maven to authenticate and retrieve the required dependencies from private GitHub repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants