So, Your Nexus Repository Manager Claims It Supports NuGet. O RLY?

Both Sonatype Nexus Pro and Artifactory Pro claim they support NuGet format for proxying NuGet Gallery and hosting NuGet packages. But the term “support” is rather vague. Let’s try to compare the features of the NuGet Support in both tools, down to business.

Comparing the full solution is far beyond the scope of a single blog post, so I’ll just review the differences here for the following features:

  • Content of the package
  • Metadata
  • Searching
  • CI Server Integration

Well, let the screenshots speak:

Content of the package (directory tree)

First, let’s flatter Nexus. They can expand archives:

Nexus can expand Maven artifacts (jars)

But look, this marvelous ability disappears when it comes to NuGet!

Nexus can't expand Nuget Packages

Come on, guys.

Artifactory can expand nuget packages


Well, let’s compare the amount of metadata your binary repository provides for a NuGet package:

Poor Nuget metadata in Nexus


Rich Nuget metadata in Artifactory

OK. No standard metadata for you in Nexus Repository Manager. What about custom metadata?

Finally, Sonatype understands the importance of custom metadata for artifacts in binary repository. That’s why Nexus Pro comes with Custom Metadata Plugin built in. Or, not. It doesn’t. Never mind. Just install it manually (for every new version, yup).
So, eventually, here we go:

Custom Properties for Maven artifacts in Nexus

Works for jars like a charm. But hey, where my Metadata go in NuGet?!

No custom metadata in Nexus for Nuget packages

Ah, here it is. In Artifactory:

Custom metadata for Nuget in Artifactory


Well, that’s the basics, right? Binary repository, lots of artifacts, we use search. Sonatype takes it to extreme with their Maven Central – the only browsing mode you can get is search!
So, the search should kick ass in Nexus! Oh, wait… It doesn’t work at all:
No search for NuGet packages in Nexus
Sonatype guys will probably tell you to use the searching abilities of Visual Studio to find NuGet packages inside Nexus Repository Manager. That’s a good feature, but entirely different from what we are talking about! Nexus UI is an administrative tool, while VS UI is a client tool with a totally different set of features and usage! Different audience, different scope. So, don’t let them fool you, one can’t be a replacement for the otherNeedless to say, NuGet package search works perfectly in Artifactory:
Nuget packages found in Artifactory

CI Server Integration

Now let’s talk about CI server integration.
Those plugins collect vital information during the build process and deploy it to Artifactory for having reproducible builds and traceable build artifacts. Naturally, it works for NuGet builds as well:
Build Browser in Artifactory with TeamCity Nuget build
Sonatype doesn’t have any plugins for TeamCity or Bamboo, although they have an Insight plugin for Jenkins. It’s not a Nexus plugin, but it integrates with Nexus Repository Manager, so we’ll consider it qualified.
What does that plugin do? Here’s the oficial description: “Insight for CI analyzes every component in every build, including dependencies, to help you find and fix license, security and quality problems quickly. “
Sounds almost like a fraction of what Artifactory Build Integration does. There is a problem though. Ah, you guessed it already. It won’t work in Nexus for NuGet repositories. Well, that somehow became the theme line of this blog post.
So now, when you know which binary repository really supports NuGet, enjoy your build!P.S. for more “Nexus supports” myth busting you are welcome to visit the community-maintained comparison matrix, or download the Binary Repository DZone Refcard.