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 :(
Related
Our organization has a locally running instance of Artifactory, and also a local instance of Bitbucket. We are trying to get them to play well together so that Artifactory can serve up our private PHP packages right out of Bitbucket.
Specifically, we'd like to create a Composer Remote Repository in Artifactory that serves up our private PHP packages, where those packages are sourced from git repositories on our local Bitbucket server.
Note that we'd rather not create and upload our own package zip files for each new package version, as suggested here. Ideally, we just want to be able to commit changes to a PHP package in BitBucket, tag those changes as a new package version, and have that new version be automatically picked up and served by Artifactory.
The Artifactory Composer documentation suggests that this is possible:
A Composer remote repository in Artifactory can proxy packagist.org
and other Artifactory Composer repositories for index files, and
version control systems such as GitHub or BitBucket, or local
Composer repositories in other Artifactory instances for binaries.
We've spent a lot of time trying making this work, but haven't been able to do it. The Remote Repository that we create always remains empty, no matter what we do. Can anyone offer an example to help, or even just confirm that what we're attempting isn't possible?
For reference, we've been trying to find the right settings to put into this setup page:
Thanks!
Artifactory won't download and pack the sources for you, it expects to find binary artifacts.
The mention of source control in the documentation refers to downloading the archives from source control systems, either uploaded there as archives (don't do that), or packed by the source control system on download request (that is what you are looking for).
You can use this REST API to download automatically generated zips from BitBucket. If you can configure the composer client to look for the packages in the right place, you're all set.
Basically we already had a nexus server configured but now we do not have access to that server for some reason. Now, I have the repository folder which contains all the dependency I will require to upload it in new nexus server.
So, for this I can upload each dependency one by one using command line or by Nexus UI. But I have multiple dependencies So I am looking for alternative
So, I found this solution
Here
And I am following 3rd suggestion but I am not getting which access I will needed. Because I do not see such directory in my local machine.
I have extracted nexus-3.12.1-01 setup in my windows machine.
Where can I found this folder?
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.
I have small open-source projects hosted on Github which I want to make available for others via Maven. I have a small webspace where I can host static files. How can I create a repo? Also, I would want to remove old snapshots from there if possible.
Standard maven repository implementations are almost all Tomcat web apps. Each one of them should have a static repository, just as your local repository. The webapp serves to the purpose of searching and management of the artifacts stored in that static repository.
If you want to host the repository with static web access only, you'll have to perform the management manually and provide a static manually generated html page that contains GAV coordinates of all artifacts in the repo. No other user but you could ever upload to the repository unless you give your password or enable anonymous FTP acces.
If maven doesn't try to upload anything to the repo until the deploy phase then this approach is still partly usable, since running a mvn clean deploy should fail.
You can check if is it doable like this (I suppose that you have that projects in your local repo):
upload your local repoistory folder to a URL
for the purpose of testing mirror your central repo to that URL
try to build your project with dependencies from your repo
Open your settings.xml file and under <mirrors> node add:
<mirror>
<url>http://your/url/repo</url>
<mirrorOf>*</mirrorOf>
</mirror>
and see if mvn clean install suceeds. Please feedback.
In this SO answer I have outlined the way I set up my OSS projects which are all hosted in Github. There are actually a number of free services out there you could you when you would like to run an OSS project.
I would recommend publishing to Maven Central, if your plugin is well-tested and expected to bring other people benefits as well. You can use CloudBee's BuildHive as a free Jenkins CI.
A static repo works great, per my experience.
I scp'd up my local repository into a static apache server. Legit repo. Not as easy to maintain as a real repo of course, but quite a bit cheaper if you've already got a plain vanilla web host.
Other than setting the permissions properly (same as required for you to browse the folders), it was a pretty painless procedure.
The only two things I did to make it more reasonable were
1 - Wrote a script to "rm -rf ...." on most of the contents of my local repo so that the only thing I am deploying is those few artifacts that are not available in the general repos.
2 - Tarred it up first before scping to my web host.
Hope this helps.
The guy below did something similar, only using FTP which saves him a lot of hand work if he updates his binaries very often.
http://stuartsierra.com/2009/09/08/run-your-own-maven-repository
I think I know how to do it now. I'm using mvn deploy now to create a local repository on the file system and then I upload it to the webserver. If I'm not wrong, there doesn't even need to be a file listing.
The command I'm using is:
mvn deploy -DaltDeploymentRepository=local::default::file:./repo
This creates/updates the local repository automatically, so the repo can be synced with a server.
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.