Page tree
Skip to end of metadata
Go to start of metadata

Overview

Artifactory is a standard Java EE web application, so it can be run on any container that is compliant with the Servlet 3.0 specification.

Artifactory has been specifically verified to work seamlessly on Tomcat 7, Jetty 8, JBoss 6, Oracle Weblogic 12c, GlassFish v3.0, IBM Websphere 8.5.

General and Specific Instructions

Please first follow the General Instructions on this page and then refer to the specific instructions on running Artifactory with Servlet Containers that require additional configuration

General Instructions

"Drop the War": Zero Configuration

Artifactory can be run in any Servlet container by simply dropping or installing the artifactory.war file into the container's web applications folder, for example, into Tomcat's webapps folder.

You can deploy the artifactory.war file into your Servlet container by using hot deployment, or by following the container's standard web application deployment procedures.

The artifactory.war file is located under the webapps folder in the Artifactory distribution zip file.

"WAR" File Name

It is not recommended to include any version characters in the name of the war file, and it should be left as artifactory.warThis avoids having to include version-specific information in the Artifactory base URL and therefore simplifies future upgrades.

Page Contents

The ARTIFACTORY_HOME Folder

It is important to know where your Artifactory home folder is located, since this folder stores your configurations and important repository data.

When Artifactory runs for the first time, it sets up a default configuration and creates all necessary files and folders under the ARTIFACTORY_HOME folder.

The default location of ARTIFACTORY_HOME is {user.home}/.artifactory.

To run Artifactory with the home folder set to a different location on the file system (particularly when installing Artifactory on a production server), either:

  • Start the Servlet Container virtual machine with -Dartifactory.home=<your preferred Artifactory home folder location> 
    or -
  • Set an ARTIFACTORY_HOME environment variable pointing to your preferred location before running the installation.

Artifactory creates the home folder on startup if it does not already exist.

Permissions on the Artifactory Home Folder

Make sure that the user running the Servlet Container has write permissions on the Artifactory home folder.


Running Artifactory on IBM WebSphere

Artifactory can run on IBM WebSphere Application Server version 8.5 and above, however this requires initial setup actions to replace the standard web.xml file with a specific one that has been modified to work with WebSphere.

Before deploying Artifactory into WebSphere you should do the following:

  1. Extract the artifactory.war file to a temporary location on your file system
  2. Replace the WEB_INF/web.xml file extracted from the artifactory.war file with %ARTIFACTORY_HOME/misc/websphere/web.xml from the distribution zip file
  3. Repackage the artifactory.war file
  4. Start IBM WebSphere
  5. Add a Webcontainer custom property com.ibm.ws.webcontainer.invokefilterscompatibility and set it to true

    com.ibm.ws.webcontainer.invokefilterscompatibility Custom Property

    This is done to avoid an issue with IBM WebSphere V6.1 and is fully described in IBM Support Documentation for PK33090 
  6. From Version 3.1.0 Artifactory is Servlet 3.0 compliant. Therefore, if you are running Artifactory 3.1.0 or later, you need add the following Generic JVM Arguments  in the WebSphere UI JVM Settings screen

    Generic JVM arguments to add if running Artifactor 3.1.0 or later
    -Dcom.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true
    -Dcom.ibm.ws.amm.scan.context.filter.archives
    -Dcom.ibm.ws.amm.scan.context.filter.packages
  7. Save the change and restart WebSphere. 
  8. Deploy Artifactory normally into IBM WebSphere

Using IBM WebSphere as the data source

You can run Artifactory using WebSphere as the data source.

To do so, create two new data sources which have same JNDI name, however one should end with 'noTX' (for no transaction)
For example, jdbc/oracleArDb and jdbc/oracleArDbnoTX
You should set the storage.properties values as follows:

storage.properties
type=oracle
driver=oracle.jdbc.OracleDriver
url=jndi:jdbc/oracleArDb
binary.provider.type=cachedDb
binary.provider.cache.maxSize=32212254720

Configuring the JDBC Drivers Path

To configure Webspere with the path to your JDBC drivers, you need to execute the following steps:

  1. In Webshpere, under Environment | Shared libraries, select New...., enter the name of the library that contains your JDBC driverand enter the path to your driver file into the classpath field. 
  2. Under Applications | Application types select Websphere enterprise applications, and select artifactory_war. 
    1. In the Shared Library References screen, check artifactory_war. Then click Reference shared libraries and select the library that contains your JDBC drivers. 
    2. In the Class Loader and Update Detection screen, under Class loader order, select Classes loaded with local class loader first (parent last) and save your changes.
  3. Restart Websphere.
  4. Under Applications | Application types select Websphere enterprise applications, and start artifactory_war.

Additional Setup Steps

This section describes additional steps you need to take depending on the specific action you are performing, or your configuration.

Upgrading to Artifactory 3.2.1 and Higher

If you are upgrading to Artifactory 3.2.1 and higher, please click below for some additional steps you need to take.

 For Artifactory 3.2.1 and higher
  1. Create a shared library (we recommend calling it httpclient) from the following two files and place it in the WEB-INF/lib folder.
    • httpclient-4.3.5.jar
    • httpcore-4.3.2.jar
  2. Add the library as a shared library to Artifactory and change the Class loader order property to Classes loaded with local class loader first (parent last).
  3. Add the Artifactory shared library to WebSphere as follows:

    1. In the WebSphere UI, under Enterprise Applications select your installation of Artifactory
    2. Select the Shared library references link
    3. Check Artifactory and select Reference shared libraries
    4. Select Artifactory library and transfer it to the Selected list

Running WebSphere Below V8.5.5.1

If you are running a WebSphere version below 8.5.5.1, please click below for some additional steps you need to take.

 For WebSphere versions below 8.5.5.1
  1. Create an ASM shared library from the following five ASM jars used by Artifactory that can be found in the artifactory.war WEB-INF/lib folder

    Artifactory ASM jar files
    asm-3.2.jar
    asm-analysis-3.2.jar
    asm-commons-3.2.jar
    asm-tree.3.2.jar
    asm-util-3.2.jar
  2. Add the ASM library as a shared library to Artifactory and change the Class loader order property to Classes loaded with local class loader first (parent last).

    Why Do We Add an ASM Shared Library

    WebSphere Application Server v8.5 includes version 3.2 and version 4.0 of the ASM bytecode scanning library.
    This results in a java.lang.IncompatibleClassChangeError:org.objectweb.asm.ClassVisitor when deploying Artifactory because it uses a different version of the ASM library. This is fixed by setting the Class loader order option as specified. 

  3. Add the Artifactory shared library to WebSphere as follows:

    1. In the WebSphere UI, under Enterprise Applications select your installation of Artifactory
    2. Select the Shared library references link
    3. Check Artifactory and select Reference shared libraries
    4. Select Artifactory ASM library and transfer it to the Selected list

Running WebSphere Liberty Profile

If you are running under WebSphere Liberty Profile, a security provider for the Bouncy Castle encryption library is missing, and this generates the following error:

To rectify this, you need to install a security provider for the BouncyCastle encryption library, according to the instructions below:

 For WAS Liberty Profile

1. Download bcprov-jdk15-136.jar
2. In the WebSphere\Liberty\java\java_1.7_64\jre\lib\security folder, edit the java.security file and add the line:

security.provider.#=org.bouncycastle.jce.provider.BouncyCastleProvider

where '#' is the next number in the security providers list.


Running Artifactory on Weblogic

When deploying Artifactory on Weblogic, you must add the following line to the domain config.xml file:

Modifying config.xml
</security-configuration> ...
    <enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials>
</security-configuration>

In addition, from Artifactory 3.2.0, you need to define the following two system properties:

com.sun.xml.ws.spi.db.BindingContextFactory=com.sun.xml.ws.db.glassfish.JAXBRIContextFactory
javax.xml.bind.JAXBContext=com.sun.xml.bind.v2.ContextFactory

For more details please refer to the Oracle documentation for  Using the Glassfish RI JAXB Data Binding and JAXB Providers.

Conflicts

In some installations of Weblogic, you may need to remove the xmlpull-1.1.3.1.jar and xpp3_min-1.1.4c.jar files from the artifactory.war to avoid conflicts.

In addition, from Weblogic 12.1.2, you need to delete the guava-15.0.jar file from the artifactory.war and replace it with guava-15.0-cdi1.0.jar which you can download from the JFrog Public Repository. This fix is due to a namespace issue with the Guava 15 library. For more details please refer to Guava Libraries Issue 1527.


Running Artifactory on JBoss

Artifactory has been verified to work on JBoss 6. To set this up, you need to execute the following steps:

  • Extract the artifactory.war file to a convenient location.
  • Under the WEB-INF directory, create a file called jboss-deployment-structure.xml with the following content:

    <jboss-deployment-structure>
        <deployment>
            <!-- Exclusions allow you to prevent the server from automatically adding some dependencies     -->
            <exclusions>
                <module name="org.slf4j" />
                <module name="org.slf4j.impl" />
            </exclusions>
            <resources>
                <resource-root path="WEB-INF/lib/bcpg-jdk16-1.46.jar" use-physical-code-source="true"/>
                <resource-root path="WEB-INF/lib/bcprov-jdk16-1.46.jar" use-physical-code-source="true"/>
            </resources>
        </deployment>
    </jboss-deployment-structure>
  • In the WEB-INF/web.xml file add the following lines:

    	<context-param>
    		<param-name>resteasy.scan</param-name>
    		<param-value>false</param-value>
    	</context-param>
    	<context-param>
    		<param-name>resteasy.scan.resources</param-name>
    		<param-value>false</param-value>
    	</context-param>
    	<context-param>
    		<param-name>resteasy.scan.providers</param-name>
    		<param-value>false</param-value>
    	</context-param>
    
  • Due to changes in the JBoss virtual file system, and a known issue with Jersey, there is a problem when working with the Artifactory REST API. To overcome this issue, execute the following steps:
    Under the META-INF directory, create a directory called services, and in services, create two files called javax.ws.rs.ext.MessageBodyReader and javax.ws.rs.ext.MessageBodyWriterThe contents of META-INF/services/javax.ws.rs.ext.MessageBodyReader and javax.ws.rs.ext.MessageBodyWriter files should be as follows:

    org.artifactory.rest.common.JaxbProvider
    org.artifactory.rest.common.JsonProvider
    org.artifactory.rest.common.XStreamAliasProvider 
  • You then need to delete the guava-15.0.jar file from the artifactory.war and replace it with guava-15.0-cdi1.0.jar which you can download from the JFrog Public Repository. This fix is due to a namespace issue with the Guava 15 library. For more details please refer to Guava Libraries Issue 1527.
     

  • Finally, when running under JBoss 6, a security provider for the Bouncy Castle encryption library is missing generating a "Failed to create encryption key" error when you try to install your Artifactory Pro license.
    To rectify this, you need to install a security provider for the BouncyCastle encryption library as described above in  Running WebSphere Liberty Profile.