Artifactory provides a plugin for tight integration with Maven. Through this plugin, Maven can be configured to resolve artifacts through Artifactory by modifying properties in the Maven settings file. And to make things really easy, Artifactory can even generate the corresponding settings file directly from its UI.
Optimized builds through reduced networking
Running builds through Artifactory can reduce build times significantly by reducing networking. This is because Artifactory stores remote artifacts locally in remote repository caches, so once an artifact has been cached, it is locally available for builds without the need for any networking.
Integrating Maven with Artifactory also makes builds more reliable, by removing any dependency on remote repositories or the external network. Even if a remote repository goes down or if there is an issue with the external network, the build will succeed since remote artifacts are available from the local cache.
Fully reproducible builds
But there is another big advantage of Artifactory’s integration with Maven.
Artifactory generates exhaustive build information and uploads it to a local repository together with the build. This includes specific artifact versions, dependencies, system properties, environment variables, user information, timestamps and more. With this information, it is easy to faithfully reproduce a build at any time. Moreover, with built-in “Diff” tools you can compare builds and therefore know exactly what changes were introduced from one version to another. These capabilities can be invaluable when trying to track down bugs that were reported in specific versions released.