Document toolboxDocument toolbox

Maven + Artifactory

On This page

On Related Pages

Deploying to Artifactory

To access the Sage Artifactory web interface see: http://sagebionetworks.artifactoryonline.com/sagebionetworks/webapp/login.html. From there you can manually deploy artifacts that you want to be available to the build.

  • Note: You must login to deploy artifacts to Artifactory. If you do not have an artifactory account, any Sage developer should be able to create one for you as everybody is an administrator.

In order to deploy artifacts from the Synapse Maven build, you first need to setup a Maven setting.xml file that will provide Maven with your username and password. The settings file should be paced in the root of your .m2 folder (i.e. C:\Users\jmhill\.m2\settings.xml for a windows user).
You can use the following boiler plate to create your own settings file:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository/>
  <interactiveMode/>
  <usePluginRegistry/>
  <offline/>
  <pluginGroups/>
  <servers>
    <server>
      <id>sagebionetworks</id>
      <username>jSmith</username>
      <password>password123</password>
      <configuration></configuration>
    </server>
  </servers>
  <mirrors/>
  <proxies/>
  <profiles/>
  <activeProfiles/>
</settings>

The following entries in the root pom.xml file configure Maven to deploy to artifactory:

	<distributionManagement>
		<repository>
			<id>sagebionetworks</id>
			<name>sagebionetworks-releases</name>
			<url>http://sagebionetworks.artifactoryonline.com/sagebionetworks/libs-releases-local
			</url>
		</repository>
		<snapshotRepository>
			<id>sagebionetworks</id>
			<name>sagebionetworks-snapshots</name>
			<url>http://sagebionetworks.artifactoryonline.com/sagebionetworks/libs-snapshots-local
			</url>
		</snapshotRepository>
	</distributionManagement>

To deploy, simply run the following from the command line:

mvn clean deploy