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

Could not find com.github.aki-ks:kaysub-commons:0.1-SNAPSHOT. #1

Open
blacktide082 opened this issue Jul 19, 2021 · 5 comments
Open

Comments

@blacktide082
Copy link

blacktide082 commented Jul 19, 2021

I would very much like to use this library but I keep running into the following error in Gradle when trying to use this library from Java:

Could not find com.github.aki-ks:kaysub-commons:0.1-SNAPSHOT.
Searched in the following locations:
  - https://repo.maven.apache.org/maven2/com/github/aki-ks/kaysub-commons/0.1-SNAPSHOT/maven-metadata.xml
  - https://repo.maven.apache.org/maven2/com/github/aki-ks/kaysub-commons/0.1-SNAPSHOT/kaysub-commons-0.1-SNAPSHOT.pom
  - https://jitpack.io/com/github/aki-ks/kaysub-commons/0.1-SNAPSHOT/maven-metadata.xml
  - https://jitpack.io/com/github/aki-ks/kaysub-commons/0.1-SNAPSHOT/kaysub-commons-0.1-SNAPSHOT.pom
Required by:
    project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

It appears it's stemming from here:
https://github.com/aki-ks/NyaaSi-API/blob/master/build.sbt#L14-L16

I have tried excluding the group here and including the dependency manually:

repositories {
    mavenCentral()
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.aki-ks:kaysub-commons:master'
    implementation('com.github.aki-ks:NyaaSi-API:master') {
        exclude group: 'com.github.aki-ks', module: 'kaysub-commons'
    }
}

But that does not work either.

The .pom file for this library shows 1.0-SNAPSHOT for kaysub-commons:
https://jitpack.io/com/github/aki-ks/NyaaSi-API/master/NyaaSi-API-master.pom

Is it possible to create a tag on kaysub-commons and include that version in the kaysub-commons dependency in this repo? Or to specify master as the version for kaysub-commons in this repo?

Thanks in advance for the help.

@blacktide082
Copy link
Author

blacktide082 commented Jul 19, 2021

Solution

Actually it looks like I was able to find the right syntax by inspecting the .pom a little more closely:

Here is the correct configuration for anyone who comes across this in the future:

repositories {
    mavenCentral()
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.aki-ks:kaysub-commons:master-SNAPSHOT'
    implementation('com.github.aki-ks:NyaaSi-API:master-SNAPSHOT') {
        exclude group: 'de.kaysubs', module: 'kaysub-commons'
    }
}

@blacktide082
Copy link
Author

blacktide082 commented Jul 19, 2021

Alternate Solution

Install this library into local .m2 repository:

brew install sbt
git clone https://github.com/aki-ks/NyaaSi-API/
cd NyaaSI-API
sbt publishM2

Then include it in build.gradle:

repositories {
    mavenLocal()
}

dependencies {
    implementation 'de.kaysubs:nyaasi-api:0.1-SNAPSHOT'
}

@p4cif1c
Copy link

p4cif1c commented Apr 19, 2022

I get Missing artifact com.github.aki-ks:kaysub-commons:jar:master-SNAPSHOT in my pom =>
<dependency> <groupId>com.github.aki-ks</groupId> <artifactId>kaysub-commons</artifactId> <version>master-SNAPSHOT</version> </dependency>

@blacktide082
Copy link
Author

blacktide082 commented Apr 19, 2022

@p4cif1c did you add the jitpack.io repository to your pom.xml? Example below:

<repositories>
  <repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
  </repository>
</repositories>

@p4cif1c
Copy link

p4cif1c commented Apr 24, 2022

Its good now I added the repo and change the version to master. thanks

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

2 participants