Nexus Site Repository: Can I use SCP? - maven

We run a Nexus 2.14 with a site repository. At the moment, we deploy the sites using DAV, which is at times quite a burden for the server because a lot of small files are transferred separately.
SCP would probably be a better alternative, but I found no information whether this is supported by Nexus and if so, what I need to do to use it.

The Sonatype support told that this is not possible.

Related

How to integrate Maven and Github without third party services?

I am currently using JitPack to access my GitHub repository via Maven. I used to love JitPack, but their servers seem to be overwhelmed, they have terrible technical support, so all in all I'd like to stop using it. Does anyone have a suggestion on what is a good way to achieve a similar result? In other words, I'd like to be able to push a change to my GitHub repo, tag it, and be able to use it in my maven builds immediately.
My follow up question is: why is there even a need for a third party server to host these jars? Is there any way to simply have maven pull these github repos, compile them locally, storing cache in ~/.m2, and that's it. For most of my development effort, this would be enough. I find myself constantly at the mercy of JitPack's crappy servers and poor service that drive me crazy.

How to pull down Nexus OSS repo files with a Jenkins pipeline?

I'm trying to replicate a Jenkins production need in my lab, and it involves fetching/pulling files from Github & Nexus 2, building with ant/gradle, then publishing to Nexus. The Github part is working fine in my Jenkins pipeline, but I'm having some issues with the syntax/reqs for Nexus. I installed Nexus OSS in my lab to duplicate Nexus 2's functionality. I am able to upload files manually to the repo using curl, and I'm sure I can use it to download as well. This doesn't seem like the best or most efficient option however, if there will be multiple files.
I keep seeing references to Maven/pom.xml on all my searches for this topic, but I can't find a good primer on how to use them in this context. Would a pom.xml file be the best option for
this Jenkins/Nexus configuration and the requirements? Also, how close are Nexus 2/3 in functionality to Nexus OSS? Will I be able to port over the code for use with nexus 2 fairly easily?

Download maven2 repository for offline use

We are developing offline due to limited internet resources and would like to run once every several months a whole grab of an external repository (e.g repo1.maven.org/maven2 - Disk space isn't an issue).
Today I'm using a simple POM that contains a lot of common dependencies that we are using, I've set my local maven to use a mirror to proxy thru a local nexus repository to cache locally and this is how I'm grabbing for offline use - but that isn't very effective.
I'm now looking for a command line tool that allow me to run searches on maven repositories so that I can write a script that grab them all to my local nexus installation and would like to hear if there is any or if there is another way to achieve that.
Thanks
Not a whole solution (yet) but I'm using httrack to grab the whole content of repo1.maven.org/maven2 - That is already better than nothing :)
In general, there is a goal in Maven dependency plugin called "go-offline"
So it allows to grab all the project dependencies and to store them in local .m2 repo.
You can find more information here.
If you want to run Maven and tell it to behave like the network does not exist you can run it with "-o" option (offline mode). So that if there is no dependency installed locally, Maven won't even try to go to network and bring it - but will fail the build.
On the opposite, if you want to force Maven to check and bring new versions (otherwise they already should be in your repo), you can use "-U" option.
I'm not really sure I've got the point about general search-and-download use case. Usually people install Nexus or Artifactory once in a network so that each dependency will be downloaded only once. In local development machines people usually just work with filesystem and don't maintain tools like this.
Now if you want to copy the whole repository from internet (for copying it later to some other network or something) you can just use crawlers like Apache Nutch for example or craft your own script that will recursively download all the files.

nexus on tomcat stops responding - alternative to this repository manager

Last year I got virtual server for my server needs, configuration is not great, but things work without problem... Few months ago I installed Nexus Repository manager and after that I have daily problem with tomcat... I now restart machine every night, but still it seems that nexus is unavailable most of time.
I am working on OS project and we need to have repository manager (RM) available to host all our stuff and also all libraries our project needs...
I have currently 3 options (how to solve this problem):
Downgrading maven version to 1.6 (or at least some that is stable and doesn't need so much resources)
Using artifactory (their package seems to be the same size as nexus, but I don't know if it will be better - resource wise)
Using archiva (no idea how stable this is and how good it is)
I am thinking about going with option 3, I just don't know if this is right solution. I am sure some of you have your own RM running, what would you recommend? Do you have perhaps any other options? If I use option 1, which version would you recomend...
Thanks in advance,
Andy
By "downgrading Maven version to 1.6" I assume you're referring to the Java version, as if you're using such an old Nexus, then it doesn't shock me that you're having problems. Upgrade your Java to 1.7.x, as well as your Nexus to the latest one.
Archiva and Artifactory are always options, but I don't think the problem is in Nexus itself, but rather your setup (and you haven't mentioned anything about it).
What version of Java, Nexus, Tomcat are you using?
Also, by "OS project", I assume you mean "OSS" (open source) project. If so, you can use Sonatype's OSS hosting. I've described how to set up an OSS project (using Github, BuildHive and Maven Central) here. You can also just skip to using Maven Central directly, checking here. I think this would be a better option for you, if you're not familiar enough with managing your own repository manager.
I would suggest to run Nexus with the native jetty as supplied by the default download bundle instead of on tomcat. This will give you better performance and also better support.
Of course if you can get all libraries into the Central Repository via OSSRH it would be even easier since you could get by without maintaining a repository manager altogether.

Does Artifactory offer similar feature that the procurement suite in Sonatype Nexus Pro does?

I am researching the pros/cons of Artifactory and Nexus.
There is a feature in Nexus that I like very much -- the procurement suite. It provides GUI to define the procurement rule. After the procured repository is populated with all the artifacts needed for the build, the admin can choose to stop the procurement and the procured repository is reverted back to be a local repository. As I understand, Artifactory provides includes/excludes pattern definition in the remote repository to achieve similar control, but it is far more rudimentary than what Nexus offers. I am not an expert on Artifactory. Does Artifactory offers something more advanced to tight control the artifacts used in the build, like the procurement suite does?
BTW, I like Artifactory's Watch feature, sending email when a add/delete/update happens in a watched repository. Nexus does not offer email notification, though it provides RSS feed. Artifactory does not support RSS feed now, but it says this feature is in development. Sometimes I just wish there is one product that can offer all these features combined. :-)
Ok. The JFrog folks gave me the official answer and would like to share with everyone. Theincludes/excludes pattern I mentioned in my original question is the main mechanism Artifactory uses to control the access the artifacts in the build. Besides that, Artifactory also offers something called License Control Addon in their Pro version. It basically allows you to manage and get alerted for unauthorized licenses of 3rd party libraries and dependencies when they are getting deployed from your CI server. It does not directly apply to my use case, but it is good to know. Also they pointed out that as a user, I can use their User plugin API to do whatever I want. That's also good to know, but at least for now, I am not interested in developing a plugin for Artifactory myself.
It's been a while since I used artifactory, but I think when you configure a repo, you have the option on applying a regex to the artifacts that it will pull. That might do what you need/want.

Resources