This topic is intended for external developers who are building or extending premium modules and need to use Artifactory with LabKey.

To set up a development environment for premium modules, do the following:

  1. Acquire an Artifactory account and Identity Token (see instructions below).
  2. Complete the instructions in the topic Gradle Build.

Artifactory Setup

1. Get your Identity Token for the Artifactory server:

  • Log in to the Artifactory server using your GitHub credentials.
    • Note that you will be locked out of the server if you make more than 5 failed login attempts. If you get locked out, contact your Account Manager for a reset.
  • Click the user menu in the upper right to go to your profile.
  • Click "Edit Profile" in the dropdown menu.

  • Click the Generate an Identity Token button. This will present a dialog so you can describe the token if you wish.
  • Click "Next".
  • Capture the Identity Token so you can paste it into your gradle properties file. A 'copy' icon is provided.

  • Let your Account Manager know your user name and an email address to associate with that user name in Artifactory so your permissions can be set up to be able to read all necessary artifacts. This does not need to be the email address associated with your GitHub account, just an email address we can use within Artifactory (on the very rare cases that we send notifications through that system).

2. Modify the .gradle/gradle.properties file in your user's home directory:

  • Substitute your (case-sensitive) Artifactory user name (e.g., your_username in the above images) for the property artifactory_user and your Identity Token for the property artifactory_password within this file. Note there may be a different "display name" for your Artifactory account, but you want to use your actual user name in the properties file. This value is likely to be all lower case (something like labkey-susanh).
  • Your home directory will vary based on your computer's operating system. For Windows, it is usually C:\Users\YourUserName, on OSX it is usually /Users/YourUserName, and on Linux it is often /home/YourUserName.

Getting Artifacts from Artifactory

Our Artifactory repository has artifacts for all LabKey .module files and api .jar files available with their corresponding pom files, which should allow you to use these artifacts without having to enlist in the code for the individual modules. Artifacts for premium modules require an Artifactory account with the proper permissions, as outlined above. Community edition artifacts are available for everyone to use. See Gradle: Declare Dependencies for more information on declaring these dependencies. In particular, you will want to take note of the information on declaring dependencies on premium modules to pull them into your LabKey deployment. The LabKey gradle plugins also offer a buildFromSource property that allows you to control at a Gradle project level which modules are built from source and which are pulled from Artifactory.

1 Related Topics - [Gradle: Declare Dependencies|gradleDepend] - [Building LabKey|buildLabKey] - [Building from Source (or Not)|buildFromSourceOrNot]

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand allcollapse all