Mapping the artefacts of one nexus Repository instance to another instance - maven

I'm new to the nexus world. I wanna move all the artefacts from one nexus repository to another nexus repository instance.(or you can say I wanna migrate the repos)
below is the nexus instances I've and their current version.
one Nexus Instance (Source Repository instance): Nexus Repository Manager OSS (2.14 version)
2nd Nexus Instance (Destination Repository Instance):Sonatype Nexus (2.11 version)
Is there any way to do this:-
I know one solution which is a manual solution, one can manually move the repository from source to destination storage.
https://community.talend.com/s/article/Manually-migrating-artifacts-from-one-Nexus-environment-to-another-S5taY?language=en_US
I went through this solution thread of nexus community as well but not able to find out. ):
https://community.sonatype.com/t/to-copy-single-repository-from-old-instance-to-new/1679
Is there any 2nd way to achieve this like can we use any Jenkins plugins, or some script that can help us to achieve above or any rest api's way?
It would be very helpful if someone answer this.
Thanks in advance.

Related

Nexus repository manager storage for repositories

I am new to Nexus and recently started using nexus and wanted to do some configuration. after successful installation when I run Gradle to upload build artifacts (resultant jar file), it was uploaded successfully but why I cannot see the file at the sonatype-work directory. After going through some tutorials, I came to know that there should be a folder called Storage in sonatype-work directory but it is not there.(FYI, I am using Nexus 3.2).
Please guide me how to cofigure this Storage folder so that I can get those uploaded artifacts directly from the physical path and not from console.
Also please guide me how to publish a complete directory from my local system to Nexus repository manager using Gradle.
In the Nexus 3.x version there's no folder called storage, there's a new area called blob stores(read the official documentation on the sonatype). You can compare screenshots:Nexus 2 and Nexus 3. As you can see, nexus 2 really has this folder (storage, I mean), but nexus 3 has blobs instead storage.
For the uploading(publishing) your build results to the internal Nexus repository, please use gradle-nexus-pluginor the maven-publish plugins.
You can find it on the github, sorry but I can't insert more than two links in the answer :(

Unofficial migrate Nexus 2 -> 3 possible for Maven artifacts?

First, I know that the upcoming Nexus 3.1 will offer migration of v2 to v3.
I also just applied for the beta migration for v2 to v3 (google forms).
My timing sucks, since the next few days I am going to setup and integrate a new Nexus 3 server.
Is it possible to manually copy my old Maven artifacts (from Nexus v2 server) to this new Nexus v3 server and let Nexus v3 reindex everything?
If so, how?
It's not possible to manually copy, however Nexus Repository Manager 3.1 is now released and you can use it to Upgrade.
As well, the incredible, edible Manfred Moser created this: https://github.com/simpligility/maven-repository-tools/tree/master/maven-repository-provisioner which you can use to take something from a file system into a Maven Repository AKA Nexus Repository Manager. I haven't used it myself, but it's probably exactly what you are looking for.
For those still checking this out, you can also use this simple bash script to import artifacts into Nexus Repository 3: https://gist.github.com/DarthHater/a4f2738e3bd40d242db22633b59dfd63

Local Maven Repository M2 Sync with Nexus Release Deletion

Coming from Maven integration with Artifactory, now I'm facing Nexus, that's a good thing!
I just want to know what could be the best way for you to perform the below action.
When i delete some releases of Nexus (eg 1.0, 1.1, 1.2, 1.3), i would link to sync the deletion with our Jenkins Maven local repository (.m2), in order to keep it clean, and without perform a manual deletion...
I know that a good answer could be just clean .m2 every week or something like this, but in this case it will spend many times to download all the artifacts needed...
So, have you an idea?
Thanks a lot!

How to migrate from Artifactory to Nexus 2.8.0-05

I installed nexus-2.8.0-05-bundle.tar.gz and now I am trying to migrate old (single) repo from Artifactory.
How can I achieve this (Debian7)?
I read about migration plugin but I cannot seem to find the right one... I unzipped nexus-migration-plugin-packaging-1.5-webapp.zip into the nexus installation folder but it doesn't seem to work..or at least I cannot find any related actions from the web admin console localhost:8081/nexus.
Cheers,
newbie
In order to migrate to Nexus you would use the export tool of Artifactory to get the repositories as plain files and folders structure.
Then you create a repo in Nexus and simply copy that storage into place.
Further details are available in the Nexus book migration chapter.
You can also ping us via a support ticket or via the mailings lists or hipchat channel.
PS: The migration plugin is deprecated and should not be used.

How to opensource a Maven plugin?

I have a Maven plugin that I want to share with outside world. Is there an official Maven repository I can deploy this plugin too ? What are the steps involved ?
Any links to documentation much appreciated
I've been reading http://www.sonatype.com/people/2008/11/adding-a-jar-to-a-maven-repository-with-sonatype-nexus/ but this just seems to describe deploying to internal Nexus repository, wheras I want to deploy to an external repo so any user can use it.
I would recommend:
Setting up an account in Github in order to have a place to host your source code.
Setting up an account in Cloudbee's BuildHive. This is a free Jenkins CI for Open Source projects. This will test your project on every push to Github.
Request rights to publish your project to Maven Central.
The bit with the request will take around up to a day normally and then you'll be able to publish your code directly to Maven Central.

Resources