Artifactory Guide - Jf

224
Artifactory User Guide

Transcript of Artifactory Guide - Jf

  • ArtifactoryUser Guide

  • Table of Content1. Artifactory User Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

    1.1 Installing Artifactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.1.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.1.2 OS Service or Standalone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    1.1.2.1 Installing on Un*x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.1.2.2 Installing on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    1.1.3 RPM Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.1.4 Deployment on Other Servlet Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    1.1.4.1 Deploying the WAR File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.1.4.2 Dedicated Tomcat Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.1.4.3 Deploying on JBoss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.1.4.4 Deploying on IBM Websphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

    1.1.5 Running Behind Apache HTTPd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.1.6 Changing the Default Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    1.1.6.1 Running Artifactory on MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151.1.7 Upgrading Artifactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    1.1.7.1 Intermmediate Upgrade to Previous Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171.2 Administering Artifactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    1.2.1 General Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191.2.2 Managing Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    1.2.2.1 Understanding Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211.2.2.2 Configuring Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231.2.2.3 Local and Remote Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241.2.2.4 Local Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241.2.2.5 Remote Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    1.2.2.5.1 Managing Caches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261.2.2.5.2 Handling Offline Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281.2.2.5.3 Handling Checksums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291.2.2.5.4 Going Through Proxies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301.2.2.5.5 Advanced Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311.2.2.5.6 Importing Shared Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

    1.2.2.6 Virtual Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341.2.3 Managing Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

    1.2.3.1 Managing Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371.2.3.1.1 Recreating the Default Admin Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    1.2.3.2 Managing Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391.2.3.3 Managing Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401.2.3.4 Managing Security with LDAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431.2.3.5 Centrally Secure Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451.2.3.6 Access Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

    1.2.4 Managing Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471.2.5 Importing and Exporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491.2.6 Mail Server Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531.2.7 Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

    1.2.7.1 Global Configuration Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541.2.7.2 Security Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551.2.7.3 System Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

    1.2.8 Exposing Maven Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571.2.9 The artadmin Command Line Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581.2.10 Clustering Artifactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601.2.11 The Artifactory Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611.2.12 System Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

    1.3 Working with Maven . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621.3.1 Configuring Artifacts Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631.3.2 Configuring Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

    1.4 Working with Gradle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661.4.1 Gradle Artifactory Plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

    1.4.1.1 Gradle Artifactory Plugin using the snapshot version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731.5 Working with Ivy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741.6 Using Artifactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

    1.6.1 Browsing Artifactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781.6.2 Attaching and Reading Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821.6.3 Deploying Via the Web UI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841.6.4 Searching Artifacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

    1.6.4.1 Quick Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861.6.4.2 Class Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871.6.4.3 POM and XML Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871.6.4.4 Property Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881.6.4.5 GAVC Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 891.6.4.6 Checksum Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

    1.6.5 Manipulating Artifacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 901.6.5.1 Removing Single Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 901.6.5.2 Cleaning-up Complete Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

  • 1.6.5.3 Moving Artifacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911.6.6 Updating Your Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921.6.7 Artifactory's REST API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

    1.6.7.1 Repository Configuration JSON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1281.6.7.2 Security Configuration JSON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1291.6.7.3 System Settings JSON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

    1.7 Artifactory Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1311.7.1 Installing the Artifactory Pro Power Pack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1321.7.2 Artifactory Version Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1331.7.3 Build Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

    1.7.3.1 Jenkins (Hudson) Artifactory Plug-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1421.7.3.2 TeamCity Artifactory Plug-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

    1.7.3.2.1 TeamCity Artifactory Plugin - Release Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1521.7.3.3 Bamboo Artifactory Plug-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

    1.7.3.3.1 Bamboo Artifactory Plugin - Release Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1631.7.4 License Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1701.7.5 LDAP Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1741.7.6 Repository Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1761.7.7 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

    1.7.7.1 Using Properties in Deployment and Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1791.7.8 User Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1811.7.9 YUM Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2001.7.10 P2 Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2021.7.11 NuGet Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2051.7.12 Repository Layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2081.7.13 Smart Searches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2171.7.14 Atlassian Crowd Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2171.7.15 Single Sign-on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2191.7.16 Filtered Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2201.7.17 Watches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2221.7.18 WebStart and Jar Signing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

    1.8 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2231.8.1 Dealing with Broken Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

  • 4 Copyright 2012 JFrog Ltd.

    1. 2. 3.

    Artifactory User Guide

    Welcome to the Artifactory User Guide!

    Please use the left navigation bar to find your way around the Artifactory docs.

    This user guide is for . The previous 2.0 user guide can be found .Artifactory 2.1.x and higher here

    Installing ArtifactoryBefore you install, please check the .system requirements and supported platforms

    Artifactory can be installed and run in a couple of ways:

    On the as a bundled Jetty container standalone server, or as Unix or Windows serviceUsing the , which sets up Artifactory as a service on a - recommended.RPM distribution bundled Tomcat containerOn as a - Tomcat 6 or 7 is recommended.other servlet containers standard WAR weapp

    You can also configure Artifactory to run on top of various , for greater performance and ease of maintenance.storage options

    Requirements

    JDKYou can run Artifactory with and above, but we strongly recommend using the latest JDK 1.6 update, preferably JDK 1.6 update 23 andJDK 1.6above.When running with you wll need JDK version and above (ealier versions of JDK 1.6 are bundled with a JAXB version which isJDK 1.6 1.6.04incompatible with the version used in Artifactory).At least 300MB of allocated Java heap space is recommended, though you should be able to run with less RAM.

    If you can reserve 1g or more for Artifactory JVM, the recommended JVM option parameters are:

  • 5 Copyright 2012 JFrog Ltd.

    -server -Xms1g -Xmx1g -Xss256k -XX:PermSize=128m -XX:MaxPermSize=128m -XX:SurvivorRatio=8-XX:NewSize=512m -XX:MaxNewSize=512m -XX:+UseConcMarkSweepGC

    Operating SystemsArtifactory has been tested and verified on Windows, Linux, Solaris and MacOS X. You should be able to run Artifactory on other platforms thatsupport JDK 1.5 and above, though we haven't tested them.

    BrowsersArtifactory has been tested with Firefox 2.0, Firefox 3.0, Internet Explorer 6, Internet Explorer 7, Safari 3.2 and Google Chrome 1.0.

    OS Service or StandaloneBefore installing Artifactory on the bundled standalone Jetty server make sure you have set the environment variable to point to aJAVA_HOMEvalid JDK 1.5+ home.

    Then, follow these instructions for installing the standalone version under or .Windows Unix

    After successfully installing Artifactory, it should be available locally at: .http://localhost:8081/artifactory

    Installing on Un*x

    Unix

    When using Unix, it is possible to install Artifactory as a Unix service or run it manually.Before you install is recommended you first verify your current environment by running under the artifactoryctl check

    folder (this script is, in fact, a customized Jetty init script).$ARTIFACTORY_HOME/bin

    Installing Artifactory as Linux Service

    Introduction

    Artifactory is packaged with a complete install script that can be used to install it as a Unix service running under a custom user and using thestandard Unix directories.

    Installing

    To setup Artifactory correctly as a Linux service run, , the script.as root $ARTIFACTORY_HOME/bin/install.sh

    Here is the main information about what this script is doing:

    Usercreation

    Creates a user named "artifactory" ( ) by default. You can change the default user by editing the $ARTIFACTORY_USER value in . The install script accepts the user name as its first and only$ARTIFACTORY_USER /etc/artifactory/default

    parameter.

    etcconfig

    Creates the folder , copies the configuration files there and creates a soft link in /etc/artifactory $ARTIFACTORY_HOME/etc

    etcdefault

    Creates the file that contains the main environment variables needed for artifactory to run: /etc/artifactory/default... JAVA_HOME, ARTIFACTORY_USER, ARTIFACTORY_HOME, JAVA_OPTIONS,

    The is included at the top of and so can include whatever you wish. /etc/artifactory/default artifactoryctlNOTE: The default max memory is 1GB

    init.d It copies the file to artifactoryctl /etc/init.d/artifactory

  • 6 Copyright 2012 JFrog Ltd.

    Logsfolder

    Creates folder, makes it writable for the user and creates a soft link /var/log/artifactory ARTIFACTORY_USER.$ARTIFACTORY_HOME/logs

    Backupfolder

    Creates the folder , so you will need to create a link if you wish this folder to point to somewhere$ARTIFACTORY_HOME/backupelse (like for example). The script makes writable for the user /var/backup/artifactory $ARTIFACTORY_HOME/backup

    .ARTIFACTORY_USER

    Datafolder

    Create the folder , so you will need to create a link if you wish this folder to point to somewhere else.$ARTIFACTORY_HOME/dataThe script will make it writable for the user .ARTIFACTORY_USER

    chkconfigcalls

    The script calls add, list (you can see the output), then activate the Artifactory service

    After running the script successfully you can test the installation by running: or service artifactory check /etc/init.d/artifactorycheck

    And if everything is OK, start artifactory with:

    service artifactory start

    or

    /etc/init.d/artifactory start

    You can then check the Artifactory log with:

    tail -f $ARTIFACTORY_HOME/logs/artifactory.log

    Normally Artifactory will be started as (when running as a service) and will internally to the user. If the root su $ARTIFACTORY_USER is undefined Artifactory will run as the current user, which is not recommended, especially if the current user is , due$ARTIFACTORY_USER root

    to security considerations.

    Running Artifactory Manually on Unix

    You can run artifactory manually with directly to see its behavior. The console will be locked on artifactory process and youartifactory.shcan stop it cleanly with .crtl+c

    You can also try executing

    artifactoryctl check|start|stop

    to directly run Artifactory as a daemon process, using the environment variable of the shell you are currently in.

    Installing on Windows

    Windows

    When using Windows it is possible to install Artifactory as a Windows service or run it manually.

    Installing Artifactory as a Windows Service

    Overview

    Artifactory makes use of the components in order to give the user a way to install the application as a Windows Service. Java Service Wrapper

  • 7 Copyright 2012 JFrog Ltd.

    Requirements

    The "java" system path is used in the JSW ( ). This to anconfiguration file %ARTIFACTORY_HOME%\bin\wrapper.conf value can be alteredenvironment variable, full-path, etc.

    Installing

    To install Artifactory as a Windows service, browse to , and execute the file .%ARTIFACTORY_HOME%\bin InstallService.bat

    Uninstalling

    To uninstall the Artifactory service, browse to , and execute the file .%ARTIFACTORY_HOME%\bin UninstallService.bat

    Running Artifactory Manually on Windows

    Just execute "artifactory.bat" under the bin folder. This will look for the Java executable and run Artifactory's main class.

    RPM Installation

    OverviewArtifactory can also be installed as an RPM package on RedHat compatible Linux distributions.The RPM distribution is available starting with Artifactory 2.3.3.

    The RPM package creates a dedicated user, installs a stripped-down distribution of the Apache Tomcat container configured for Artifactory (onport 8081 by default), and registers this Tomcat as a service (but does not start it immediately).This package effectively replaces the different setup scripts that are included with the Artifactory zip distribution.

    RequirementsMust be installed using the root user (or sudo).An environment variable named pointing to the installation directory of JDK 1.5+ (the latest JDK 1.6 is JAVA_HOME highlyrecommended).

    Managed Files And Folders

    Purpose Location Ownership

    Artifactory binary and Tomcat home /opt/artifactory root

    Artifactory startup script /etc/init.d/artifactory root

    Artifactory home /var/lib/artifactory artifactory

    Artifactory etc /etc/artifactory artifactory

    Artifactory logs /var/log/artifactory artifactory

    Artifactory environment variables /etc/artifactory/default artifactory

    MySQL Additional ConfigurationThe RPM includes a small CLI tool that assists with the configuration of Artifactory to use MySQL as a (recommended).storage methodAfter running the RPM installation process, it will offer you to run the MySQL configuration manually.The tool is located in and requires MySQL to be pre-installed and running./opt/artifactory/bin/configure.mysql.sh

    Installing Artifactory

  • 8 Copyright 2012 JFrog Ltd.

    To install Artifactory use:

    rpm -ivh artifactory-rpm-.rpm

    Running ArtifactoryTo start and stop Artifactory use the init script:

    /etc/init.d/artifactory start

    or-

    /etc/init.d/artifactory stop

    Accessing ArtifactoryArtifactory should be available under the following URL:

    http://localhost:8081/artifactory

    Deployment on Other Servlet Containers

    GeneralArtifactory is a standard Java EE web application. As such, it can be installed and run on any Servlets 2.5 compliant Container.We specifically verified Artifactory to work seamlessly on Tomcat 6 & 7, Jetty 6 & 7, JBoss 4.x & 5, BEA Weblogic 9, GlassFish v2 & V3, IBMWebsphere 6.1 and Resin.

    Please follow the for installing on any servlet container.generic instructions the artifactory.war

    There are also more detailed and specific instructions for installing under and and .Tomcat IBM Websphere JBoss

    GlassFish requires Artifactory 2.0.1 and above.

    Deploying the WAR File

    "Drop the War": Zero Configuration

    Artifactory can be installed under any Servlet container by simply dropping or installing the file into the containers webartifactory.warapplications folder, for example, into Tomcat's folder.webappsAll you have to do is deploy the file into your Servlet container, either by hot-deploy or by following the container's standardartifactory.warweb application deployment procedures.

    The file is located under the folder in the distribution.artifactory.war webapps artifactory-x.y.x.zip

    It is recommended not to include any version characters in the name of the war file, and leave it just as: , inartifactory.warorder not to have version-specific information in the Artifactory base URL and in order to make future upgrades simpler.

    The Folder$ARTIFACTORY_HOME

    Even with zero configuration, it is important to know where the Artifactory home folder is, since this folder stores your configurations and importantrepository data.

  • 9 Copyright 2012 JFrog Ltd.

    1.

    2.

    1. 2. 3.

    4.

    When Artifactory runs for the first time, it will set up a default configuration and create all needed files and folders under a $ARTIFACTORY_HOMEfolder that, if unset, will default to .${user.home}/.artifactory

    If you wish to control the location of (which you probably do when installing Artifactory on a production server), you can do$ARTIFACTORY_HOMEone of the following:

    Startup the Servlet Container VM with , pointing to the location of your Artifactory home-Dartifactory.home=$ARTIFACTORY_HOMEfolder, orSet an environment variable pointing to this location.$ARTIFACTORY_HOME

    Artifactory will try to create the folder on startup if it does not already exist.

    Make sure the folder is writable by the user running the Servlet Container.

    Manual Deployment

    You can set up Artifactory on any Servlet container by deploying the war and pointing Artifactory to a dedicated created byARTIFACTORY_HOMEextracting the Artifactory distribution zip. To do this:

    Extract the Artifactory distribution archive (artifactory-xxx.zip) to a dedicated folder. This folder will be you (verifyARTIFACTORY_HOMEthis by checking the presence of the file).$ARTIFACTORY_HOME/etc/artifactory.config.xmlStart the Servlet Container and specify the location of by either using a JVM argument or by using an environmentARTIFACTORY_HOMEvariable as explained in the previous section.

    Dedicated Tomcat InstanceThis documentation explains the steps for installation under Unix on a tomcat instance.automatic dedicatedFor manual Installation (on either a dedicated or shared instance) please refer to the documentation.Generic WAR Installation

    Automatic Installation on a Dedicated Tomcat Instance

    You can use the automated install script to set up a dedicated Tomcat server for Artifactory.

    These instructions have been verified against Tomcat 6, but should work on Tomcat 5 with minor adjustments.You can change the directory names to your liking but you'd need to adjust the install scripts accordingly (currently directorynames are hard-coded).

    Extract the Apache Tomcat download under ./opt/tomcat/artifactoryExtract Artifactory standalone /opt/artifactory/currentRun (or edit and run) the script.$ARTIFACTORY_HOME/bin/tomcat-install.shThe script will do the following:

    Run the script.$ARTIFACTORY_HOME/bin/install.shReplace with ./etc/init.d/artifactory $ARTIFACTORY_HOME/misc/Tomcat/artifactoryReplace tomcat's with (change its ports if you wish)conf/server.xml $ARTIFACTORY_HOME/misc/Tomcat/server.xmlCreate under Tomcat the directory and copy the conf/Catalina/localhost

    into it.$ARTIFACTORY_HOME/misc/Tomcat/artifactory.xmlReplace tomcat's with bin/setenv.sh $ARTIFACTORY_HOME/misc/Tomcat/setenv.shChange the Tomcat home owner : chown -R artifactory /opt/tomcat/artifactory

    The script will change the default Tomcat configuration files and is intended to be used on a newly installedTomcat only.

    Start tomcat:, orservice artifactory start

    /etc/init.d/artifactory startArtifactory will be available on this Tomcat instance on port 8081 for HTTP and 8019 for AJP13.

  • 10 Copyright 2012 JFrog Ltd.

    1. 2.

    3. 4. 5.

    6. 7.

    A Note About Pre-packaged Tomcat Distributions

    There have been a reports suggesting there are known problems deploying to automatically Tomcat installed as part of variousLinux distros with default security settings.See, for example: http://www.nabble.com/Re%3A-java.lang.NoClassDefFoundError%3A-org-quartz-CronExpression-p13139289.htmlPlease check the specific Tomcat installation you are using or download and install the "standard" Tomcat from the Apache site.

    Deploying on JBoss

    JBoss 5.x

    Artifactory runs out of the box on JBoss 5.x.

    JBoss 4.x

    For running Artifactory under JBoss 4.x, you'd have to tell JBoss to use the JVM's built-in MBean server. To do this, start JBoss with the system property set.jboss.platform.mbeanserver

    On Unix, you can do this by adding the following line to the JBoss startup script:

    export JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"

    It is also recommended to increase the max perm gen size of the JBoss VM to at least 256MB ( ).-XX:MaxPermSize=256m

    Deploying on IBM Websphere

    Overview

    Artifactory can run under IBM's WebSphere application server (this required specific adjustments in Artifactory in order to "play nicely" withWebSphere's own way of doing things).Please note, that this is an out-of-the-box feature and requires minimal manual setup.notThese instructions have been verified against WebSphere 6.1, but should work on WebSphere 7 as well.

    Setup

    Before deploying Artifactory into WebSphere:

    Extract the file.artifactory.warReplace the standard web.xml file under with the WebSphere-specific from %EXTRACTED_WAR_FOLDER%/WEB-INF web.xml

    .%ARTIFACTORY_HOME%/misc/websphereRepackage (zip) the war file.Start WebSphere.Add the following webcontainer custom property and set it to 'true' (see: ):PK33090

    com.ibm.ws.webcontainer.invokefilterscompatibility

    Save the change and restart WebSphere.Deploy normally into WebSphere.

    Running Behind Apache HTTPd

    Setting up Apache HTTPd as a Front-end to ArtifactoryYou may want to a use Artifactory behind Apache HTTPd. This can be done via two alternative protocols HTTP or AJP:

  • 11 Copyright 2012 JFrog Ltd.

    Client ----------> HTTPD ----------> Artifactory HTTP HTTP/AJP

    Using AJP

    The AJP protocol offers optimized low-level binary communication between the servlet container and Apache with additional support for smartrouting and load balancing. It can be used in Apache with , or with - for greater configuration flexibility. The examplesmod_proxy_ajp mod_jkbelow will use which is distributed with Apache by default.mod_ajp

    AJP and Jetty

    The AJP protocol is ("It is recommended to NOT use the AJP protocol, and superior recommended for use by Jettynotperformance and clearer semantics will be achieve [sic] using HTTP.").We therefore advise not to use AJP with Jetty, but to use as recommended by Jetty.mod_proxy

    Configuring Apache with Installedmod_ajp

    The sample virtual host refers to Apache as a reverse proxy to Tomcat, where Tomcat runs with the AJP connector on port 8009:

    ServerAdmin [email protected] DocumentRoot "/srv/www/httpd/htdocs" ServerName artifactory.yourdomain.com ErrorLog "logs/artifactory-error_log"

    ProxyPreserveHost on

    ProxyPass /artifactory/ ajp://localhost:8009/artifactory/

    Reset your cookies

    Whenever changing the Artifactory context path in Apache make sure to reset your browser's host and session cookies. Havingstale context path value cached by cookies can lead to strange UI issues, such as Not authorized to instantiate

    errors when switching between tabs.class

    Configuring Apache with changing the artifactory path

    Same setup as above but here the goal is to have as root URL for Artifactory:http://artifactory.yourdomain.com/repository/

    ServerAdmin [email protected] DocumentRoot "/srv/www/httpd/htdocs" ServerName artifactory.yourdomain.com ErrorLog "logs/artifactory-error_log"

    ProxyPreserveHost on

    ProxyPass /repository/ ajp://localhost:8009/artifactory/ ProxyPassReverse /repository/ http://artifactory.yourdomain.com/artifactory/ ProxyPassReverseCookiePath /artifactory/ /repository/

    Tomcat Configuration

  • 12 Copyright 2012 JFrog Ltd.

    On Tomcat you need to configure the AJP connector, which is located by default under :$CATALINA_HOME/conf/server.xml

    See for more configuration options.here

    Using HTTP Proxy

    Having Apache proxy Artifactory via HTTP is the recommended setup when running Artifactory from the default distribution which is Jetty-based.It is required to configure correct redirects using the pass-reverse directive as well as set the base URL in Artifactory itself so that UI links show upcorrectly.

    Configuring Apache with Installedmod_proxy_http

    The sample virtual host assumes Tomcat or Jetty HTTP connector runs on port 8081. Note that for HTTP redirects to work, you need to set apass-reverse directive on Apache, or the underlying container base URL will be passed in redirects (in this example to

    ).http://localhost:8081/artifactory/

    ServerAdmin [email protected] DocumentRoot "/srv/www/httpd/htdocs" ServerName artifactory.yourdomain.com ErrorLog "logs/artifactory-error_log"

    ProxyPreserveHost on

    ProxyPass /artifactory/ http://localhost:8081/artifactory/ ProxyPassReverse /artifactory/ http://localhost:8081/artifactory/

    Tomcat Configuration

    On Tomcat you need to configure the HTTP connector, which is located by default under :$CATALINA_HOME/conf/server.xml

    See for more configuration options.here

    Configuring a Custom URL Base in Artifactory

    When not using AJP, the links produced by Artifactory as well as certain redirects will contain the wrong port. To fix this, configure a custom baseURL, by going to .Admin:Configuration:General:Custom URL Base

    Set the base URL to the value used to contact Artifactory on Apache, for example: http://artifactory.yourdomain.com/artifactory

    See the section for more details about configuring the base URL.General Configuration

    Proxying Apache HTTPs to Artifactory running HTTPYou may want to run Artifactory behind Apache with SSL (HTTPs). This can also be achieved via HTTP or AJP:

  • 13 Copyright 2012 JFrog Ltd.

    Client ----------> HTTPD ----------> Artifactory HTTPs HTTP/AJP

    Using AJP

    If you are using Jetty (see above: AJP and Jetty), then AJP is recommend since it tells the servlet container everything about the correct basenotURL and requires zero configuration in Artifactory.

    Configuring Apache with Installed and Tomcatmod_proxy_ajp

    The Apache and Tomcat sample configurations are identical to the one listed on "Using AJP" on this page for non-HTTPs Apache.

    HTTPs to HTTP and Jetty

    Jetty does not support HTTPs to HTTP without a special extended connector that hardcodes the HTTPs scheme (see: - Proxying SSL on Apache to HTTP on Jetty). If you do not use this connector allhttp://wiki.eclipse.org/Jetty/Tutorial/Apache

    redirects will use the wrong scheme.We therefore recommend using Artifactory with Tomcat in this case, in favor of the default Jetty-based distribution.

    Using HTTP Proxy

    Configuring Apache with Installed and Tomcatmod_proxy_http

    The Apache and Tomcat sample configurations are identical to the one listed on "Using HTTP Proxy" on this page for non-HTTPs Apache.

    Configuring a Custom URL Base in Artifactory

    When not using AJP, the links produced by Artifactory as well as certain redirects will not only contain the wrong port but will use the httpscheme instead of . To fix this, configure a custom base URL, by going to .https Admin:Configuration:General:Custom URL Base

    Set the base URL to the value used to contact Artifactory on Apache, for example: https://artifactory.yourdomain.com/artifactory

    See the section for more details about configuring the base URL.General Configuration

    Changing the Default Storage

    OverviewArtifactory comes with a built-in Derby database that can be reliably used to store data for production-level repositories (up to hundreds ofgigabytes).Artifactory's storage layer supports pluggable storage implementations (made possible by the underlying Jackrabbit JCR), so you can configureArtifactory to run with almost any JDBC database or even store data completely on the file system.

    Once-and-Only-Once Identical Content Storage

    Artifactory stores identical binary files only once. When a new file about to be stored in Artifactory is found to have the same checksum as analready stored file, Artifactory will not store the new file content, but will make a link to it in the metadata of the newly deployed file. This principalapplies regardless of under which repository and path artifacts are deployed - you can deploy the same file to many different coordinates, and aslong as an identical content was found in the storage it will be reused.

    Changing the Storage Type Used

    The general principal for changing the storage used by Artifactory is to edit the file:$ARTIFACTORY_HOME/etc/artifactory.system.properties

    artifactory.jcr.configDir=repo/[selected-storage-type]

    The path used can be either a relative path to or an absolute path, and is expected to contain a file$ARTIFACTORY_HOME/etc repo.xml(which is a Jackrabbit configuration file).

  • 14 Copyright 2012 JFrog Ltd.

    1. 2.

    3.

    1. 2. 3. 4. 5.

    1. 2. 3. 4. 5.

    For a JDBC database you will also need to:

    Download the appropriate JDBC driver and install it in your server's shared lib directory.Create a database instance to which Artifactory will connect (when using an out-of-process database). Database tables will beauto-created.Change the database details in the file to match your database.repo.xml

    Backing up your existing installation

    When changing the storage type for an exiting installation you will need to import the old Artifactory content and configurationfrom backup. Make sure to back up your older Artifactory system before using a different storage type.

    Removing the old $ARTIFACTORY_HOME/data folder

    If you already run Artifactory before with a different storage type you will need to remove (or move-aside) the existing folder, or Artifactory will still use part of the old storage definitions and will fail to start up (you will$ARTIFACTORY_HOME/data

    see record not found exceptions on startup). Starting with a clean or no folder will fix this.$ARTIFACTORY_HOME/data

    Changes to repo.xml

    Except for updating the database details in , do not make any other changes to the file or try to manuallyrepo.xml repo.xmlreplace it with a from a newer Artifactory version.repo.xmlAll changes to the file as part of an Artifactory upgrade are always applied automatically.repo.xml

    When Artifactory is Deployed as a WAR

    If you and have not specified a location for the directory, it will be auto-created bydeployed Artifactory as a WAR $ARTIFACTIORY_HOMEArtifactory under ' '.$user.home/.artifactoryTo use the bundled configuration files for common storage types, you may want to copy the folder from the Artifactory distribution toetc/repoyour . Then edit the file as described above to$ARTIFACTORY_HOME/etc $ARTIFACTORY_HOME/etc/artifactory.system.propertiespoint at the desired configuration.

    The Bundled Storage ConfigurationsOut-of-the-box Artifactory comes with built-in configurations (repo.xml files) for the several storage types, as listed below.

    Database Storage Types

    The following configurations use a JDBC database for storage, and manage binaries as blobs with file system blob caching (1Gb by default)derbymysql - Please follow the MySQL-specific instructionspostgresqloraclemssql

    File System Storage Types

    The following configurations store all binaries as files (in ), and use a JDBC database for repository$ARTIFACTORY_HOME/data/filestoremetadata management.This setting typcially yields the best performance with large repositories.

    filesystem-mysql - The recommended setup. Please follow the .MySQL-specific instructionsfilesystem-derby (the default)filesystem-postgresqlfilesystem-oraclefilesystem-mssql

  • 15 Copyright 2012 JFrog Ltd.

    For raw Artifactory data backup, the folder needs to be backed up in parallel of a DB$ARTIFACTORY_HOME/data/filestoredump since both are needed. This does not impact Artifactory's own backup system which is storage-agnostic.

    Accessing a Remote DatabaseIn order to avoid network latency issues when reading and writing artifacts data, it is highly recommended to create the database on the samemachine on which Artifactory will be running or on a fast SAN disk.

    This is critical if the files are served from database blobs and the file system cache size is low.

    Running Artifactory on MySQL

    Overview

    The instructions below describes how to set up Artifactory on MySQL.By using MySQL (over the built-in Derby DB) you can leverage exiting MySQL infrastructure and use the MySQL backup, restore andhigh-availability features. The setup involves creating the dedicated MySQL database instance and then configuring Artifactory to use thatinstance.

    Please make sure to read the general section about before configuring MySQL.changing the default storage

    Create the Artifactory MySQL Database

    Supported MySQL versions

    For best performance please use with theMySQL 5.5 and above InnoDB engine (the default with this version).Please note that versions of MySQL below 5.0.3 will not work with Artifactory.

    You can use the SQL script to execute the SQL commands below to create a database.$ARTIFACTORY_HOME/misc/mysql/createdb.sqlPlease review and edit this script before executing it, according to your environment.

    [root@pond artifactory]# mysql -u rootWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 3Server version: 5.0.45 Source distribution

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> create database artifactory character set utf8;Query OK, 1 row affected (0.00 sec)

    mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on artifactory.* TO'artifactory_user'@'localhost' IDENTIFIED BY 'password';Query OK, 0 rows affected (0.00 sec)

    mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)

    mysql> quit

    Increasing MySQL's Default Packet SizeSince binaries are stored in MySQL, it is extremely important to increase the default packet size used by MySQL (see: max_allowed_packet

  • 16 Copyright 2012 JFrog Ltd.

    1.

    2.

    a. b. c.

    3.

    4.

    1. 2.

    , for reference).increaseWe recommend changing this in the file. Create this file if it does not already exist (under the absolute path, not under /etc/my.cnf

    ):$ARTIFACTORY_HOME

    # The MySQL server[mysqld].

    .

    # The maximum size of the binary payload the server can handlemax_allowed_packet=8M.

    .

    Configure Artifactory to Use the MySQL DatabaseAdd (or uncomment) the following line in :$ARTIFACTORY_HOME/etc/artifactory.system.properties

    artifactory.jcr.configDir=repo/filesystem-mysql

    Note: this path is relative to .$ARTIFACTORY_HOME/etc

    Adjust the connection definitions in the file to match the attributes$ARTIFACTORY_HOME/etc/repo/filesystem-mysql/repo.xmlof the Artifactory database you created (if you don't have this file you can grab it from the standalone zip distribution or directly from here.).Jackrabbit uses 3 separate connection configurations for each of the following:

    The basic JCR repository metadata (configured under tag) - minimal load and no connection pooling.FileSystemThe JCR datastore for all the binaries (configured under tag) - heavy load and uses connection pooling.DataStoreThe JCR workspace metadata (configured under tag) - minimal load and no connection pooling.PersistenceManagerFor each one of these tags you need to configure the database parameters and username/password to use. The schema andtables will be created on first run of Artifactory against the database.

    Download the and copy the jar file into the server's shared lib directory (MySQL JDBC driver mysql-connector-java-x.x.x.jar in the standalone version), etc.$ARTIFACTORY_HOME/lib $TOMCAT_HOME/lib

    Start Artifactory.

    General advice against storing artifacts as BLOBs inside MySQL

    The suggested configuration keeps all artifacts information in MySQL while storing the artifact binary data on the file system(under ). This is the recommended setup.$ARTIFACTORY_HOME/data/storeIt is possible, but , to store BLOBs inside MySQL, provided that typical BLOB size is relatively small. This isnot recommendedimportant because MySQL buffers BLOBs instead of streaming them (this behavior is unrelated to Artifactory -

    ). Therefore, using large BLOBs may result in out-of-memory errors with large binaries,http://bugs.mysql.com/bug.php?id=15089depending on your JVM heap size.If you wish to store BLOBs inside MySQL, please use instead of , and change the repo/mysql repo/filesystem-mysql

    above to the maximum artifact size you are planing to store in Artifactory, for example .max_allowed_packet 128M

    Upgrading Artifactory

    Upgrading Artifactory to Version 2.6.x(from 1.3.0-RC, 2.0.x-2.5.x)

    if you also wish to change the underlying storage type used by Artifactory, please read :Storage Type Changes the following instructionsinstead.The instructions below assume the upgraded Artifactory will use the existing storage type.

    When Running the Artifactory WAR in a Servlet ContainerUnzip the Artifactory distribution archive.Replace the previously deployed file with the archive's file.artifactory.war webapps/artifactory.warOn servlet containers such as Tomcat it is also necessary to remove the exploded webapp directory.artifactory

  • 17 Copyright 2012 JFrog Ltd.

    1. 2.

    3.

    1. 2.

    Starting with version 2.1.1 Artifactory's only distribution format is a single zip archive ( ) that alsoartifactory-x.y.z.zipcontains the file in the directory.artifactory.war webapps

    When Running Standalone ArtifactoryUnzip the Artifactory distribution.Replace the following files and folders in you current with the same files from the new version:$ARTIFACTORY_HOME

    artifactory.jarclilib/ (/bin/clilib, in 1.3.0-RCs)lib/webapps/artifactory.waretc/jetty.xmlmisc

    The folder contains configuration files for specialized environments such as a or misc standalone Tomcat server. Although these files are not required for runtime, it is recommended to replace this folder as well.Websphere

    Delete Jetty's work folder ( ) before starting up Artifactory.$ARTIFACTORY_HOME/work

    When Running the RPM InstallationLog in as root (or use ).'sudo su -'Execute 'rpm -U artifactory-x.y.z.rpm'

    When upgrading from Artifactory prior to 2.6.0, please make sure to manually stop the current Artifactory service before runningthe upgrade, and verify the process has exited.

    Upgrading From Legacy VersionsIf you would like to upgrade from Artifactory versions below 1.3.0-RC, you will need to upgrade Artifactory to version 2.0.x first. Please follow

    .these steps

    When upgrading from 2.1.x or 2.0.x

    The Artifactory upgrade process is fully automated. However, the automatic upgrade to this version will likely run longer thanyou are used to:As part of the performance improvements done for this version we had to upgrade the way artifact metadata is stored andindexed inside Artifactory. The result is much faster searches and significantly improved performance of the whole system underload.However, since repository metadata and index need to be rebuilt, the upgrade process may take some time to complete (thistime varies depending on your CPU and disk speed).Artifactory will not serve incoming requests until the automatic upgrade process completes, so you may want to schedule theupgrade accordingly. You can follow the progress of the upgrade process in the the artifactory log file.

    Preserving Build InformationPlease also note that using the upgrade process is the only way to move deployed build-information forward. You cannot importan export of 2.1.x with BuildInfo data into 2.3.x. This is a result of a bug that has already been resolved.

    Intermmediate Upgrade to Previous Versions

    Upgrading to 2.0.0 from 1.3.0-RC1 or 1.3.0-RC2

  • 18 Copyright 2012 JFrog Ltd.

    1. 2.

    1. 2.

    3.

    1. 2.

    3.

    4. 5.

    Simply replace the file. If you are running on Tomcat make sure to also remove the exploded artifactory webapp directory.artifactory.war

    Upgrading from 1.2.2-rc0 through 1.3.0-beta-6.1

    This section covers upgrading from the following versions:

    1.2.2-rc0 1.2.2-rc1 1.2.2-rc2 1.2.2 1.2.5-rc0 1.2.5-rc1 1.2.5-rc2 1.2.5-rc3 1.2.5-rc4 1.2.5-rc5 1.2.5-rc6 1.2.5 1.2.5u1 1.3.0-beta-1 1.3.0-beta-2 1.3.0-beta-3 1.3.0-beta-4 1.3.0-beta-5 1.3.0-beta-61.3.0-beta-6.1

    Upgrading Artifactory from older version can be done in two ways:

    From the UIBy using the command line toolartadmin

    Upgrading Using the Web UI

    Upgrading from the UI is supported only when upgrading .from version 1.3.0-x

    From your old Artifactory installation run Full System Export and save the export to a destination directory.Perform a new clean server installation of the new Artifactory (it should not contain repository data or your customized version of theArtifactory configuration xml file).Install the new Artifactory version, go to , select your previous export target directory and letAdmin/Export&Import/System/Import Systemthe import run. That's it!

    Upgrading Using the Toolartadmin

    While upgrading from the web UI is easy and straightforward, sometimes the upgrade process can take a long time, especially with very largerepositories. In such cases the original web request may time out and the upgrade progress will proceed in the background.Therefore, if you wish to monitor the progress of the upgrade process in the most reliable way and gain access to more advanced dump options, itis recommended to use the command-line tool.artadminHere are step-by-step instructions:

    Stop your old Artifactory.Execute the command on the old or on a copy of it (recommended):artadmin dump $ARTIFACTORY_HOME

    artadmin dump $ARTIFACTORY_HOME

    This will generate a folder under the current execution directory with the old repository data in a format suitable fordumpExportimporting into a current Artifactory.NOTE: By default, caches (e.g. repo1) are . To export caches add the parameter.not exported --cachesPerform a new clean server installation of the new Artifactory (It should not contain repository data or your customized version of theArtifactory configuration xml file).Start the new Artifactory.Import the folder into Artifactory, either from the UI, as explained in the previous section or by running:dumpExport

    artadmin import dumpExport --username admin --password password

    The output will display the progress of the import. NOTE: If the process is killed, the import will still run inartadmin artadminArtifactory.

    Important Information

    Please read this carefully before installing or upgrading:

  • 19 Copyright 2012 JFrog Ltd.

    1. a. b.

    2.

    If you have used a previous version of Artifactory it is highly recommended to:Use a fresh version of Artifactory from the distribution archive and not try to patch the previous installation.Clear your browser's cache before using the new version.

    The default Artifactory user for the standalone installation has been changed to (instead of ). You may need toartifactory jettyupdate the provided install script or your file system permissions accordingly.

    Important information about the import process

    During the import binary artifacts are copied over into a working copy and are imported into Artifactory by a background thread.This speeds up the import process dramatically and makes Artifactory ready for serving requests as soon as possible. Thebackground import process will take some time to completes, depending on the size of your repository. During this timeArtifactory might perform more slowly than usual (it will still serve any artifact immediately, though). The Artifactory log shouldprovide visible information about the progress of this process.

    Repeating the upgrade process

    Should you wish to repeat the upgrade process from scratch, make sure to remove the folder$ARTIFACTORY_HOME/datafrom your new Artifactory installation before doing so.

    Administering Artifactory

    OverviewThis section describes the Artifactory administration tasks, such as managing repositories, controlling security and configuring scheduledservices.

    General ConfigurationManaging RepositoriesManaging SecurityManaging BackupsImporting and ExportingMail Server ConfigurationConfiguration FilesExposing Maven IndexesThe artadmin Command Line ToolClustering ArtifactoryThe Artifactory Log FilesSystem Information

    General Configuration

    OverviewThe section lets you set up various parameters that globally affect Artifactory:Admin:Configuration

  • 20 Copyright 2012 JFrog Ltd.

    1. 2.

    3. 4. 5.

    General SettingsThe server name, displayed on the tile of each page.Custom URL base. By default, URLs generated in Artifactory use context URL returned by your servelt container as a base.A custom URL base is useful when Artifactory is running behind a proxy. In this case the base for URLs generated in Artifactory for linksand redirect responses must be specified manually. Another reason to change the base URL would be to have non-request-basedoperations in Artifactory use the correct address, for example in generated emails.Maximum allowed size for files uploaded via the web interface.The date format for displaying dates inside the web interface.A global offline flag that tells Artifactory to act as if it is not connected to an external network (such as the internet), and therefore, not toquery remote repositories (regardless of the offline status of a single remote repository).

    Look and Feel Settings (UI Branding)Here you can customize artifactory with your own logo presented on the upper left of the screen and footer text.

    You can either upload a logo image or use an exiting image on a remote URL. The uploaded file will be copied into the folder.ARTIFACTORY_HOME/etc/ui

    For a footer, input the desired text in the 'Additional Footer' field.

  • 21 Copyright 2012 JFrog Ltd.

    1.

    2.

    To make the changes visible you need to save them first.

    Add-on SettingsThis configuration setting is for controlling Artifactory's behavior with regards to the Artifactory Add-ons Power Pack.

    The Server ID is used to activate the Artifactory Add-ons Power Pack on the current Artifactory server. You can leave it empty whenusing the open source version with no add-ons installed.You can decide whether or not to show available add-ons information in Artifactory's for add-ons you do not have installed.Available add-on information typically looks like this:

    As an admin, you can decide whether users will see add-ons information or not. Note that enabling add-ons information display overridesany previous user-specific preference for hiding it (a user will still be able to choose to hide this information again).

    Managing RepositoriesThis section explain the common controls available for each repository type.

    Understanding RepositoriesConfiguring RepositoriesLocal and Remote RepositoriesLocal RepositoriesRemote RepositoriesVirtual Repositories

    Understanding Repositories

  • 22 Copyright 2012 JFrog Ltd.

    Local, Remote and Virtual Repositories

    Artifactory hosts two kinds of repositories: and . Both local and remote repositories can be aggregated under repositories, inlocal remote virtualorder to create controlled domains for artifacts resolution and search, as we will see in the next sections.

    Managing Repositories

    Repositories can be created, deleted, edited, ordered and aggregated using the administration UI: Admin:Configuration:Repositories

    Local Repositories

    Local repositories are physical locally-managed repositories that one can deploy artifacts into.

    Artifacts under a local repository are directly accessible via a URL pattern ofhttp://:/artifactory//

    Artifactory comes with a couple of pre-configured local repositories for deploying internal and external releases, snapshots and plugins.

    Remote Repositories

    A remote repositories serves as a caching proxy for a repository managed at a remote URL (including other Artifactory remote repository URLs).Artifacts are stored and updated in remote repositories according to various configuration parameters that control the caching and proxyingbehavior. You can remove cached artifacts from remote repository caches but you cannot manually deploy anything into a remote repository.

    Artifacts under a remote repository are directly accessible via a URL pattern ofhttp://:/artifactory//or

    (the second URL will only servehttp://:/artifactory/-cache/already cached artifacts while the first one will fetch a remote artifact int the cache if it is not already stored).Artifactory comes with pre-configured common remote repositories, which you can, of course, change.Remote repositories configuration can also be imported from another Artifactory instance. JFrog contains up-to-date standard listpublic repositoryof remote repositories available on the net.

  • 23 Copyright 2012 JFrog Ltd.

    A remote repository acts as a . Artifacts are note stored eagerly in remote repository caches, but areproxy not as a mirrorfetched and stored when they are requested by a client.on demandIt therefore makes perfect sense for a remote repository to contain zero artifacts immediately after its creation.

    Virtual Repositories

    A virtual repository (or "repository group", if you prefer this term) aggregates several repositories under a common URL. The repository is virtual inthe sense that you can resolve and get artifacts from it but you cannot deploy anything to it.

    The Default Virtual Repository

    By default, Artifactory uses a global virtual repository that is available athttp://:/artifactory/repoThis repository contains all local and remote repositories.

    Virtual Resolution Order

    The search/resolution order when requesting artifacts from a virtual repository is always: local repositories, remote repository caches and finallyremote repositories themselves. The order by which repositories of the same type (local, cache and remote) are queried is governed by the orderlocal, remote and virtual repositories are listed in the configuration (see below).Artifactory's virtual repository configuration includes a "Resolved Repositories" list view that shows the effective repositories order per virtualrepository. This is particularly helpful when nesting virtual repositories.

    General Resolution Order

    Managing the global configuration order is done in the administration UI . For each lists of repositoriesAdmin:Configuration:Repositories(local, remote, virtual) you can reorder using drag-and-drop or select with the up and down arrow buttons. When your order is done you can usethe "Save" button, or "Reset" to cancel the reordering.Repositories resolution if also affected by security privileges, include/exclude patterns and snapshots/releases handling policies.

    Configuring Repositories

    Overview

    This section covers the controls that are common between all repositories configuration.

    Repository Key

    The repository identifier needs to be valid , and be unique for the whole Artifactory configuration data.XML ID NameSo, repository keys cannot starts with a number, and it is recommended to suffix local repository with "-local".

    Description

    Free text describing the content and goal of the repository. This will help user configuration, UI screens and repository sharing.

    Include and Exclude Patterns

  • 24 Copyright 2012 JFrog Ltd.

    1. 2.

    It is extremely important to use include and exclude patterns for repositories. This is especially important for remote repositories in order to:

    Avoid Looking up remote artifacts on repositories that will never contain those artifacts, or that contain only a limited range of group ids.Not disclosing sensitive business information that can be derived from your artifact queries to whoever can intercept the queries,including the owners of the remote repository itself.

    As best practices, it is easier to manage the list of remote repositories used in an organization under one virtual repository ( for example: ).remote-repos

    In this case, you can globally stop querying remote repositories for companies artifacts by setting an exclude pattern on this virtual repository.

    Include and exclude filtering is controlled by editing the Includes Pattern and Excludes Pattern values for a repository . Specify a comma separated list list of Ant-like patterns to filter-in and filter-out artifact queries. FilteringAdmin:General:Repositories:Edit

    works by subtracting the excluded patterns (default is none) from the included ones (defaults to everything). for example:

    Includes Pattern: org/apache/**,com/acme/**Excludes Pattern: com/acme/exp-project/**

    Will cause Artifactory to submit queries to the repository in question for and org/apache/maven/parent/1/1.pom but not for .com/acme/project-x/core/1.0/nit-1.0.jar com/acme/exp-project/core/1.1/san-1.1.jar

    Local and Remote Repositories

    Overview

    This section covers the controls that are common between local and remote repositories.

    Snapshots and Releases Handling Policy

    You can configure whether a local or remote repository handles snapshots and/or release artifacts.The repository will reject deployments that are conflicting with this policy and will not participate in conflicting resolution requests.

    Snapshot and release handling are currently supported for artifacts that follow the naming conventions.MavenSupport for flexible non-Maven snapshot and release identification will be introduced in the upcoming release of Artifactory.

    Repository Blackout

    It is possible, if desired for whatever reasons, to completely black-out a repository by marking its "Blacked Out" flag, making it effectively disabled.A blacked-out repository does not participate in any artifacts resolution and artifacts cannot be downloaded from it or deployed to it.

    Suppressing POM Consistency Checks

    By Default, Artifactory tries to keep your repositories healthy by refusing bad POMs that have wrong coordinates (path). If the information inside the POM does not match the deployed path, Artifactory will reject the deployment.groupId:artifactId:version

    You can disable this behavior by selecting the "Suppress POM Consistency Checks" checkbox.

    Local Repositories

    Overview

    This section covers the controls that are specifics to local repositories.

    Centrally Controlled Maven Unique Snapshot Policy

  • 25 Copyright 2012 JFrog Ltd.

    One of the unique features of Artifactory is you can gain centralized control on how snapshots are be deployed into a repository, regardless of enduser-specific settings. This can guarantee standardized format for deployed snapshots within your organization.

    You can choose between:

    Non-unique snapshots.Unique snapshots - with unique time-stamp and build number suffix.Deployer-respecting behavior - Artifactory will respect the user snapshot policy, i.e. act as a standard, non-smart, repository.

    Maven 3 Only Supports Unique Snapshots

    Maven 3 has, unfortunately, dropped support for resolving and deploying non-unique snapshots. Therefore, if you have asnapshot repository that is using non-unique snapshot, it is recommended to change its Maven snapshot policy to 'Unique' andto remove any previously deployed snapshot from this repository.The unique snapshot name generated by the Maven client on deployment cannot help in identifying the source control changesfrom which the snapshot was built and has no relation to the time sources were checked out. It is advised to have the artifactitself embed the revision/tag (as part of its name or internally) for clear and visible revision tracking. Artifactory allows you to tagartifacts with the revision number as part of its .Build Integration support

    Cleaning-up Unique Snapshots

    Putting aside the question of usefulness in using unique snapshots (see the section above), you can tell Artifactory to automatically clean up oldunique snapshots by setting the repository's value to the maximum number of unique snapshots of an artifact thatMax Unique Snapshotsshould be maintained in the repository. Clean up takes effect on each new snapshot deployment.

    Handling Deployed Client Checksums

    Checksum policy determines how Artifactory behaves when a client checksum for a deployedresource is missing or conflicts with the locally calculated checksum (bad checksum).Checksum checking effectively verifies the integrity of the deployed resource.

  • 26 Copyright 2012 JFrog Ltd.

    1.

    2.

    The options are:

    Verify against client checksums (default) - Until a client has sent a valid checksumfor a deployed artifact that matches the server's locally calculated checksum, theartifact will not be available and will return 404 (not found). If the client has sent achecksum that conflicts with the one calculated on the server a 409 (conflict) will bereturned until a valid checksum is deployed.Trust server generated checksums - Do not verify against checksums sent by clientsand trust the ones store server's locally calculated checksums. An uploaded artifactwill be available for consumption immediately, but integrity might be compromised.

    Remote RepositoriesThis section describes various aspects of managing remote repositories:

    Managing CachesHandling Offline ScenariosHandling ChecksumsGoing Through ProxiesAdvanced SettingsImporting Shared Configurations

    Managing Caches

    Overview

    This section examines the settings are used by remote repositories for deciding how to handle remote artifact requests.When a remote artifact is stored in Artifactory it is cached for a certain controlled period of time. For Maven artifacts, this is applicable only for

    , since releases are assumed never to change.snapshots

  • 27 Copyright 2012 JFrog Ltd.

    When a request arrives at Artifactory for an artifact that's caching timeout has expired, Artifactory will check if there is an updated artifactremotely.

    We experimented with timeout settings in many different locations before deciding on the default values.It is therefore recommended not to change the defaults, unless there's a compelling reason to do so.

    Socket Timeout

    This is the timeout period (for socket and connection) that Artifactory will wait before giving up on retrieving an artifact from a remote repository.After a timeout Artifactory will cache the fact that a retrieval failure has happened for the amount of time defined in "Failed Retrieval CachePeriod".Artifactory will answer future requests for that particular artifact with (404) for a period of "Failed Retrieval Cache Period" secondsNOT_FOUNDand will not attempt to retrieve it it again until that period expired.

    Keep Unused Artifacts

    Many cached artifacts in Artifactory remote repository storage are actually unused by any current projects in the organization. To solve this issueyou can set an automatic removal of unused artifacts in remote repository caches.

    Retrieval Cache Period

  • 28 Copyright 2012 JFrog Ltd.

    Defines how long before Artifactory checks for a newer version of a requested artifact in remote repository. Artifactory will not fetch anything butthe metadata if no newer version is found.

    Failed Retrieval Cache Period

    See the explanation for Socket Timeout.

    Missed Retrieval Cache Period

    The number of seconds to cache artifact retrieval misses. A value of 0 means no caching.A miss is a 404 response ( ) received from a remote repository that currently does not have the artifact requested. You might want toNOT_FOUNDtreat this differently than when failing to retrieve the artifact is due to network problems.

    Zapping Caches

    You can clean up the Retrieval Cache by selecting a cached file or a folder in and clicking (or selecting, ifArtifacts:Tree Browserright-clicking the item) the "Zap Caches" action.You can cleanup both the Retrieval Failures Cache and Missed Retrieval Cache by selecting a cached folder in andArtifacts:Tree Browserclicking (or selecting, if right-clicking the item) the "Zap Caches" action.

    Handling Offline Scenarios

    Overview

    Artifactory supports two kind of offline cases: when the whole organization is disconnected from remote repositories and when one or moreremote repositories needs to be put offline.

    Organization-wide Offline

    In this case, remote repositories serve as caches only and do not proxy remote artifacts. This is common in organizations that are using aseparate secured network (such as military or financial institutes) and are disconnected from the rest of the world.In such cases, you can turn on (and off) the Global Offline Mode flag, under .Admin:Configuration:General

  • 29 Copyright 2012 JFrog Ltd.

    Single Repository Offline

    A less rigid case is where one or more remote repository has become offline for some reason. In this case, it is possible to tell Artifactory to treatthe individual remote repository as offline, so that only artifact already present in the cache will be used.

    Handling Checksums

    Overview

    Artifactory can help you block broken artifacts by activating checksum handling - Artifactory will then query the remote checksum prior to storingthe file locally.

    Configuring Checksum Policies

    Using the configuration for a remote repository, you can choose between failing on bad checksums (blocking them), recalculating bad checksums,

  • 30 Copyright 2012 JFrog Ltd.

    calculate only missing checksums and accepting bad checksums.

    Going Through Proxies

    Overview

    In a corporate environment it is often required that, in order to access remote resources, you need to go through a proxy server.Artifactory supports both regular network proxies and NTLM proxies.

    Defining Proxies

    To use a proxy you first need to create a proxy definition via .Admin:Configuration:ProxiesFields that do not require any value in your setup can be left blank (e.g. if you are not using authentication credentials or an NTLM proxy).

    Checking the "System Default" checkbox, will activate a popup with the question "Do you wish to use this proxy with existing remote repositories(and override any assigned proxies)?":

    Pressing "OK" will assign this proxy to all remote repositories (see below).If the proxy is defined as "System Default" then Artifactory will use it for all HTTP queries not related to remote repositories downloads.Only one system default proxy can be defined.

    The optional redirecting proxy target hosts allows listing host names to which the proxy may redirect requests. The credentials of the proxy will be

  • 31 Copyright 2012 JFrog Ltd.

    reused by requests redirected to any of these hosts.

    Using Proxies

    A remote repository will use a proxy, only if one is selected in the configuration panel for that repository. A "System Default"proxy is assigned by default when creating a new remote repository, but not used by default. A remote repository without aproxy defined will not use any proxy!

    Advanced Settings

  • 32 Copyright 2012 JFrog Ltd.

    Accelerating Downloads

    You can instruct a remote repository to automatically eagerly retrieve related artifacts, in parallel on the server-side, before requested by theMaven client.The options are:

    Try and fetch a immediately when is queried.*.jar *.pomTry and fetch a when is queried.*-sources.jar *.jar

    Having these options on can speeds up first downloads by a factor.

    Suppressing POM Consistency Checks

    By Default, Artifactory tries to keep your repositories healthy by refusing bad POMs that were deployed on remote repositories with wronginformation.Artifactory will check that the coordinates (path) of POMs retrieved remotely match the information inside thegroupId:artifactId:versionPOM, and will reject POMs that conflict with their path.You can disable this behavior by selecting the 'Suppress POM Consistency Checks" checkbox.

    Cleaning-up Unique Snapshots

    If the remote repository managed unique snapshots names (The same will have many jars and pom with dategroupId:artifactId:versionand build number), you can tell Artifactory to automatically clean up old unique snapshots by setting the repository's Max Unique Snapshotsvalue to the maximum number of unique snapshots of an artifact that should be maintained in the repository. Clean up takes effect each time a

  • 33 Copyright 2012 JFrog Ltd.

    new snapshot file name is downloaded and cached.

    Remote Repository Authentication

    If a remote repository requires authentication you can provide a and as part of the repository definition.username password

    List Remote Folder Items

    If you wish to browse the contents of a remote repository that has not been cached yet, you can enable this checkbox. This will allow to navigate of the remote repository via the Simple Browser or List Browser.the contents

    Proxying Maven 1 repositories

    To proxy Maven 1 repositories, simply set the remote repository type to Maven 1.

    Connecting from Multi-homed Machines

    If you are running Artifactory on a machine with multiple network interfaces and only specific interfaces can connect to remote repositories, youcan specify the interface you wish to use for remote connections under the "Local Address" field.

    Importing Shared Configurations

    Overview

    Artifactory "Remote Repository Provisioning" feature allows you to share the configuration details of remote repositories between Artifactoryinstances.The instance contains an up-to-date version of most of the common public repositories.public JFrog Artifactory

    Sharing a Remote Repository Configuration

    In the main panel of the checkbox "Share Configuration" will tell Artifactory to exposeAdmin:Repositories:Remote Repositories:Editthis remote repository configuration to other Artifactory instance.When check, all configuration parameters will be shared from REST API queries except: Connection credentials (username,password) and Proxyconfiguration.

    You can declare a remote repository with a URL pointing to yourself in order to expose access to your Artifactory. Be carefulthat this remote repository is not usable.

    Using Import in Remote Repositories Configuration

    To create or update remote repositories with a shared configuration from another Artifactory, go to Admin:Repositories:Remote.Repositories:Import

  • 34 Copyright 2012 JFrog Ltd.

    1. 2. 3.

    1. 2. 3. 4.

    You can then enter the artifactory root URL of the server exposing remote repositories configuration. By default it points to JFrog public repository.Then activating "Load" will issue a request to the server.

    If you have a "System Default" proxy defined, Artifactory will use it for doing this HTTP query.

    A list of remote repositories can be selected and the repository key for each of them can be changed.

    Important points to notice:

    If the repository key already exists, the configuration of the existing remote repository will be modified.If HTTP proxy is used, each of the new repository will have to be associated with the local proxy definition.You will have to add new remote repositories to existing virtual repositories in order for them to be visible to virtualrepository requests.

    Virtual Repositories

    Overview

    Artifactory lets you define a virtual repository that is a collection of local, remote and other virtual repositories under a single logical URL.A virtual repository hides the underlying repositories and lets users work against a single well-known URL, while allowing you to change theparticipating repositories and their rules without requiring any client-side changes.The main features supported by a virtual repository are:

    Nesting,Include Exclude patterns filter,Automatic removal of repository references,WebStart automatic signing and JNLP file conversion.

    Setting Up a Virtual Repository

    From the UI go to and create a new virtual repository.Admin:Configuration:Repositories:Virtual RepositoriesAdd the repositories you wish to be part of the virtual repositories to the virtual repository list of selected repositories.

  • 35 Copyright 2012 JFrog Ltd.

    The actual list of effectively resolved repositories (after expanding nested virtual repositories) will be displayed and automatically updated.

    The search/resolution order when requesting artifacts from a virtual repository is always: local repositories, remote repositorycaches and finally remote repositories themselves.

    Nesting Virtual Repositories

    The ability to nest virtual repositories is unique to Artifactory. It allows for greater reuse of virtual repositories between themselves.

    Artifactory will detect when overly nesting repositories ends up in an infinite loop and will warn against that.

  • 36 Copyright 2012 JFrog Ltd.

    1.

    2. 3.

    Include Exclude Patterns in Virtual Repositories

    The coupling of Include/Exclude patterns of Artifactory to virtual repositories nesting provides a powerful feature.Configuring RepositoriesYou can now define in a single virtual repository "remote-repos" the company groupId exclusion, and it will ensure that no requests for internalartifacts will be sent outside.Another example for this feature, is defining virtual repository for a project, and filter undesirable groupId, sources or versions, that won't be visibleto developers.

    Serving Requests from Other Artifactory Instances

    By setting the 'Artifactory Requests Can Retrieve Remote Artifacts' flag, you can instruct Artifactory whether the virtual repository should includeremote repositories in artifacts resolution when answering requests coming from other Artifactory instances. This is useful when deployingArtifactory in a mesh (grid) architecture, where you do not want all remote Artifactories to act as remote proxies for other Artifactory instances.

    Currently, to control remote artifacts resolution for other Artifactory instances for the global virtual repository 'repo', you'd have touse the system property, which is setartifactory.artifactoryRequestsToGlobalCanRetrieveRemoteArtifactsto by default.false

    Making Sure Artifactory is Your Sole Artifacts Provider

    One very bad practice (sadly heavily used on public POMs), is to add a direct reference to external repository in a POM. When any of

    or

    are present, Maven will dynamically add external repository URL to the build. This will shortcut Artifactory.The solution until now was the usage of like described .mirrorOf here

    Artifactory provide at the virtual repository level, an automatic cleanup of POM file. Three level of cleanup policy are configurable:

    Discard Active References - Will removes repository elements that are declared directly under project or under a profile in the same pomthat is activeByDefault.Discard Any References - Will removes all repository elements regardless of whether they are included in an active profile or not.Nothing - Don't removes any repository elements declared in the POM.

    Managing Security

  • 37 Copyright 2012 JFrog Ltd.

    OverviewOne of the main strengths of Artifactory is the strong security model it offers:You can assign role-based or user-based permissions to areas in your repositories (called Permission Targets), allow sub-administrators fortheses areas, configure LDAP out-of-the-box, prevent clear text in your Maven's settings.xml, inspect security definitions for a single artifact orfolder and more.

    Artifactory's security is based on Spring Security and can be extended and customized.

    This section explains the strong security aspects and controls offered by Artifactory:

    Managing UsersManaging GroupsManaging PermissionsManaging Security with LDAPCentrally Secure PasswordsAccess Log

    Managing Users

    Overview

    Artifactory users management is available from the web UI under .Admin:Security:UsersAn administrator needs to create users (unless external authentication, such as LDAP is active) and assign them roles and permissions.

    Creating and Editing Users

    Create a new user by clicking the New button next to the users table.

    Unchecking the "Can Update Profile" checkbox prevents a user from updating his profile details. This can be useful, for example, for creating ashared departmental user, with a signle password shared between all individuals in the same department, while only an administrator can updatethe password.

    When external authentication, such as LDAP, is active you can disable the fallback to using internal password by checking the "Disable InternalPassword" checkbox.

    Passwords are always stored as hashes or encrypted hashes inside Artifactory.

    Administrator Users

  • 38 Copyright 2012 JFrog Ltd.

    An administrator user is to Artifactory like a root in Unix systems. Administrators are not subject to any security restrictions.It is therefore recommended to create a minimum number of administrators.You can always create less powerful, per-permission-target, administrators inside Artifactory (that are in charge of a specific repository path). Seethe section.permissions management

    The Default Admin Account

    The default user name and password for the built-in administrator user are: .admin/passwordYou should change the password after the first time you log in.It is possible to recover the default admin account by following these .instructions

    The Anonymous User

    Artifactory supports the concept of anonymous users.A built-in, unmodifiable user exists in Artifactory, that can be assigned , just as any regular user. A global "Allow'anonymous' permissionsAnonymous Access" flag controls whether