Using a internal maven2 repository settings.xml


/ Published in: Java
Save to your folder(s)

Setup artifactory application in a internal network that act as proxy. Then in your $HOME/.m2 directory, add the following file.

For deploying to repos, add this to pom.xml
...


cnx.release.repo
Connextions Repository for Maven2
http://firebird:8081/artifactory/cnx-releases


cnx.snapshots.repo
Connextions Repository for Maven2
http://firebird:8081/artifactory/cnx-snapshots


...
run: maven deploy -DrepositoryId=cnx.snapshots.repo


Copy this code and paste it in your HTML
  1. <?xml version="1.0"?>
  2. <settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  3. <mirrors>
  4. <mirror>
  5. <id>my.repo</id>
  6. <mirrorOf>*</mirrorOf>
  7. <url>http://firebird:8081/artifactory/repo</url>
  8. <name>Artifactory</name>
  9. </mirror>
  10. </mirrors>
  11. <servers>
  12. <server>
  13. <id>my.release.repo</id>
  14. <username>deployer</username>
  15. <password>deployer123</password>
  16. </server>
  17. <server>
  18. <id>my.snapshots.repo</id>
  19. <username>deployer</username>
  20. <password>deployer123</password>
  21. </server>
  22. </servers>
  23. </settings>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.