Should we use Nexus or Artifactory for a Maven Repo?

后端 未结 12 1539
悲&欢浪女
悲&欢浪女 2020-12-07 07:28

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.

<
相关标签:
12条回答
  • 2020-12-07 08:09

    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.
    0 讨论(0)
  • 2020-12-07 08:10

    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

    0 讨论(0)
  • 2020-12-07 08:11

    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

    0 讨论(0)
  • 2020-12-07 08:12

    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.

    0 讨论(0)
  • 2020-12-07 08:17

    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.

    0 讨论(0)
  • 2020-12-07 08:22

    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 :-(

    0 讨论(0)
提交回复
热议问题