If I have one project with the structure as follow...
# library-development
m
If I have one project with the structure as following:
org.myorg.sdk.http
And then I have another project that have:
org.myorg.api
Could there be some conflict if I import that first one as
implementation("org.myorg.sdk:http:0.1.0")
I believe there might be something like that since when I implement it, I can't import it since it probably thinks it's in the same project but on a different path? I get the error: "Unresolved reference: sdk" How can fix this?
k
For local development?
That would be something like
implementation project(':sdk:http')
Unless these are in two separate projects, and then you publish
sdk:http
to local Maven and expect your second project to get it from local Maven, maybe?
m
No, published on sonartype atm
k
Link to sonatype?
m
Just a sec
k
Do you have
_maven_("<https://oss.sonatype.org/content/repositories/snapshots>")
in your build file?
Or probably
_maven_("<https://s01.oss.sonatype.org/content/repositories/snapshots>")
And then it would be
org.kryptokrona.sdk:kryptokrona-http:0.1.0-SNAPSHOT
as your dependency
m
No I have only
mavenCentral()
, hmm. Gradle didn't say anything about it doesn't exist? I can't find it when i brows through "external libraries" in IntelliJ.
When I promote it to release, will it then be able to fetch from Maven Central or has I missunderstood it?
Currently it's in Staging and Snapshot
k
You published a snapshot, so that’s where you would need to fetch it from
It’s
0.1.0-SNAPSHOT
which is not the same as
0.1.0
. Snapshots don’t go to the same repository (central) as real releases
m
Wow, wait a minute. That's strange. When checking inside the nexus repository manager I see this:
This is where your snapshot is
m
Ah, that is not supposed to be there I guess. It's should be in snapshot repository I think
k
m
I probabaly did something wrong
k
You might not have closed or released
0.1.0
on the Nexus manager web interface
m
It worked great when adding that repository to my build file and changing to SNAPSHOT. Now I just have to figure out how to publish to deploy and promote. Where do I do that:
Or check that for that matter
I think I got it, I just wonder what is the purpose of close. Is that to avoid pushing artifacts to it because it's in a "release" state or ready for it?
k
m
Fixed it. Thanks a lot for help!