I tried to add a remote proxy repository in Artifactory. I tried both:
1. https://dl.google.com/dl/android/maven2/
2. https://maven.google.com/
I clicked on the 'Test' button and it works, but when I browsed the repository under 'Artifacts', nothing is shown. When I tried the same for Maven Central repository, it works. Is there anything I am missing here?
Browsing only shows the artifacts that were already downloaded. A fresh repository has not downloaded anything. JCenter is a special case because it downloads a catalogue.
When you build against one of the google repositories, they will start to download the relevant artifacts and you will start seeing files in the browsing view.
Related
We are evaluating bintray and have the following build file
https://github.com/deanhiller/webpieces/blob/evaluateBintray/build.gradle
(not sure the build file matters since it reports that it is uploading each and every artifact correctly). I see stuff like this...
> Task :webserver-plugins:plugin-backend:bintrayUpload
Uploaded to 'https://api.bintray.com/content/deanhiller/maven/plugin-backend/2.0.19/org/webpieces/plugin-backend/2.0.19/plugin-backend-2.0.19-sources.jar'.
Uploading to https://api.bintray.com/content/deanhiller/maven/plugin-backend/2.0.19/org/webpieces/plugin-backend/2.0.19/plugin-backend-2.0.19-javadoc.jar...
Uploaded to 'https://api.bintray.com/content/deanhiller/maven/plugin-backend/2.0.19/org/webpieces/plugin-backend/2.0.19/plugin-backend-2.0.19-javadoc.jar'.
Uploading to https://api.bintray.com/content/deanhiller/maven/plugin-backend/2.0.19/org/webpieces/plugin-backend/2.0.19/plugin-backend-2.0.19.jar...
Uploaded to 'https://api.bintray.com/content/deanhiller/maven/plugin-backend/2.0.19/org/webpieces/plugin-backend/2.0.19/plugin-backend-2.0.19.jar'.
Uploading to https://api.bintray.com/content/deanhiller/maven/plugin-backend/2.0.19/org/webpieces/plugin-backend/2.0.19/plugin-backend-2.0.19.pom...
Uploaded to 'https://api.bintray.com/content/deanhiller/maven/plugin-backend/2.0.19/org/webpieces/plugin-backend/2.0.19/plugin-backend-2.0.19.pom'.
The really weird part though is it would create directories
https://dl.bintray.com/deanhiller/maven/org/webpieces/plugin-backend/2.0.19
but nothing is there until I deploy everything then the files show up. It seems kind of odd that the directories are created but there are no files in the upload phase. Then, my final question is, are these artifacts only available there, or are they published to jcenter or maven central as well. I can't really tell.
We are trying bintray to maybe switch off of sonatype because every time we upload, we get exceptions on sonatype(for last 4 days we have not been able to release). In bintray so far, every single upload has been successful(176 artifacts in one go).
Possibly I need more stuff to get this stuff out to jcenter or maven central?
thanks,
Dean
I do see these files at the moment.
If the artifacts are not published then only authorized users can view and download the content, this means that unauthorized users, such as anonymous, will not see content in your download repository.
Your package is not linked to jcenter therefore they are not automatically published on jcenter.
I would suggest to include your packages to jcenter.
I have created a maven plugin, this is dependent on a series of JARS. i have uploaded these JARs and poms to the relevant location on the server under nexus-data/blobs/maven-thirdparty/{group-id}.
when i run a task to "Rebuild Maven repository metadata" and "Rebuild repository index" these files does not appear when i try and browse the files http://{nexus-server}:port/#browse/browse/assets.
How can i have nexus server recognize the files in the repository?
i will look to that in future. I posted this same question to Sonatype forum and they assisted me with a utility that assists with this and it worked perfectly.
https://github.com/simpligility/maven-repository-tools/tree/master/maven-repository-provisioner
Thanks to Peter Lynch - https://support.sonatype.com/hc/en-us/articles/236210187-How-do-I-export-import-a-Maven-2-format-repository-over-HTTP-
What you are trying to do will not work, although it did in Nexus Repo 2. There currently is no mechanism for adding jars in to the blobstore in this way. We've intentionally added the blobstore and all that goes along with it so that we can do more fun things with searching, metadata, etc... that were much more difficult with a system that just has files on a path. What I might suggest instead is using something like this:
Nexus Exchange - Nexus Repository Import Scripts
GitHub Repo for Scripts
That should help you get the JARs into Nexus Repository 3, into a repo of your choice. I maintain that repo, so if you run into issues, create an issue and I'll see what I can do to help you out! ~Sonatype Community Nerd
I would like to know the difference between generating artifacts from and cache and updates.
Does generating artifacts get from remote repository if it is not available in local repository?
I did not find any relevant posts regarding the same.
I do not know if I understand correctly your question, tell me if I have to delete the answer.
In Maven, there are the remote repositories and the local repository (under .m2 folder the local one).
In the moment you build a project, the dependencies to build that project are downloaded from the remote repositories and saved into the local repository. So the next time you build a project with that dependency there should be no need to download because there is in your local repository.
There are people who say that the cache and the local repository are the same. But for example, if you use Eclipse and if you go into .m2 folder, you can see a .cache folder. There should be a m2e folder. Here Eclipse save indexes to manage the dependencies.
I have uploaded different versions of an artifact to nexus repository by programmatically using aether API . I
But when I deleted an artifact from nexus remote repository, the maven-metadata.xml file is not updated correctly. The release version still points to the artifact that I have deleted.
Is there any way I can update the metadata file?
You can update the metadata on the repository manually in the UI, via a scheduled task or via the REST API. In general you have to keep in mind that the metadata files have to be managed by the client (e.g. Maven itself or your code..), and Nexus just offers features to fix the metadata as a help since some clients don't maintain the metadata correctly.
E.g. in the UI. Log in as administrator, go to Repositories, select the repo in the list, right click and press 'Rebuild metadata'
If you want to do it only for a part of the repo you can go to the Browse Storage tab, drill down to the folder you want to update and do the same right click action.
I am having issues with hosting maven jars with Github (site-maven-plugin) so I want to move with Bintray asap.
What are the steps to host a existing maven jar in bintray?
Here is my error when doing: mvn releae prepare
Caused by: org.apache.maven.shared.release.ReleaseFailureException: You don't have a SNAPSHOT project in the reactor projects list.
What I have now is I can do mvn clean install with no problems at all. Can I just upload the files under ./m2 repo? I basically uploaded the .jar and .pom I found in the maven repository.
How can I access the library I uploaded on Bintray from my pom.xml?
You can get started with publishing from Maven to Bintray by copy-pasting some pom parts from "Set Me Up" guide:
Full user manual is available as well.
Please note, that you can't upload SNAPSHOTs to Bintray. It's a distribution platform and it is not intended for development process.
Saying that, you are welcome to take advantage of a free Artifactory account for hosting your snapshot during development.
Using OJO you don't need to use the troublesome Maven Release Plugin anymore. Once you're satisfied with the snapshots quality you can promote them to be releases and upload them to Bintray in one REST call (or click of a button in Jenkins),