120
votes

We are using Maven for a large build process (> 100 modules). We have been storing our external dependencies in source control, and using that to update a local repo.

However, we are ready to graduate to a local repo that can cache central so that we don't have to proactively download all 3rd parties (but we can still have a local repo to pull from). In addition we want to publish our internal build artifacts from a nightly build so that developers don't have to build the world.

We are considering Nexus and Artifactory. What are the reasons for preferring one over the other? Are there others we should be considering?

12
Your link is not too objective, here's the other side response blogs.jfrog.org/2009/01/contrasting-artifactory-and-nexus.htmluser58773
I think you should consider a plain http server like Apache or nginx. They are "Boring Technology" (mcfunley.com/choose-boring-technology).Johan Walles
@JohanWalles: more like "Inconvenient and Productivity-Reducing Technology" in this context.Priidu Neemre

12 Answers

74
votes

I don't know about Artifactory but here are my reasons for using Nexus:

  • Dead simple install (and since 1.2, dead simple upgrade, too)
  • Very good web UI
  • Easy to maintain, almost no administrative overhead
  • Provides you with RSS feeds of recently installed, broken artifacts and errors
  • It can group several repositories so you can mirror several sources but need only one or two entries in your settings.xml
  • Deploying from Maven works out of the box (no need for WebDAV hacks, etc).
  • it's free
  • You can redirect access paths (i.e. some broken pom.xml requires "a.b.c" from "xxx"). Instead of patching the POM, you can fix the bug in Nexus and redirect the request to the place where the artifact really is.
119
votes

I'm sure that if you only talk about storing binaries from "mvn deploy" both will do fine.

We use Artifactory very extensively with all upgrades along the way. Lots of projects, numerous snapshots deployed and external repos proxied. Not a single problem. I find it hard to explain how other people experience issues with its DB, indexing or anything else. Nothing like that ever happened to us. Also, Artifactory allows to store data on a disk and only use a DB for storing metadata, it is quite flexible (see more here).

What makes those applications very different is their approach towards integration with other build tools and technologies. Nexus and Sonatype are pretty much locked on Maven and m2eclipse. They ignore anything else and only recently started to work on their own proprietary Hudson integration (see their Maven 3 webinar). EDIT: This is not true anymore as of 2017 Nexus gives a much larger support for other build tools End of Edit

Artifactory provides an awesome Hudson, TeamCity and Bamboo integration, and Gradle / Ivy support. So while Nexus gives you nothing once you step out of Sonatype "comfort zone" (Maven, m2eclipse), Artifactory embraces and collaborates with all major build tools.

In fact, being able to deploy build artifacts from Hudson, when job has finished, and not by "mvn deploy" is a huge difference: Artifactory Hudson plugin makes an atomic-like deploy of all artifacts at once, only when a build job finished successfully. "mvn deploy" runs after each module and can deploy a partial set of artifacts if a build job fails in the middle. Deploying from Maven on module completion and not from a build server on job completion is really a bad thing to do.

As you see, Artifactory thinks "outside the box" while Nexus thinks "inside the box" and only cares about Maven and Maven artifacts.

Something else that makes Artifactory more accessible is their cloud-based Artifactory Online solution. For about $80 a month you have your own Artifactory instance, no need to dedicate any server for it.

Artifactory has a simple and straightforward REST API, don't know how it works for Nexus. Edit Nexus has also a REST API that you can use easily as well.

To summarize, for basic storage of Maven artifacts I think both are fine. But while Nexus stops there being strictly a "Maven repository manager", Artifactory goes on and on, being a general "Binaries storage" for binaries of any kind, from any build tool and CI server.

27
votes

Artifactory supports both file-system and database storage backends. Storage is checksum based and identical binaries are stored only once, no matter how many times they appear in the repo, which makes Artifactory more efficient storage-wise. Move and copy are also very cheap because of this architecture (in Nexus there's no REST for move/copy - you have to move stuff on the file system, then run corrective actions on the repo to let it know content has changed).

Another important differentiator is Artifactory has unique integration with Hudson and TeamCity for capturing information about deployed artifacts, resolved dependencies and environment data associated with build runs, which provides full build traceability.

21
votes

Artifactory stores the artifacts in a database, which means that if something goes wrong, all your artifacts are gone. Nexus uses a flat file for your precious artifacts so you don't have to worry about them all getting lost.

9
votes

If you need the "Pro" features of either (e.g. Staging repos, artifact promotion, NuGet), , then you need to consider the different pricing models, which are displayed on their websites.

In summary:

  • Artifactory Pro
    • you pay per server
    • you can pay more for increased service hours
  • Nexus Pro
    • you pay per seat, i.e. how many developers downloading artifacts
    • support service is Mon-Fri 0800-2000 ET only, no matter what you pay

No matter how many users you have, Nexus Pro offers a support service that's broadly equivalent to Artifactory's $7,450/year "Silver Value Pack".

$7,450/year will buy you approximately 67 Nexus Pro seats (1-50 @ $108, the rest @ $120).

On price and support alone then, Nexus Pro makes sense until you get to 67 users, at which point Artifactory becomes the cheaper option.

If you're doing all the support in-house; however, that magic point is about 23 users (Artifactory's most basic support offering is $2,750/year).

8
votes

I made some research recenly about Artifactory 2 and Nexus 1.3. I'll list here the main differences I found:

  • Artifactory stores metadata and optionally files in DB, Nexus writes directly to file system. There are pros. and cons. for each approach. DB supports transactions, while in FS stored files can be accessed directly.
  • Artifactory has higher system requirements especially for disk space.
  • Artifactory has LDAP support, while Nexus has it only in paid version. On the other hand free LDAP plugin for Nexus is available on Google code.

The most complete comparison: http://binary-repositories-comparison.github.io/

7
votes

You should use Artifactory Its latest version was a real jump You can backup incrementally your repositories , which means you can have all your artifacts saved and maintain Its has a easy to use web ui and is really easy to set up i enjoyed it a lot check out its new version 2.0

5
votes

From a learners point of view I note some specific differences between the two.

  1. Sonatype .war deployment is not supported on Jboss application server at the time, although it does run under Tomcat.
  2. Sonatype does not offer me an Amazon Machine Image (AMI), at present, that I could quickly stand up and test.
  3. An Artifactory AMI is provided by Bitnami and takes a only a few minutes to stand up and a few more minutes to configure, maybe several tens of minutes dependant upon what you're trying to achieve.
  4. Artifactory offer a SaaS version of Artifactory in the cloud so you can focus on getting things done rather than infrastructure.
  5. I've no experience with Nexus but I've found Artifactory very intuitive and easy to configure, at least initially.
  6. Added - I do note that the Artifactory User Guide, which may be OK for a seasoned pro, is a bit light on for some in depth explanations. For instance, starting out, one unzips and then addes a Repository, say RedHat's Jboss EAP Enterprise Repo. All goes fine but then when I tried to view the artifacts that were imported Artifactory reports zero artifacts? No errors or warnings so I'm now looking for an explanation. Is this normal or not normal? A simple explanation in the doco can quickly point one in the right direction. Being a good contributor I'm adding these comments to the project for the benefit of other starters.
3
votes

All politics/religion aside, licensing makes a difference for some organizations.

Nexus is GPL now AGPLv3 and now Eclipse Public License (EPL).

Artifactory is Apache licensed LGPLv3 licensed as of version 2.1 of the product.

You may also want to consider Archiva, just for comparison's sake. It's Apache 2.0 licensed.

2
votes

I see that Nexus usage is growing, while Artifcatory usage is generaly staying flat.

enter image description here

Picture is taken from here http://blog.sonatype.com/2014/11/42000-nexus-repository-managers-and-growing/

There is also matrix-comparison http://docs.codehaus.org/display/MAVENUSER/Maven+Repository+Manager+Feature+Matrix

-2
votes

Both Artifactory and Nexus have more or less similar feature set but Artifactory's LDAP support makes it more attractive over Nexus. Though Nexus also have LDAP support but in paid version :-(

-2
votes

Hmmm...my experience with artifactory is awful...but I'm a relative newbie so take it with a grain of salt. My overall complaint is that jar files recently uploaded to Artifactory do not seem to get indexed right away - as in for hours - and there does not seem to be a good way to force it. I've tried various things that appeared as if they should have worked, but didn't. I have been working with m2eclipse, adding dependencies to a project that i'm converting from ant. When I try to add a jar that I have just added to artifactory, I expect it to show up as a choice in the selector but it does not.

a coworker told me that they had installed nexus and so far they like it...but I can't vouch for it yet. I'm about to install that on a Linux box as soon as IT can find me one.