User Tools

Site Tools


maven

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
maven [2016/03/12 18:24] – external edit 127.0.0.1maven [2020/12/27 20:35] (current) – external edit 127.0.0.1
Line 126: Line 126:
  
 {{http://i520.photobucket.com/albums/w327/schajtan/2015-04-08_13-45-15_zpsqji69pt1.png}} {{http://i520.photobucket.com/albums/w327/schajtan/2015-04-08_13-45-15_zpsqji69pt1.png}}
 +
 +
 +
 +<code>
 +<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">
 +
 + <profiles>
 +
 + <profile>
 + <repositories>
 + <repository>
 +   <id>maven2-central-remote</id>
 +   <name>maven2-central-remote</name>
 +   <url>https://mydomain.com/artifactory/maven2-central-remote</url>
 + </repository>
 +
 + <repository>
 + <id>maven2-priv</id>
 + <name>maven2-priv</name>
 + <url>https://mydomain.com/artifactory/maven2-priv</url>
 + </repository>
 +
 + </repositories>
 +
 + <pluginRepositories>
 +   <pluginRepository>
 + <id>maven2-central-remote</id>
 + <url>https://mydomain.com/artifactory/maven2-central-remote</url>
 +   </pluginRepository>
 +
 +   <pluginRepository>
 + <id>center</id>
 + <url>https://repo1.maven.org/maven2/</url>
 +   </pluginRepository>
 +
 +   <pluginRepository>
 + <id>jcenter</id>
 + <url>https://jcenter.bintray.com</url>
 +   </pluginRepository>
 +   
 +   
 + </pluginRepositories>
 +
 + <id>bt</id>
 + </profile>
 + </profiles>
 +
 + <activeProfiles>
 + <activeProfile>bt</activeProfile>
 + </activeProfiles>
 +
 +
 + <proxies>
 + <proxy>
 + <active>true</active>
 + <host>111.122.3.44</host>
 + <port>9400</port>
 + <nonProxyHosts>mydomain.com|*.mydomain.com</nonProxyHosts>
 + </proxy>
 + </proxies>
 +
 + <servers>
 + <server>
 + <id>maven2-priv</id>
 + <username>username@domain.com</username>
 + <!-- encrypted pass or api token from artifactory profile -->
 + <password>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</password>
 + </server>
 + <server>
 + <id>maven2-priv-snap</id>
 + <username>username@domain.com</username>
 + <!-- encrypted pass or api token from artifactory profile -->
 + <password>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</password> <!-- encrypted pass -->
 + </server>
 + </servers>
 +
 +</settings>
 +
 +</code>
 +
 +
 +
 +
 +
 +Now you can add the following to your projects pom.xml
 +
 +<code>
 +
 +<project ....
 +  <pluginRepositories>
 +    <pluginRepository>
 +      <id>maven2-priv</id>
 +      <url>https://domain.com/artifactory/maven2-priv/</url>
 +    </pluginRepository>
 +  </pluginRepositories>
 + 
 +  <distributionManagement>
 +    <repository>
 +      <uniqueVersion>false</uniqueVersion>
 +      <id>maven2-priv</id>
 +      <name>maven2-priv</name>
 +      <url>https://domain.com/artifactory/maven2-priv</url>
 +      <layout>default</layout>
 +    </repository>
 +    <snapshotRepository>
 +      <uniqueVersion>false</uniqueVersion>
 +      <id>maven2-priv-snap</id>
 +      <name>maven2-priv</name>
 +      <url>https://domain.com/artifactory/maven2-priv</url>
 +      <layout>default</layout>
 +    </snapshotRepository>
 +  </distributionManagement>
 +  ...
 +</project>
 +
 +</code>
 +
 +
 +# The following command deploys the artifact to the Artifactory.   
 +<code> 
 +mvn clean install
 +mvn clean deploy 
 +</code>
  
  
maven.1457807067.txt.gz · Last modified: (external edit)