The JFrog team announced this week the release of Artifactory 3.5.1, which is a minor update that now works with the Oracle Maven Repository.
I spent a little while yesterday having a look at it, working through the configuration of a remote repository and testing it with a maven project to see how it worked.
Once I’d downloaded it and started it up — much love for simple and obvious bin/*.sh scripts — it was a very simple three step process:
- Since we live behind a firewall first add a proxy configuration to point at our proxy server.
- Add a new remote repository and pointed it at the Oracle Maven Repository, specifying its URL and using my OTN credentials as username and password.
The Artifactory 3.5.1 documentation stated that the Advanced Settings > Lenient host authentication and Enable cookie management options must be checked when accessing the Oracle Maven Repository.
The Test button is handy to verify the server settings have been entered correctly.
- Use the Home tab > Client Settings > Maven Settings link to generate and save a settings.xml file that uses the artifactory server.
With the repository running, configured and the settings.xml saved, its then possible to try it out with an existing maven project such as https://github.com/buttso/weblogic-with-arquillian.
I also nuked my local repository to force/verify that the dependencies were fetched through the specified Artifactory server.
$ rm -fr ~/.m2/repository/com/oracle $ mvn -s artifactory-settings.xml test
Viewing the output of the mvn process and the running Artifactory server you can see that maven is downloading dependencies from http://localhost:8081/artifactory and correspondingly Artifactory is downloading the requested artifact from https://maven.oracle.com.
Once the maven process has completed and all the requested artifacts downloaded, Artifactory will have cached them locally for future use.
Using the Search functionality of the Artifactory Web UI you can search for weblogic artifacts.
Using the Repository Browser functionality of the Artifactory Web UI you can view and navigate around the contents of the remote Oracle Maven Repository.
Nice JFrog > Artifactory team – thanks for the quick support of our repository.
One further thing I’d look at doing is enabling the Configure Passwords Encryption option in the Security settings to encrypt your OTN password, so that it’s not stored in cleartext in the etc/artifactory.config.latest.xml file.