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

Connextions Repository for Maven2

Connextions Repository for Maven2

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

Copy this code and paste it in your HTML
  1. <?xml version="1.0"?>
  2. <settings xmlns="" xmlns:xsi="" xsi:schemaLocation="">
  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


RSS Icon Subscribe to comments

You need to login to post a comment.