code_junkie

Can I add maven repositories in the command line?

Nov 10th, 2011
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. mvn install -Dmaven.repository=http://example.com/maven2
  2.  
  3. mvn package -Dmaven.repo.remote=http://www.ibiblio.org/maven/,http://myrepo
  4. -Dmaven.repo.local=c:testrepo
  5.  
  6. mvn deploy -P MyRepo2
  7.  
  8. mvn deploy -P MyRepo1
  9.  
  10. <?xml version="1.0" encoding="UTF-8"?>
  11. <project xmlns="http://maven.apache.org/POM/4.0.0"
  12. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  13. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  14. ...
  15. <repositories>
  16. <repository>
  17. <id>MavenCentral</id>
  18. <name>Maven repository</name>
  19. <url>http://repo1.maven.org/maven2</url>
  20. <releases>
  21. <enabled>true</enabled>
  22. </releases>
  23. <snapshots>
  24. <enabled>false</enabled>
  25. </snapshots>
  26. </repository>
  27. ...
  28. <repository>
  29. <id>Codehaus Snapshots</id>
  30. <url>http://snapshots.repository.codehaus.org/</url>
  31. <snapshots>
  32. <enabled>true</enabled>
  33. </snapshots>
  34. <releases>
  35. <enabled>false</enabled>
  36. </releases>
  37. </repository>
  38. </repositories>
  39.  
  40. ...
  41.  
  42. <pluginRepositories>
  43. <pluginRepository>
  44. <id>apache.snapshots</id>
  45. <name>Apache Snapshot Repository</name>
  46. <url>
  47. http://people.apache.org/repo/m2-snapshot-repository
  48. </url>
  49. <releases>
  50. <enabled>false</enabled>
  51. </releases>
  52. </pluginRepository>
  53. <pluginRepository>
  54. <id>Codehaus Snapshots</id>
  55. <url>http://snapshots.repository.codehaus.org/</url>
  56. <snapshots>
  57. <enabled>true</enabled>
  58. </snapshots>
  59. <releases>
  60. <enabled>false</enabled>
  61. </releases>
  62. </pluginRepository>
  63. </pluginRepositories>
  64.  
  65. ...
  66.  
  67. </project>
Add Comment
Please, Sign In to add comment