Since JCenter and Bintray are shutting down I'm trying to migrate away from them. During this process, I'm trying to find which dependencies are downloaded from JCenter and which are downloaded from Maven central.
So my question is simply, is there an easy way in Maven to check which dependencies are currently downloaded from JCenter and are not available in Maven Central?
It can be really cumbersome and time-consuming to figure this out manually if for large projects with lots of dependencies.
Related
I have a library shared in JCenter, which I post to through Bintray.
Recently, it is announced JCenter and Bintray are sunsetting, and many advised us to go to MavenCentral. I'm looking to move migrate it over.
Then I notice within the Bintray, it is stated my library is on Maven too, and the user can get my library using
maven {
url "https://dl.bintray.com/elye-project/maven"
}
So I'm confused, does that means I am already in Maven? Is this is just another name for JCenter and will not be available as well?
As I read more, I found an article stating we can publish our library from Bintray to MavenCentral too.
I also read if I need to submit my library to MavenCentral, I need to first create an issue in Sonatype.
Then I saw Sonatype is actually having Nexus Repository Manager. Then I find OSSRH uses Nexus Repository Manager.
I am super confused about what these terms are, and how are they related?
Bintray, JCenter, Maven, MavenCentral, OSSRH, Sonatype, Nexus.
Can someone give a brief description about them, and help to connect the dot for me?
MavenCentral is the place where Java open source artifacts should be published
JCenter was such a place.
Maven is a build system, not a repository. Many repositories have Maven format, which makes them readable from Maven and Gradle.
Sonatype Nexus and JFrog Artifactory are repository managers. You can install them to manage internal and external artifacts on your own server, which is advisable inside a company.
I have published a small library to Maven Central (it can be downloaded via web UI here). This was done more than a full day ago.
My understanding is that JCenter mirrors Maven Central, but for some reason I cannot find my artifact in JCenter both via web interface and as part of Maven build.
Do I need to take some action to make it appear in JCenter too?
Basically, if you want to make sure that your library will exist in JCenter, you can upload your library to Bintray under Maven repository, and request to add it to JCenter.
Bintray can also save you the trouble of uploading your library to Maven Central, and do it for you.
Enjoy
Two weeks later the artifact is now visible in JCenter. Apparently it just takes some time to appear there.
We are hosting a local maven repository in Sonatype Nexus, in order to share our own jars across projects. We are having an issue with one jar in particular, where Gradle is able to find and download the POM, but not the JAR from Nexus.
The error given in Gradle is simply:
Could not resolve: com.qf:qf-etl_2.11:0.0.1-SNAPSHOT
We have not this problem with any other jar held in Nexus. There is one possibly notable difference between this jar, and other jars we are hosting, which is that this jar depends on another jar which is also held in our locally hosted maven repository.
We are using Gradle 2.14, and Nexus 3.0.1-01 (ESS)
All help and ideas are appreciated, and please let me know what additional information I need to provide!
The POM was downloading without the JAR, because the JAR depended on two unmanaged (3rd party) JARs. The solution that I followed was to upload the third party JARs into Nexus as well, so that these could be found, guided by these instructions
Note that gradle:eclipse was not reporting missing dependencies, even though it would normally do this.
I searched a lot in apache documentation and ibiblio.org and I could not find a decent straight answer.
My questions:
When I download a jar using maven dependency (setup in pom), how can I be sure that the file does not change on the remote repository? for example, if I'm using log4j version 1.2.3, downloaded from ibiblio.org (or any other repo for that matter), how can I be sure I'm getting the exact same jar each time?
Does maven delete jars from the local repository? let's assume I'm not clearing the repository at all, will it fill up eventually? or does maven have some kind of mechanism to clear old jars?
In Maven conventions a released version like log4j 1.2.3 will never be changed. It will be left in your locale repository until you manually delete it. It can't be changed by anyone except for the admins on maven central, but i suppose they don't do such a stupid thing.
Furthermore the download by default is done from maven central (repo1.maven.org/maven2 instead of ibiblio).
One of the "tricks" in Maven is download an artifact (released) only once...that improved your build performance in contradiction to the SNAPSHOT dependencies.
You could configure your own repository, and point all your project poms at that. It's easy to configure your poms to use a different (private) repository, but I've never set one up myself. Doesn't seem too hard, other than managing it to keep all the needed artifacts available.
I want to create a maven project, which has to depend on a non maven project which in turn depends on 2 other non maven projects. I do not have ownership of any of the other projects and it would not be possible for me to change anything in those projects let alone the structure to conform to the maven structure.
I asked if I could just get jars -- but was told that because of multiple levels of dependency, it would be "difficult" -- although I haven't understood why.
Is this possible or should I just abandon the use of maven to create my project and go with a regular project with jars in the lib folder?
Inxsible
If you can go with a regular project build that means you must have access to the other project's jar files?
It doesn't really matter how the other project builds them, you can still gain more control over your own build process by loading the jars you depend on into a Maven repository.
I'd suggest using one of the following repository managers:
Nexus
Artifactory
Archiva
They'll give you management screens to uploading 3rd party jars, they'll also a more efficient way to use other Maven repositories like Maven Central.
Once you've got your Maven build process working, you could encourage the other projects to automatically publish their versions into your Maven repo.
They could use the ANT tasks provided by the Maven or Apache ivy projects. Worst case you just continue to load their libraries until they see the light :-)