Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/tags/nexu…

…s-test-harness-env-plugin@3589 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab
  • Loading branch information...
commit a9aecae71e7e0f78223b59d38b58fdf58281cdcb 1 parent 18523c0
velo authored
Showing with 15,685 additions and 0 deletions.
  1. +85 −0 nexus-test-harness/nexus-simple-memory-realm/pom.xml
  2. +109 −0 ...ss/nexus-simple-memory-realm/src/main/java/org/sonatype/jsecurity/realms/MemoryAuthenticationOnlyRealm.java
  3. +218 −0 nexus-test-harness/nexus-simple-memory-realm/src/main/java/org/sonatype/jsecurity/realms/MemoryRealm.java
  4. +74 −0 ...-test-harness/nexus-simple-memory-realm/src/main/java/org/sonatype/jsecurity/realms/simple/SimpleRealm.java
  5. +60 −0 ...harness/nexus-simple-memory-realm/src/main/java/org/sonatype/jsecurity/realms/simple/SimpleRoleLocator.java
  6. +81 −0 ...s-test-harness/nexus-simple-memory-realm/src/main/java/org/sonatype/jsecurity/realms/simple/SimpleUser.java
  7. +159 −0 ...harness/nexus-simple-memory-realm/src/main/java/org/sonatype/jsecurity/realms/simple/SimpleUserLocator.java
  8. +71 −0 nexus-test-harness/nexus-simple-memory-realm/src/main/java/org/sonatype/jsecurity/realms/simple/UserStore.java
  9. +64 −0 ...exus-simple-memory-realm/src/test/java/org/sonatype/jsecurity/realms/MemoryAuthenticationOnlyRealmTest.java
  10. +132 −0 nexus-test-harness/nexus-simple-memory-realm/src/test/java/org/sonatype/jsecurity/realms/MemoryRealmTest.java
  11. +194 −0 ...t-harness/nexus-simple-memory-realm/src/test/java/org/sonatype/jsecurity/realms/simple/SimpleRealmTest.java
  12. +24 −0 ...ess/nexus-simple-memory-realm/src/test/java/org/sonatype/jsecurity/realms/simple/SimpleRoleLocatorTest.java
  13. +71 −0 ...ess/nexus-simple-memory-realm/src/test/java/org/sonatype/jsecurity/realms/simple/SimpleUserLocatorTest.java
  14. +9 −0 nexus-test-harness/nexus-simple-memory-realm/src/test/resources/log4j.properties
  15. +263 −0 nexus-test-harness/nexus-simple-memory-realm/src/test/resources/nexus.xml
  16. +31 −0 nexus-test-harness/nexus-simple-memory-realm/src/test/resources/security.xml
  17. +119 −0 nexus-test-harness/nexus-test-harness-base/pom.xml
  18. +15 −0 nexus-test-harness/nexus-test-harness-base/src/assemble/bundle-conf.xml
  19. +12 −0 nexus-test-harness/nexus-test-harness-base/src/assemble/bundle-conf/conf/plexus.properties
  20. +22 −0 nexus-test-harness/nexus-test-harness-base/src/assemble/bundle-conf/runtime/apps/nexus/conf/log4j.properties
  21. +15 −0 nexus-test-harness/nexus-test-harness-base/src/assemble/resources.xml
  22. +23 −0 nexus-test-harness/nexus-test-harness-base/src/assemble/resources/baseTest.properties
  23. +21 −0 nexus-test-harness/nexus-test-harness-base/src/assemble/resources/default-config/log4j.propertiesd
  24. +173 −0 nexus-test-harness/nexus-test-harness-base/src/assemble/resources/default-config/nexus.xml
  25. +73 −0 nexus-test-harness/nexus-test-harness-base/src/assemble/resources/default-config/security.xml
  26. +92 −0 nexus-test-harness/nexus-test-harness-base/src/assemble/resources/default-config/settings.xml
  27. +22 −0 nexus-test-harness/nexus-test-harness-base/src/assemble/resources/log4j.properties
  28. +287 −0 nexus-test-harness/nexus-test-harness-launcher/pom.xml
  29. +6 −0 nexus-test-harness/nexus-test-harness-launcher/resources/default-config/realm.properties
  30. +91 −0 nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/asm/asm-parent/3.0/asm-parent-3.0.pom
  31. +1 −0  ...-test-harness/nexus-test-harness-launcher/resources/fake-central/asm/asm-parent/3.0/asm-parent-3.0.pom.sha1
  32. BIN  nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/asm/asm/3.0/asm-3.0.jar
  33. +1 −0  nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/asm/asm/3.0/asm-3.0.jar.sha1
  34. +14 −0 nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/asm/asm/3.0/asm-3.0.pom
  35. +1 −0  nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/asm/asm/3.0/asm-3.0.pom.sha1
  36. +95 −0 ...est-harness-launcher/resources/fake-central/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.pom
  37. +1 −0  ...arness-launcher/resources/fake-central/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.pom.sha1
  38. +18 −0 nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/com/jcraft/jsch/0.1.23/jsch-0.1.23.pom
  39. +1 −0  ...test-harness/nexus-test-harness-launcher/resources/fake-central/com/jcraft/jsch/0.1.23/jsch-0.1.23.pom.sha1
  40. +78 −0 ...t-harness-launcher/resources/fake-central/commons-beanutils/commons-beanutils/1.6/commons-beanutils-1.6.pom
  41. +1 −0  ...ness-launcher/resources/fake-central/commons-beanutils/commons-beanutils/1.6/commons-beanutils-1.6.pom.sha1
  42. BIN  ...rness-launcher/resources/fake-central/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar
  43. +1 −0  ...-launcher/resources/fake-central/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar.sha1
  44. +13 −0 ...rness-launcher/resources/fake-central/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.pom
  45. +1 −0  ...-launcher/resources/fake-central/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.pom.sha1
  46. +76 −0 ...-harness/nexus-test-harness-launcher/resources/fake-central/commons-cli/commons-cli/1.0/commons-cli-1.0.pom
  47. +1 −0  ...ess/nexus-test-harness-launcher/resources/fake-central/commons-cli/commons-cli/1.0/commons-cli-1.0.pom.sha1
  48. BIN  ...ess-launcher/resources/fake-central/commons-collections/commons-collections/2.0/commons-collections-2.0.jar
  49. +1 −0  ...auncher/resources/fake-central/commons-collections/commons-collections/2.0/commons-collections-2.0.jar.sha1
  50. +6 −0 ...ess-launcher/resources/fake-central/commons-collections/commons-collections/2.0/commons-collections-2.0.pom
  51. +1 −0  ...auncher/resources/fake-central/commons-collections/commons-collections/2.0/commons-collections-2.0.pom.sha1
  52. +94 −0 ...ess-launcher/resources/fake-central/commons-collections/commons-collections/2.1/commons-collections-2.1.pom
  53. +1 −0  ...auncher/resources/fake-central/commons-collections/commons-collections/2.1/commons-collections-2.1.pom.sha1
  54. BIN  ...test-harness-launcher/resources/fake-central/commons-digester/commons-digester/1.6/commons-digester-1.6.jar
  55. +1 −0  ...harness-launcher/resources/fake-central/commons-digester/commons-digester/1.6/commons-digester-1.6.jar.sha1
  56. +34 −0 ...test-harness-launcher/resources/fake-central/commons-digester/commons-digester/1.6/commons-digester-1.6.pom
  57. +1 −0  ...harness-launcher/resources/fake-central/commons-digester/commons-digester/1.6/commons-digester-1.6.pom.sha1
  58. BIN  ...rness/nexus-test-harness-launcher/resources/fake-central/commons-lang/commons-lang/2.1/commons-lang-2.1.jar
  59. +1 −0  .../nexus-test-harness-launcher/resources/fake-central/commons-lang/commons-lang/2.1/commons-lang-2.1.jar.sha1
  60. +364 −0 ...rness/nexus-test-harness-launcher/resources/fake-central/commons-lang/commons-lang/2.1/commons-lang-2.1.pom
  61. +1 −0  .../nexus-test-harness-launcher/resources/fake-central/commons-lang/commons-lang/2.1/commons-lang-2.1.pom.sha1
  62. +6 −0 ...ess-launcher/resources/fake-central/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.pom
  63. +1 −0  ...auncher/resources/fake-central/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.pom.sha1
  64. +31 −0 ...est-harness-launcher/resources/fake-central/commons-logging/commons-logging/1.0.3/commons-logging-1.0.3.pom
  65. +1 −0  ...arness-launcher/resources/fake-central/commons-logging/commons-logging/1.0.3/commons-logging-1.0.3.pom.sha1
  66. BIN  ...est-harness-launcher/resources/fake-central/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
  67. +1 −0  ...arness-launcher/resources/fake-central/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar.sha1
  68. +165 −0 ...est-harness-launcher/resources/fake-central/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.pom
  69. +1 −0  ...arness-launcher/resources/fake-central/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.pom.sha1
  70. +6 −0 ...us-test-harness-launcher/resources/fake-central/commons-logging/commons-logging/1.0/commons-logging-1.0.pom
  71. +1 −0  ...st-harness-launcher/resources/fake-central/commons-logging/commons-logging/1.0/commons-logging-1.0.pom.sha1
  72. BIN  ...rness-launcher/resources/fake-central/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.jar
  73. +1 −0  ...-launcher/resources/fake-central/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.jar.sha1
  74. +295 −0 ...rness-launcher/resources/fake-central/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.pom
  75. +1 −0  ...-launcher/resources/fake-central/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.pom.sha1
  76. +32 −0 ...est-harness-launcher/resources/fake-central/doxia/doxia-sink-api/1.0-alpha-4/doxia-sink-api-1.0-alpha-4.pom
  77. +1 −0  ...arness-launcher/resources/fake-central/doxia/doxia-sink-api/1.0-alpha-4/doxia-sink-api-1.0-alpha-4.pom.sha1
  78. +29 −0 nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/junit/junit/3.8.1/junit-3.8.1.pom
  79. +1 −0  nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/junit/junit/3.8.1/junit-3.8.1.pom.sha1
  80. +82 −0 nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/apache/1/apache-1.pom
  81. +1 −0  nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/apache/1/apache-1.pom.sha1
  82. +82 −0 nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/apache/3/apache-3.pom
  83. +1 −0  nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/apache/3/apache-3.pom.sha1
  84. +113 −0 nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/apache/4/apache-4.pom
  85. +1 −0  nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/apache/4/apache-4.pom.sha1
  86. BIN  ...ss-launcher/resources/fake-central/org/apache/maven/doxia/doxia-core/1.0-alpha-7/doxia-core-1.0-alpha-7.jar
  87. +1 −0  ...uncher/resources/fake-central/org/apache/maven/doxia/doxia-core/1.0-alpha-7/doxia-core-1.0-alpha-7.jar.sha1
  88. +48 −0 ...ss-launcher/resources/fake-central/org/apache/maven/doxia/doxia-core/1.0-alpha-7/doxia-core-1.0-alpha-7.pom
  89. +1 −0  ...uncher/resources/fake-central/org/apache/maven/doxia/doxia-core/1.0-alpha-7/doxia-core-1.0-alpha-7.pom.sha1
  90. BIN  ...ss-launcher/resources/fake-central/org/apache/maven/doxia/doxia-core/1.0-alpha-8/doxia-core-1.0-alpha-8.jar
  91. +1 −0  ...uncher/resources/fake-central/org/apache/maven/doxia/doxia-core/1.0-alpha-8/doxia-core-1.0-alpha-8.jar.sha1
  92. +58 −0 ...ss-launcher/resources/fake-central/org/apache/maven/doxia/doxia-core/1.0-alpha-8/doxia-core-1.0-alpha-8.pom
  93. +1 −0  ...uncher/resources/fake-central/org/apache/maven/doxia/doxia-core/1.0-alpha-8/doxia-core-1.0-alpha-8.pom.sha1
  94. +50 −0 ...ke-central/org/apache/maven/doxia/doxia-decoration-model/1.0-alpha-7/doxia-decoration-model-1.0-alpha-7.pom
  95. +1 −0  ...ntral/org/apache/maven/doxia/doxia-decoration-model/1.0-alpha-7/doxia-decoration-model-1.0-alpha-7.pom.sha1
  96. BIN  ...ke-central/org/apache/maven/doxia/doxia-decoration-model/1.0-alpha-8/doxia-decoration-model-1.0-alpha-8.jar
  97. +1 −0  ...ntral/org/apache/maven/doxia/doxia-decoration-model/1.0-alpha-8/doxia-decoration-model-1.0-alpha-8.jar.sha1
  98. +50 −0 ...ke-central/org/apache/maven/doxia/doxia-decoration-model/1.0-alpha-8/doxia-decoration-model-1.0-alpha-8.pom
  99. +1 −0  ...ntral/org/apache/maven/doxia/doxia-decoration-model/1.0-alpha-8/doxia-decoration-model-1.0-alpha-8.pom.sha1
  100. +14 −0 ...her/resources/fake-central/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.pom
  101. +1 −0  ...esources/fake-central/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.pom.sha1
  102. +14 −0 ...her/resources/fake-central/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-8/doxia-sink-api-1.0-alpha-8.pom
  103. +1 −0  ...esources/fake-central/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-8/doxia-sink-api-1.0-alpha-8.pom.sha1
  104. +47 −0 ...ces/fake-central/org/apache/maven/doxia/doxia-site-renderer/1.0-alpha-7/doxia-site-renderer-1.0-alpha-7.pom
  105. +1 −0  ...ake-central/org/apache/maven/doxia/doxia-site-renderer/1.0-alpha-7/doxia-site-renderer-1.0-alpha-7.pom.sha1
  106. BIN  ...ces/fake-central/org/apache/maven/doxia/doxia-site-renderer/1.0-alpha-8/doxia-site-renderer-1.0-alpha-8.jar
  107. +1 −0  ...ake-central/org/apache/maven/doxia/doxia-site-renderer/1.0-alpha-8/doxia-site-renderer-1.0-alpha-8.jar.sha1
  108. +47 −0 ...ces/fake-central/org/apache/maven/doxia/doxia-site-renderer/1.0-alpha-8/doxia-site-renderer-1.0-alpha-8.pom
  109. +1 −0  ...ake-central/org/apache/maven/doxia/doxia-site-renderer/1.0-alpha-8/doxia-site-renderer-1.0-alpha-8.pom.sha1
  110. +109 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/doxia/doxia/1.0-alpha-7/doxia-1.0-alpha-7.pom
  111. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/doxia/doxia/1.0-alpha-7/doxia-1.0-alpha-7.pom.sha1
  112. +72 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/doxia/doxia/1.0-alpha-8/doxia-1.0-alpha-8.pom
  113. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/doxia/doxia/1.0-alpha-8/doxia-1.0-alpha-8.pom.sha1
  114. BIN  ...xus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-archiver/2.3/maven-archiver-2.3.jar
  115. +1 −0  ...est-harness-launcher/resources/fake-central/org/apache/maven/maven-archiver/2.3/maven-archiver-2.3.jar.sha1
  116. +104 −0 ...xus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-archiver/2.3/maven-archiver-2.3.pom
  117. +1 −0  ...est-harness-launcher/resources/fake-central/org/apache/maven/maven-archiver/2.3/maven-archiver-2.3.pom.sha1
  118. +45 −0 ...ncher/resources/fake-central/org/apache/maven/maven-artifact-manager/2.0.2/maven-artifact-manager-2.0.2.pom
  119. +1 −0  .../resources/fake-central/org/apache/maven/maven-artifact-manager/2.0.2/maven-artifact-manager-2.0.2.pom.sha1
  120. +44 −0 ...ncher/resources/fake-central/org/apache/maven/maven-artifact-manager/2.0.4/maven-artifact-manager-2.0.4.pom
  121. +1 −0  .../resources/fake-central/org/apache/maven/maven-artifact-manager/2.0.4/maven-artifact-manager-2.0.4.pom.sha1
  122. +78 −0 ...ncher/resources/fake-central/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6.pom
  123. +1 −0  .../resources/fake-central/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6.pom.sha1
  124. +78 −0 ...ncher/resources/fake-central/org/apache/maven/maven-artifact-manager/2.0.7/maven-artifact-manager-2.0.7.pom
  125. +1 −0  .../resources/fake-central/org/apache/maven/maven-artifact-manager/2.0.7/maven-artifact-manager-2.0.7.pom.sha1
  126. +45 −0 ...-launcher/resources/fake-central/org/apache/maven/maven-artifact-manager/2.0/maven-artifact-manager-2.0.pom
  127. +1 −0  ...cher/resources/fake-central/org/apache/maven/maven-artifact-manager/2.0/maven-artifact-manager-2.0.pom.sha1
  128. +26 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/maven-artifact/2.0.2/maven-artifact-2.0.2.pom
  129. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/maven-artifact/2.0.2/maven-artifact-2.0.2.pom.sha1
  130. +26 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/maven-artifact/2.0.4/maven-artifact-2.0.4.pom
  131. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/maven-artifact/2.0.4/maven-artifact-2.0.4.pom.sha1
  132. +25 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/maven-artifact/2.0.5/maven-artifact-2.0.5.pom
  133. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/maven-artifact/2.0.5/maven-artifact-2.0.5.pom.sha1
  134. +42 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6.pom
  135. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6.pom.sha1
  136. +42 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/maven-artifact/2.0.7/maven-artifact-2.0.7.pom
  137. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/maven-artifact/2.0.7/maven-artifact-2.0.7.pom.sha1
  138. +42 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/maven-artifact/2.0.8/maven-artifact-2.0.8.pom
  139. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/maven-artifact/2.0.8/maven-artifact-2.0.8.pom.sha1
  140. +26 −0 ...xus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0.pom
  141. +1 −0  ...est-harness-launcher/resources/fake-central/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0.pom.sha1
  142. +205 −0 ...s/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6.pom
  143. +1 −0  ...us-test-harness-launcher/resources/fake-central/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6.pom.sha1
  144. +186 −0 ...rness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-core/2.0/maven-core-2.0.pom
  145. +1 −0  .../nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-core/2.0/maven-core-2.0.pom.sha1
  146. +40 −0 ...her/resources/fake-central/org/apache/maven/maven-error-diagnostics/2.0.6/maven-error-diagnostics-2.0.6.pom
  147. +1 −0  ...esources/fake-central/org/apache/maven/maven-error-diagnostics/2.0.6/maven-error-diagnostics-2.0.6.pom.sha1
  148. +23 −0 ...auncher/resources/fake-central/org/apache/maven/maven-error-diagnostics/2.0/maven-error-diagnostics-2.0.pom
  149. +1 −0  ...er/resources/fake-central/org/apache/maven/maven-error-diagnostics/2.0/maven-error-diagnostics-2.0.pom.sha1
  150. +95 −0 ...nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-model/2.0.4/maven-model-2.0.4.pom
  151. +1 −0  ...-test-harness-launcher/resources/fake-central/org/apache/maven/maven-model/2.0.4/maven-model-2.0.4.pom.sha1
  152. +95 −0 ...nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-model/2.0.5/maven-model-2.0.5.pom
  153. +1 −0  ...-test-harness-launcher/resources/fake-central/org/apache/maven/maven-model/2.0.5/maven-model-2.0.5.pom.sha1
  154. +93 −0 ...nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6.pom
  155. +1 −0  ...-test-harness-launcher/resources/fake-central/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6.pom.sha1
  156. +93 −0 ...nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-model/2.0.7/maven-model-2.0.7.pom
  157. +1 −0  ...-test-harness-launcher/resources/fake-central/org/apache/maven/maven-model/2.0.7/maven-model-2.0.7.pom.sha1
  158. +86 −0 ...ess/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-model/2.0/maven-model-2.0.pom
  159. +1 −0  ...exus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-model/2.0/maven-model-2.0.pom.sha1
  160. +31 −0 ...s-test-harness-launcher/resources/fake-central/org/apache/maven/maven-monitor/2.0.6/maven-monitor-2.0.6.pom
  161. +1 −0  ...t-harness-launcher/resources/fake-central/org/apache/maven/maven-monitor/2.0.6/maven-monitor-2.0.6.pom.sha1
  162. +15 −0 ...nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-monitor/2.0/maven-monitor-2.0.pom
  163. +1 −0  ...-test-harness-launcher/resources/fake-central/org/apache/maven/maven-monitor/2.0/maven-monitor-2.0.pom.sha1
  164. +200 −0 ...rness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-parent/1/maven-parent-1.pom
  165. +1 −0  .../nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-parent/1/maven-parent-1.pom.sha1
  166. +304 −0 ...rness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-parent/4/maven-parent-4.pom
  167. +1 −0  .../nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-parent/4/maven-parent-4.pom.sha1
  168. +466 −0 ...rness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-parent/5/maven-parent-5.pom
  169. +1 −0  .../nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-parent/5/maven-parent-5.pom.sha1
  170. +651 −0 ...rness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-parent/6/maven-parent-6.pom
  171. +1 −0  .../nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-parent/6/maven-parent-6.pom.sha1
  172. +670 −0 ...rness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-parent/7/maven-parent-7.pom
  173. +1 −0  .../nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-parent/7/maven-parent-7.pom.sha1
  174. +755 −0 ...rness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-parent/8/maven-parent-8.pom
  175. +1 −0  .../nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-parent/8/maven-parent-8.pom.sha1
  176. +23 −0 ...-harness-launcher/resources/fake-central/org/apache/maven/maven-plugin-api/2.0.4/maven-plugin-api-2.0.4.pom
  177. +1 −0  ...ess-launcher/resources/fake-central/org/apache/maven/maven-plugin-api/2.0.4/maven-plugin-api-2.0.4.pom.sha1
  178. +39 −0 ...-harness-launcher/resources/fake-central/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.pom
  179. +1 −0  ...ess-launcher/resources/fake-central/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.pom.sha1
  180. +23 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.pom
  181. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.pom.sha1
  182. +57 −0 ...her/resources/fake-central/org/apache/maven/maven-plugin-descriptor/2.0.6/maven-plugin-descriptor-2.0.6.pom
  183. +1 −0  ...esources/fake-central/org/apache/maven/maven-plugin-descriptor/2.0.6/maven-plugin-descriptor-2.0.6.pom.sha1
  184. +52 −0 ...auncher/resources/fake-central/org/apache/maven/maven-plugin-descriptor/2.0/maven-plugin-descriptor-2.0.pom
  185. +1 −0  ...er/resources/fake-central/org/apache/maven/maven-plugin-descriptor/2.0/maven-plugin-descriptor-2.0.pom.sha1
  186. +53 −0 ...entral/org/apache/maven/maven-plugin-parameter-documenter/2.0.6/maven-plugin-parameter-documenter-2.0.6.pom
  187. +1 −0  ...l/org/apache/maven/maven-plugin-parameter-documenter/2.0.6/maven-plugin-parameter-documenter-2.0.6.pom.sha1
  188. +54 −0 ...ke-central/org/apache/maven/maven-plugin-parameter-documenter/2.0/maven-plugin-parameter-documenter-2.0.pom
  189. +1 −0  ...ntral/org/apache/maven/maven-plugin-parameter-documenter/2.0/maven-plugin-parameter-documenter-2.0.pom.sha1
  190. +53 −0 ...auncher/resources/fake-central/org/apache/maven/maven-plugin-registry/2.0.6/maven-plugin-registry-2.0.6.pom
  191. +1 −0  ...er/resources/fake-central/org/apache/maven/maven-plugin-registry/2.0.6/maven-plugin-registry-2.0.6.pom.sha1
  192. +53 −0 ...auncher/resources/fake-central/org/apache/maven/maven-plugin-registry/2.0.7/maven-plugin-registry-2.0.7.pom
  193. +1 −0  ...er/resources/fake-central/org/apache/maven/maven-plugin-registry/2.0.7/maven-plugin-registry-2.0.7.pom.sha1
  194. +46 −0 ...ss-launcher/resources/fake-central/org/apache/maven/maven-plugin-registry/2.0/maven-plugin-registry-2.0.pom
  195. +1 −0  ...uncher/resources/fake-central/org/apache/maven/maven-plugin-registry/2.0/maven-plugin-registry-2.0.pom.sha1
  196. +327 −0 ...resources/fake-central/org/apache/maven/maven-plugin-surrogate-parent/5/maven-plugin-surrogate-parent-5.pom
  197. +1 −0  ...rces/fake-central/org/apache/maven/maven-plugin-surrogate-parent/5/maven-plugin-surrogate-parent-5.pom.sha1
  198. +58 −0 ...s-test-harness-launcher/resources/fake-central/org/apache/maven/maven-profile/2.0.4/maven-profile-2.0.4.pom
  199. +1 −0  ...t-harness-launcher/resources/fake-central/org/apache/maven/maven-profile/2.0.4/maven-profile-2.0.4.pom.sha1
  200. +57 −0 ...s-test-harness-launcher/resources/fake-central/org/apache/maven/maven-profile/2.0.6/maven-profile-2.0.6.pom
  201. +1 −0  ...t-harness-launcher/resources/fake-central/org/apache/maven/maven-profile/2.0.6/maven-profile-2.0.6.pom.sha1
  202. +57 −0 ...s-test-harness-launcher/resources/fake-central/org/apache/maven/maven-profile/2.0.7/maven-profile-2.0.7.pom
  203. +1 −0  ...t-harness-launcher/resources/fake-central/org/apache/maven/maven-profile/2.0.7/maven-profile-2.0.7.pom.sha1
  204. +50 −0 ...nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-profile/2.0/maven-profile-2.0.pom
  205. +1 −0  ...-test-harness-launcher/resources/fake-central/org/apache/maven/maven-profile/2.0/maven-profile-2.0.pom.sha1
  206. +57 −0 ...s-test-harness-launcher/resources/fake-central/org/apache/maven/maven-project/2.0.4/maven-project-2.0.4.pom
  207. +1 −0  ...t-harness-launcher/resources/fake-central/org/apache/maven/maven-project/2.0.4/maven-project-2.0.4.pom.sha1
  208. +57 −0 ...s-test-harness-launcher/resources/fake-central/org/apache/maven/maven-project/2.0.5/maven-project-2.0.5.pom
  209. +1 −0  ...t-harness-launcher/resources/fake-central/org/apache/maven/maven-project/2.0.5/maven-project-2.0.5.pom.sha1
  210. +73 −0 ...s-test-harness-launcher/resources/fake-central/org/apache/maven/maven-project/2.0.6/maven-project-2.0.6.pom
  211. +1 −0  ...t-harness-launcher/resources/fake-central/org/apache/maven/maven-project/2.0.6/maven-project-2.0.6.pom.sha1
  212. +73 −0 ...s-test-harness-launcher/resources/fake-central/org/apache/maven/maven-project/2.0.7/maven-project-2.0.7.pom
  213. +1 −0  ...t-harness-launcher/resources/fake-central/org/apache/maven/maven-project/2.0.7/maven-project-2.0.7.pom.sha1
  214. +73 −0 ...s-test-harness-launcher/resources/fake-central/org/apache/maven/maven-project/2.0.8/maven-project-2.0.8.pom
  215. +1 −0  ...t-harness-launcher/resources/fake-central/org/apache/maven/maven-project/2.0.8/maven-project-2.0.8.pom.sha1
  216. +52 −0 ...nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-project/2.0/maven-project-2.0.pom
  217. +1 −0  ...-test-harness-launcher/resources/fake-central/org/apache/maven/maven-project/2.0/maven-project-2.0.pom.sha1
  218. +45 −0 ...resources/fake-central/org/apache/maven/maven-repository-metadata/2.0.2/maven-repository-metadata-2.0.2.pom
  219. +1 −0  ...rces/fake-central/org/apache/maven/maven-repository-metadata/2.0.2/maven-repository-metadata-2.0.2.pom.sha1
  220. +51 −0 ...resources/fake-central/org/apache/maven/maven-repository-metadata/2.0.6/maven-repository-metadata-2.0.6.pom
  221. +1 −0  ...rces/fake-central/org/apache/maven/maven-repository-metadata/2.0.6/maven-repository-metadata-2.0.6.pom.sha1
  222. +51 −0 ...resources/fake-central/org/apache/maven/maven-repository-metadata/2.0.7/maven-repository-metadata-2.0.7.pom
  223. +1 −0  ...rces/fake-central/org/apache/maven/maven-repository-metadata/2.0.7/maven-repository-metadata-2.0.7.pom.sha1
  224. +44 −0 ...her/resources/fake-central/org/apache/maven/maven-repository-metadata/2.0/maven-repository-metadata-2.0.pom
  225. +1 −0  ...esources/fake-central/org/apache/maven/maven-repository-metadata/2.0/maven-repository-metadata-2.0.pom.sha1
  226. +58 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/maven-settings/2.0.4/maven-settings-2.0.4.pom
  227. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/maven-settings/2.0.4/maven-settings-2.0.4.pom.sha1
  228. +57 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/maven-settings/2.0.6/maven-settings-2.0.6.pom
  229. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/maven-settings/2.0.6/maven-settings-2.0.6.pom.sha1
  230. +57 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/maven-settings/2.0.7/maven-settings-2.0.7.pom
  231. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/maven-settings/2.0.7/maven-settings-2.0.7.pom.sha1
  232. +50 −0 ...xus-test-harness-launcher/resources/fake-central/org/apache/maven/maven-settings/2.0/maven-settings-2.0.pom
  233. +1 −0  ...est-harness-launcher/resources/fake-central/org/apache/maven/maven-settings/2.0/maven-settings-2.0.pom.sha1
  234. BIN  ...s-test-harness-launcher/resources/fake-central/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0.jar
  235. +1 −0  ...t-harness-launcher/resources/fake-central/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0.jar.sha1
  236. +86 −0 ...s-test-harness-launcher/resources/fake-central/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0.pom
  237. +1 −0  ...t-harness-launcher/resources/fake-central/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0.pom.sha1
  238. +377 −0 ...est-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven/2.0.2/maven-2.0.2.pom
  239. +1 −0  ...arness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven/2.0.2/maven-2.0.2.pom.sha1
  240. +341 −0 ...est-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven/2.0.4/maven-2.0.4.pom
  241. +1 −0  ...arness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven/2.0.4/maven-2.0.4.pom.sha1
  242. +162 −0 ...est-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven/2.0.5/maven-2.0.5.pom
  243. +1 −0  ...arness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven/2.0.5/maven-2.0.5.pom.sha1
  244. +246 −0 ...est-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven/2.0.6/maven-2.0.6.pom
  245. +1 −0  ...arness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven/2.0.6/maven-2.0.6.pom.sha1
  246. +294 −0 ...est-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven/2.0.7/maven-2.0.7.pom
  247. +1 −0  ...arness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven/2.0.7/maven-2.0.7.pom.sha1
  248. +333 −0 ...est-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven/2.0.8/maven-2.0.8.pom
  249. +1 −0  ...arness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven/2.0.8/maven-2.0.8.pom.sha1
  250. +264 −0 nexus-test-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven/2.0/maven-2.0.pom
  251. +1 −0  ...st-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/maven/2.0/maven-2.0.pom.sha1
  252. BIN  ...-launcher/resources/fake-central/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.jar
  253. +1 −0  ...cher/resources/fake-central/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.jar.sha1
  254. +103 −0 ...-launcher/resources/fake-central/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
  255. +1 −0  ...cher/resources/fake-central/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom.sha1
  256. +17 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml
  257. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml.sha1
  258. BIN  ...resources/fake-central/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.jar
  259. +1 −0  ...rces/fake-central/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.jar.sha1
  260. +65 −0 ...resources/fake-central/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.pom
  261. +1 −0  ...rces/fake-central/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.pom.sha1
  262. +16 −0 ...t-harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml
  263. +1 −0  ...ness-launcher/resources/fake-central/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml.sha1
  264. BIN  ...resources/fake-central/org/apache/maven/plugins/maven-dependency-plugin/2.0/maven-dependency-plugin-2.0.jar
  265. +1 −0  ...rces/fake-central/org/apache/maven/plugins/maven-dependency-plugin/2.0/maven-dependency-plugin-2.0.jar.sha1
  266. +339 −0 ...resources/fake-central/org/apache/maven/plugins/maven-dependency-plugin/2.0/maven-dependency-plugin-2.0.pom
  267. +1 −0  ...rces/fake-central/org/apache/maven/plugins/maven-dependency-plugin/2.0/maven-dependency-plugin-2.0.pom.sha1
  268. +16 −0 ...harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-dependency-plugin/maven-metadata.xml
  269. +1 −0  ...ss-launcher/resources/fake-central/org/apache/maven/plugins/maven-dependency-plugin/maven-metadata.xml.sha1
  270. BIN  ...auncher/resources/fake-central/org/apache/maven/plugins/maven-deploy-plugin/2.3/maven-deploy-plugin-2.3.jar
  271. +1 −0  ...er/resources/fake-central/org/apache/maven/plugins/maven-deploy-plugin/2.3/maven-deploy-plugin-2.3.jar.sha1
  272. +59 −0 ...auncher/resources/fake-central/org/apache/maven/plugins/maven-deploy-plugin/2.3/maven-deploy-plugin-2.3.pom
  273. +1 −0  ...er/resources/fake-central/org/apache/maven/plugins/maven-deploy-plugin/2.3/maven-deploy-plugin-2.3.pom.sha1
  274. BIN  ...auncher/resources/fake-central/org/apache/maven/plugins/maven-deploy-plugin/2.4/maven-deploy-plugin-2.4.jar
  275. +1 −0  ...er/resources/fake-central/org/apache/maven/plugins/maven-deploy-plugin/2.4/maven-deploy-plugin-2.4.jar.sha1
  276. +168 −0 ...auncher/resources/fake-central/org/apache/maven/plugins/maven-deploy-plugin/2.4/maven-deploy-plugin-2.4.pom
  277. +1 −0  ...er/resources/fake-central/org/apache/maven/plugins/maven-deploy-plugin/2.4/maven-deploy-plugin-2.4.pom.sha1
  278. +19 −0 ...est-harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml
  279. +1 −0  ...arness-launcher/resources/fake-central/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml.sha1
  280. BIN  ...ncher/resources/fake-central/org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.jar
  281. +1 −0  .../resources/fake-central/org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.jar.sha1
  282. +59 −0 ...ncher/resources/fake-central/org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.pom
  283. +1 −0  .../resources/fake-central/org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.pom.sha1
  284. +15 −0 ...st-harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
  285. +1 −0  ...rness-launcher/resources/fake-central/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml.sha1
  286. BIN  ...ness-launcher/resources/fake-central/org/apache/maven/plugins/maven-jar-plugin/2.2/maven-jar-plugin-2.2.jar
  287. +1 −0  ...launcher/resources/fake-central/org/apache/maven/plugins/maven-jar-plugin/2.2/maven-jar-plugin-2.2.jar.sha1
  288. +249 −0 ...ness-launcher/resources/fake-central/org/apache/maven/plugins/maven-jar-plugin/2.2/maven-jar-plugin-2.2.pom
  289. +1 −0  ...launcher/resources/fake-central/org/apache/maven/plugins/maven-jar-plugin/2.2/maven-jar-plugin-2.2.pom.sha1
  290. +16 −0 ...s-test-harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-jar-plugin/maven-metadata.xml
  291. +1 −0  ...t-harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-jar-plugin/maven-metadata.xml.sha1
  292. +224 −0 ...test-harness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-metadata.xml
  293. +1 −0  ...harness/nexus-test-harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-metadata.xml.sha1
  294. +88 −0 ...s-test-harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-plugins/1/maven-plugins-1.pom
  295. +1 −0  ...t-harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-plugins/1/maven-plugins-1.pom.sha1
  296. +185 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-plugins/10/maven-plugins-10.pom
  297. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-plugins/10/maven-plugins-10.pom.sha1
  298. +259 −0 ...test-harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-plugins/11/maven-plugins-11.pom
  299. +1 −0  ...harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-plugins/11/maven-plugins-11.pom.sha1
  300. +361 −0 ...s-test-harness-launcher/resources/fake-central/org/apache/maven/plugins/maven-plugins/7/maven-plugins-7.pom
Sorry, we could not display the entire diff because too many files (1,088) changed.
View
85 nexus-test-harness/nexus-simple-memory-realm/pom.xml
@@ -0,0 +1,85 @@
+<project 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/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.sonatype.nexus</groupId>
+ <artifactId>nexus-test-harness</artifactId>
+ <version>1.4.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>nexus-simple-memory-realm</artifactId>
+ <name>Nexus Test Harness Simple Memory Realm</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+
+ <dependency>
+ <artifactId>plexus-delegating-realm</artifactId>
+ <groupId>org.sonatype.jsecurity</groupId>
+ <version>${plexus-jsecurity-realms.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jsecurity</groupId>
+ <artifactId>jsecurity</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <!-- For realm tests -->
+ <dependency>
+ <groupId>org.sonatype.nexus</groupId>
+ <artifactId>nexus-app</artifactId>
+ <type>test-jar</type>
+ <scope>test</scope>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.sonatype.nexus</groupId>
+ <artifactId>nexus-app</artifactId>
+ <scope>test</scope>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.sonatype.nexus</groupId>
+ <artifactId>nexus-rest-api</artifactId>
+ <scope>test</scope>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.sonatype.nexus</groupId>
+ <artifactId>nexus-proxy</artifactId>
+ <scope>test</scope>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
View
109 ...nexus-simple-memory-realm/src/main/java/org/sonatype/jsecurity/realms/MemoryAuthenticationOnlyRealm.java
@@ -0,0 +1,109 @@
+/**
+ * Sonatype Nexus (TM) Open Source Version.
+ * Copyright (c) 2008 Sonatype, Inc. All rights reserved.
+ * Includes the third-party code listed at http://nexus.sonatype.org/dev/attributions.html
+ * This program is licensed to you under Version 3 only of the GNU General Public License as published by the Free Software Foundation.
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License Version 3 for more details.
+ * You should have received a copy of the GNU General Public License Version 3 along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc.
+ * "Sonatype" and "Sonatype Nexus" are trademarks of Sonatype, Inc.
+ */
+package org.sonatype.jsecurity.realms;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.codehaus.plexus.component.annotations.Component;
+import org.jsecurity.authc.AuthenticationException;
+import org.jsecurity.authc.AuthenticationInfo;
+import org.jsecurity.authc.AuthenticationToken;
+import org.jsecurity.authc.SimpleAuthenticationInfo;
+import org.jsecurity.authc.UsernamePasswordToken;
+import org.jsecurity.authc.credential.SimpleCredentialsMatcher;
+import org.jsecurity.authz.AuthorizationInfo;
+import org.jsecurity.realm.AuthorizingRealm;
+import org.jsecurity.subject.PrincipalCollection;
+
+/**
+ * This is a sample of how you can inject your own authentication system
+ * but still leave the authorization to nexus.
+ *
+ * This MemoryAuthenticationOnlyRealm will handle authentication on its own
+ *
+ * This class can also be loaded by nexus as either a regular class, or as a
+ * plexus component. In the nexus.xml file, you can remove the default
+ * XmlAuthenticatingRealm and add this realm as either
+ * org.sonatype.jsecurity.realms.MemoryAuthenticationOnlyRealm, or
+ * use the role-hint of MemoryAuthenticationOnlyRealm.
+ *
+ */
+@Component(role=org.jsecurity.realm.Realm.class, hint="MemoryAuthenticationOnlyRealm")
+public class MemoryAuthenticationOnlyRealm
+ extends AuthorizingRealm
+{
+ // Map containing username/password pairs
+ private Map<String,String> authenticationMap = new HashMap<String,String>();
+
+ /**
+ * This is where we are building the security model, not that the passwords have
+ * been changed from the default nexus security, to make for easy validation
+ */
+ public MemoryAuthenticationOnlyRealm()
+ {
+ // As this is a simple test realm, only using simple credentials
+ // just a string compare, no hashing involved
+ setCredentialsMatcher( new SimpleCredentialsMatcher() );
+
+ authenticationMap.put( "admin", "admin321" );
+ authenticationMap.put( "deployment", "deployment321" );
+ authenticationMap.put( "anonymous", "anonymous" );
+ }
+
+ public String getName()
+ {
+ return MemoryAuthenticationOnlyRealm.class.getName();
+ }
+
+ /**
+ * This method is where the authentication is controlled. You will receive a
+ * token, from which you can retrieve the username. Then you can lookup in your
+ * storage, the credentials for that user, place those in an AuthenticationInfo
+ * object and return it, the credential matcher will handle comparing them.
+ *
+ * @see org.jsecurity.realm.AuthenticatingRealm#doGetAuthenticationInfo(org.jsecurity.authc.AuthenticationToken)
+ */
+ @Override
+ protected AuthenticationInfo doGetAuthenticationInfo( AuthenticationToken arg0 )
+ throws AuthenticationException
+ {
+ if ( !UsernamePasswordToken.class.isAssignableFrom( arg0.getClass() ) )
+ {
+ return null;
+ }
+
+ String username = ( ( UsernamePasswordToken ) arg0 ).getUsername();
+
+ String password = authenticationMap.get( username );
+
+ if ( password == null )
+ {
+ throw new AuthenticationException( "Invalid username '" + username + "'");
+ }
+
+ return new SimpleAuthenticationInfo( username, password, getName() );
+ }
+
+ /**
+ * As this is an authentication only realm, we just return null for authorization
+ *
+ * @see org.jsecurity.realm.AuthorizingRealm#doGetAuthorizationInfo(org.jsecurity.subject.PrincipalCollection)
+ */
+ @Override
+ protected AuthorizationInfo doGetAuthorizationInfo( PrincipalCollection arg0 )
+ {
+ return null;
+ }
+}
View
218 nexus-test-harness/nexus-simple-memory-realm/src/main/java/org/sonatype/jsecurity/realms/MemoryRealm.java
@@ -0,0 +1,218 @@
+/**
+ * Sonatype Nexus (TM) Open Source Version.
+ * Copyright (c) 2008 Sonatype, Inc. All rights reserved.
+ * Includes the third-party code listed at http://nexus.sonatype.org/dev/attributions.html
+ * This program is licensed to you under Version 3 only of the GNU General Public License as published by the Free Software Foundation.
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License Version 3 for more details.
+ * You should have received a copy of the GNU General Public License Version 3 along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc.
+ * "Sonatype" and "Sonatype Nexus" are trademarks of Sonatype, Inc.
+ */
+package org.sonatype.jsecurity.realms;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.codehaus.plexus.component.annotations.Component;
+import org.jsecurity.authc.AuthenticationException;
+import org.jsecurity.authc.AuthenticationInfo;
+import org.jsecurity.authc.AuthenticationToken;
+import org.jsecurity.authc.SimpleAuthenticationInfo;
+import org.jsecurity.authc.UsernamePasswordToken;
+import org.jsecurity.authc.credential.SimpleCredentialsMatcher;
+import org.jsecurity.authz.AuthorizationInfo;
+import org.jsecurity.authz.Permission;
+import org.jsecurity.authz.SimpleAuthorizationInfo;
+import org.jsecurity.authz.permission.WildcardPermission;
+import org.jsecurity.cache.HashtableCache;
+import org.jsecurity.realm.AuthorizingRealm;
+import org.jsecurity.subject.PrincipalCollection;
+
+/**
+ * This is a pretty simple sample of how you can completely override the nexus
+ * security, using your own Realm.
+ *
+ * This MemoryRealm emulates the default nexus security model, and disables the
+ * privileges that shouldn't be available when nexus security isn't used
+ * (i.e. the user/role/privilege/password management APIs)
+ *
+ * This class can also be loaded by nexus as either a regular class, or as a
+ * plexus component. In the nexus.xml file, you can remove the default realms
+ * and add this realm as either org.sonatype.jsecurity.realms.MemoryRealm, or
+ * use the role-hint of MemoryRealm.
+ *
+ */
+@Component(role=org.jsecurity.realm.Realm.class, hint="MemoryRealm")
+public class MemoryRealm
+ extends AuthorizingRealm
+{
+ // Map containing username/password pairs
+ private Map<String,String> authenticationMap = new HashMap<String,String>();
+
+ // Map conatining username/privileges pairs
+ private Map<String,Set<String>> authorizationMap = new HashMap<String,Set<String>>();
+
+ // Map containing permissions to never allow
+ private Set<WildcardPermission> blockedPermissions = new HashSet<WildcardPermission>();
+
+ /**
+ * This is where we are building our security model, 3 users available:
+ * admin/deployment/anonymous
+ *
+ * Each of these users each has their own privileges, based upon the default settings
+ * in nexus security
+ */
+ public MemoryRealm()
+ {
+ // As this is a simple test realm, only using simple credentials
+ // just a string compare, no hashing involved
+ setCredentialsMatcher( new SimpleCredentialsMatcher() );
+
+ setAuthorizationCache( new HashtableCache( null ) );
+
+ authenticationMap.put( "admin", "admin123" );
+ authenticationMap.put( "deployment", "deployment123" );
+ authenticationMap.put( "anonymous", "anonymous" );
+
+ // Block all of the security related permissions, as they wont be used
+ // with an external security system
+ blockedPermissions.add( new WildcardPermission( "nexus:privileges:*" ) );
+ blockedPermissions.add( new WildcardPermission( "nexus:roles:*" ) );
+ blockedPermissions.add( new WildcardPermission( "nexus:users:*" ) );
+ blockedPermissions.add( new WildcardPermission( "nexus:usersforgotpw:*" ) );
+ blockedPermissions.add( new WildcardPermission( "nexus:usersforgotid:*" ) );
+ blockedPermissions.add( new WildcardPermission( "nexus:usersreset:*" ) );
+ blockedPermissions.add( new WildcardPermission( "nexus:userschangepw:*" ) );
+
+ // Admin gets the ALL privilege, thus allowing access
+ // to everything.
+ Set<String> perms = new HashSet<String>();
+ perms.add( "nexus:*:*" );
+ authorizationMap.put( "admin", perms );
+
+ // Anonymous gets the default anonymous privileges
+ perms = new HashSet<String>();
+ perms.add( "nexus:status:read" );
+ perms.add( "nexus:repositories:read" );
+ perms.add( "nexus:repogroups:read" );
+ perms.add( "nexus:index:read" );
+ perms.add( "nexus:identify:read" );
+ perms.add( "nexus:feeds:read" );
+ perms.add( "nexus:artifact:read" );
+ perms.add( "nexus:repostatus:read" );
+ perms.add( "nexus:repocontentclasses:read" );
+ // Target privileges, that allow read access to everything
+ // The numbers below (1 & 2) are Repository Target IDs in nexus
+ // The asterisk means that this privilege applies to any repository
+ perms.add( "nexus:target:1:*:read" );
+ perms.add( "nexus:target:2:*:read" );
+ authorizationMap.put( "anonymous", perms );
+
+ // Deployment gets the anon permissions, plus
+ // the ability to login
+ perms = new HashSet<String>();
+ perms.add( "nexus:authentication:read" );
+ perms.add( "nexus:status:read" );
+ perms.add( "nexus:repositories:read" );
+ perms.add( "nexus:repogroups:read" );
+ perms.add( "nexus:index:read" );
+ perms.add( "nexus:identify:read" );
+ perms.add( "nexus:feeds:read" );
+ perms.add( "nexus:artifact:read" );
+ perms.add( "nexus:repostatus:read" );
+ perms.add( "nexus:repocontentclasses:read" );
+ perms.add( "nexus:target:1:*:read" );
+ perms.add( "nexus:target:2:*:read" );
+ perms.add( "nexus:target:1:*:update" );
+ perms.add( "nexus:target:2:*:update" );
+ perms.add( "nexus:target:1:*:create" );
+ perms.add( "nexus:target:2:*:create" );
+ perms.add( "nexus:target:1:*:delete" );
+ perms.add( "nexus:target:2:*:delete" );
+ authorizationMap.put( "deployment", perms );
+ }
+
+ public String getName()
+ {
+ return MemoryRealm.class.getName();
+ }
+
+ /**
+ * This method is where the authentication is controlled. You will receive a
+ * token, from which you can retrieve the username. Then you can lookup in your
+ * storage, the credentials for that user, place those in an AuthenticationInfo
+ * object and return it, the credential matcher will handle comparing them.
+ *
+ * @see org.jsecurity.realm.AuthenticatingRealm#doGetAuthenticationInfo(org.jsecurity.authc.AuthenticationToken)
+ */
+ @Override
+ protected AuthenticationInfo doGetAuthenticationInfo( AuthenticationToken arg0 )
+ throws AuthenticationException
+ {
+ if ( !UsernamePasswordToken.class.isAssignableFrom( arg0.getClass() ) )
+ {
+ return null;
+ }
+
+ String username = ( ( UsernamePasswordToken ) arg0 ).getUsername();
+
+ String password = authenticationMap.get( username );
+
+ if ( password == null )
+ {
+ throw new AuthenticationException( "Invalid username '" + username + "'");
+ }
+
+ return new SimpleAuthenticationInfo( username, password, getName() );
+ }
+
+ /**
+ * This is where you build the list of permissions available to a user.
+ * Note that these permissions are cached in memory, and will not be reloaded
+ * until the clearAuthorizationCache() method is called.
+ *
+ * @see org.jsecurity.realm.AuthorizingRealm#doGetAuthorizationInfo(org.jsecurity.subject.PrincipalCollection)
+ */
+ @Override
+ protected AuthorizationInfo doGetAuthorizationInfo( PrincipalCollection arg0 )
+ {
+ String username = ( String ) arg0.iterator().next();
+
+ SimpleAuthorizationInfo ai = new SimpleAuthorizationInfo();
+
+ for ( String perm : authorizationMap.get( username ) )
+ {
+ ai.addObjectPermission( new WildcardPermission( perm ) );
+ }
+
+ return ai;
+ }
+
+ /**
+ * This method is overridden, explicitly to dis-allow access to certain permissions
+ * that aren't going to be used when using an external security system
+ *
+ * @see org.jsecurity.realm.AuthorizingRealm#isPermitted(org.jsecurity.subject.PrincipalCollection, org.jsecurity.authz.Permission)
+ */
+ @Override
+ public boolean isPermitted( PrincipalCollection principals, Permission permission )
+ {
+ if ( WildcardPermission.class.isAssignableFrom( permission.getClass() ) )
+ {
+ for ( WildcardPermission perm : blockedPermissions )
+ {
+ if ( perm.implies( permission ) )
+ {
+ return false;
+ }
+ }
+ }
+
+ return super.isPermitted( principals, permission );
+ }
+}
View
74 ...st-harness/nexus-simple-memory-realm/src/main/java/org/sonatype/jsecurity/realms/simple/SimpleRealm.java
@@ -0,0 +1,74 @@
+/**
+ * Sonatype Nexus (TM) Open Source Version.
+ * Copyright (c) 2008 Sonatype, Inc. All rights reserved.
+ * Includes the third-party code listed at http://nexus.sonatype.org/dev/attributions.html
+ * This program is licensed to you under Version 3 only of the GNU General Public License as published by the Free Software Foundation.
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License Version 3 for more details.
+ * You should have received a copy of the GNU General Public License Version 3 along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc.
+ * "Sonatype" and "Sonatype Nexus" are trademarks of Sonatype, Inc.
+ */
+package org.sonatype.jsecurity.realms.simple;
+
+import org.codehaus.plexus.component.annotations.Component;
+import org.jsecurity.authc.AuthenticationException;
+import org.jsecurity.authc.AuthenticationInfo;
+import org.jsecurity.authc.AuthenticationToken;
+import org.jsecurity.authc.SimpleAuthenticationInfo;
+import org.jsecurity.authc.UsernamePasswordToken;
+import org.jsecurity.authz.AuthorizationInfo;
+import org.jsecurity.realm.AuthorizingRealm;
+import org.jsecurity.realm.Realm;
+import org.jsecurity.subject.PrincipalCollection;
+
+/**
+ * All this class really needs to do is return an AuthorizationInfo. You could go go all out and implement Realm, but
+ * that is more then I want to cover in this example.
+ */
+@Component( role = Realm.class, hint = "Simple", description = "Simple In Memory Realm" )
+// The role must be Realm.class, and the hint is up to you.
+public class SimpleRealm
+ extends AuthorizingRealm
+{
+ /**
+ * This is a very simple in memory user Store.
+ */
+ private UserStore userStore = new UserStore();
+
+ @Override
+ protected AuthorizationInfo doGetAuthorizationInfo( PrincipalCollection principals )
+ {
+ // Unless your realm is very specific the XmlAuthorizingRealm will take
+ // care of this. (provided you implement the PlexusUserLocator interface).
+ return null;
+ }
+
+ @Override
+ protected AuthenticationInfo doGetAuthenticationInfo( AuthenticationToken token )
+ throws AuthenticationException
+ {
+ // all we need to do here is look up the user by id, in the user store, and return a AuthenticationInfo with the
+ // real users id and pass.
+
+ // type check the token
+ if ( !UsernamePasswordToken.class.isAssignableFrom( token.getClass() ) )
+ {
+ return null;
+ }
+ String userId = ( (UsernamePasswordToken) token ).getUsername();
+
+ // look the user in the example user store
+ SimpleUser user = this.userStore.getUser( userId );
+
+ if ( user == null )
+ {
+ throw new AuthenticationException( "Invalid username '" + userId + "'" );
+ }
+
+ return new SimpleAuthenticationInfo( user.getUserId(), user.getPassword(), getName() );
+ }
+
+}
View
60 ...ness/nexus-simple-memory-realm/src/main/java/org/sonatype/jsecurity/realms/simple/SimpleRoleLocator.java
@@ -0,0 +1,60 @@
+package org.sonatype.jsecurity.realms.simple;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.codehaus.plexus.component.annotations.Component;
+import org.sonatype.jsecurity.locators.users.PlexusRole;
+import org.sonatype.jsecurity.locators.users.PlexusRoleLocator;
+
+/**
+ * A PlexusRoleLocator is used if an external Realm wants to use its Group/Roles in Nexus. For example, your realm might
+ * already contain a group for all of your developers. Exposing these roles will allow Nexus to map your Realms roles to
+ * Nexus roles more easily.
+ */
+//This class must have a role of 'PlexusRoleLocator', and the hint, must match the result of getSource() and the hint
+//of the corresponding Realm.
+@Component( role = PlexusRoleLocator.class, hint = "Simple", description = "Simple Role Locator" )
+public class SimpleRoleLocator
+ implements PlexusRoleLocator
+{
+
+ public static final String SOURCE = "Simple";
+
+ public String getSource()
+ {
+ return SOURCE;
+ }
+
+ public Set<String> listRoleIds()
+ {
+ Set<String> roleIds = new HashSet<String>();
+ roleIds.add( "role-xyz" );
+ roleIds.add( "role-abc" );
+ roleIds.add( "role-123" );
+
+ return roleIds;
+ }
+
+ public Set<PlexusRole> listRoles()
+ {
+ Set<PlexusRole> roles = new HashSet<PlexusRole>();
+ for ( String roleId : this.listRoleIds() )
+ {
+ roles.add( this.toPlexusRole( roleId ) );
+ }
+
+ return roles;
+ }
+
+ private PlexusRole toPlexusRole( String roleId )
+ {
+ PlexusRole role = new PlexusRole();
+ role.setRoleId( roleId );
+ role.setSource( this.getSource() );
+ role.setName( "Role " + roleId );
+
+ return role;
+ }
+
+}
View
81 ...est-harness/nexus-simple-memory-realm/src/main/java/org/sonatype/jsecurity/realms/simple/SimpleUser.java
@@ -0,0 +1,81 @@
+/**
+ * Sonatype Nexus (TM) Open Source Version.
+ * Copyright (c) 2008 Sonatype, Inc. All rights reserved.
+ * Includes the third-party code listed at http://nexus.sonatype.org/dev/attributions.html
+ * This program is licensed to you under Version 3 only of the GNU General Public License as published by the Free Software Foundation.
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License Version 3 for more details.
+ * You should have received a copy of the GNU General Public License Version 3 along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc.
+ * "Sonatype" and "Sonatype Nexus" are trademarks of Sonatype, Inc.
+ */
+package org.sonatype.jsecurity.realms.simple;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class SimpleUser
+{
+
+ private String name;
+
+ private String userId;
+
+ private String email;
+
+ private String password;
+
+ private Set<String> roles = new HashSet<String>();
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+ public String getUserId()
+ {
+ return userId;
+ }
+
+ public void setUserId( String userId )
+ {
+ this.userId = userId;
+ }
+
+ public String getEmail()
+ {
+ return email;
+ }
+
+ public void setEmail( String email )
+ {
+ this.email = email;
+ }
+
+ public String getPassword()
+ {
+ return password;
+ }
+
+ public void setPassword( String password )
+ {
+ this.password = password;
+ }
+
+ public Set<String> getRoles()
+ {
+ return roles;
+ }
+
+ public void addRole( String role )
+ {
+ this.roles.add( role );
+ }
+}
View
159 ...ness/nexus-simple-memory-realm/src/main/java/org/sonatype/jsecurity/realms/simple/SimpleUserLocator.java
@@ -0,0 +1,159 @@
+/**
+ * Sonatype Nexus (TM) Open Source Version.
+ * Copyright (c) 2008 Sonatype, Inc. All rights reserved.
+ * Includes the third-party code listed at http://nexus.sonatype.org/dev/attributions.html
+ * This program is licensed to you under Version 3 only of the GNU General Public License as published by the Free Software Foundation.
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License Version 3 for more details.
+ * You should have received a copy of the GNU General Public License Version 3 along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc.
+ * "Sonatype" and "Sonatype Nexus" are trademarks of Sonatype, Inc.
+ */
+package org.sonatype.jsecurity.realms.simple;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.codehaus.plexus.component.annotations.Component;
+import org.codehaus.plexus.util.CollectionUtils;
+import org.codehaus.plexus.util.StringUtils;
+import org.sonatype.jsecurity.locators.users.PlexusUser;
+import org.sonatype.jsecurity.locators.users.PlexusUserLocator;
+import org.sonatype.jsecurity.locators.users.PlexusUserSearchCriteria;
+
+/**
+ * This is a simple implementation that will expose a custom user store as PlexusUsers. A plexusUserLocator exposes
+ * users so they can be used for functions other then authentication and authorizing. Users email address, and
+ * optionally Roles/Groups from an external source will be looked up this way. For example, user 'jcoder' from a JDBC
+ * source might be associated with the group 'projectA-developer', when the user 'jcoder' is returned from this class
+ * the association is contained in a PlexusUser object.
+ */
+// This class must have a role of 'PlexusUserLocator', and the hint, must match the result of getSource() and the hint
+// of the corresponding Realm.
+@Component( role = PlexusUserLocator.class, hint = "Simple", description = "Simple User Locator" )
+public class SimpleUserLocator
+ implements PlexusUserLocator
+{
+
+ public static final String SOURCE = "Simple";
+
+ /**
+ * This is a very simple in memory user Store.
+ */
+ private UserStore userStore = new UserStore();
+
+ /*
+ * (non-Javadoc)
+ * @see org.sonatype.jsecurity.locators.users.PlexusUserLocator#getSource()
+ */
+ public String getSource()
+ {
+ return SOURCE;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.sonatype.jsecurity.locators.users.PlexusUserLocator#getUser(java.lang.String)
+ */
+ public PlexusUser getUser( String userId )
+ {
+ SimpleUser user = this.userStore.getUser( userId );
+ if ( user != null )
+ {
+ return this.toPlexusUser( user );
+ }
+ // else
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.sonatype.jsecurity.locators.users.PlexusUserLocator#isPrimary()
+ */
+ public boolean isPrimary()
+ {
+ // Set this to true if this UserLocator should priority over other PlexusUserLocators
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.sonatype.jsecurity.locators.users.PlexusUserLocator#listUserIds()
+ */
+ public Set<String> listUserIds()
+ {
+ // just return the userIds, if you can optimize for speed, do so
+ Set<String> userIds = new HashSet<String>();
+ for ( SimpleUser user : this.userStore.getAllUsers() )
+ {
+ userIds.add( user.getUserId() );
+ }
+
+ return userIds;
+ }
+
+ public Set<PlexusUser> listUsers()
+ {
+ // return all the users in the system
+ Set<PlexusUser> users = new HashSet<PlexusUser>();
+ for ( SimpleUser user : this.userStore.getAllUsers() )
+ {
+ users.add( this.toPlexusUser( user ) );
+ }
+
+ return users;
+ }
+
+ public Set<PlexusUser> searchUsers( PlexusUserSearchCriteria criteria )
+ {
+
+ Set<PlexusUser> users = new HashSet<PlexusUser>();
+ for ( SimpleUser user : this.userStore.getAllUsers() )
+ {
+ if ( this.userMatchesCriteria( user, criteria ) )
+ {
+ users.add( this.toPlexusUser( user ) );
+ }
+ }
+ return users;
+ }
+
+ public boolean userMatchesCriteria( SimpleUser simpleUser, PlexusUserSearchCriteria criteria )
+ {
+ // You would most likely replace this code with some query and let you back end do the work.
+
+ // this is expected to be a starts with search, so 'jcod' would find 'jcoder'
+ if ( StringUtils.isNotEmpty( criteria.getUserId() )
+ && !simpleUser.getUserId().toLowerCase().startsWith( criteria.getUserId() ) )
+ {
+ return false;
+ }
+
+ if ( criteria.getOneOfRoleIds() != null && !criteria.getOneOfRoleIds().isEmpty() )
+ {
+ // we are checking if any of the roles in the criteria are also in the users roles.
+ if ( CollectionUtils.intersection( simpleUser.getRoles(), criteria.getOneOfRoleIds() ).isEmpty() )
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ private PlexusUser toPlexusUser( SimpleUser simpleUser )
+ {
+ // simple conversion of object
+ PlexusUser user = new PlexusUser();
+ user.setEmailAddress( simpleUser.getEmail() );
+ user.setName( simpleUser.getName() );
+ user.setUserId( simpleUser.getUserId() );
+ // set the source of this user to this
+ user.setSource( this.getSource() );
+
+ return user;
+ }
+
+}
View
71 ...test-harness/nexus-simple-memory-realm/src/main/java/org/sonatype/jsecurity/realms/simple/UserStore.java
@@ -0,0 +1,71 @@
+/**
+ * Sonatype Nexus (TM) Open Source Version.
+ * Copyright (c) 2008 Sonatype, Inc. All rights reserved.
+ * Includes the third-party code listed at http://nexus.sonatype.org/dev/attributions.html
+ * This program is licensed to you under Version 3 only of the GNU General Public License as published by the Free Software Foundation.
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License Version 3 for more details.
+ * You should have received a copy of the GNU General Public License Version 3 along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc.
+ * "Sonatype" and "Sonatype Nexus" are trademarks of Sonatype, Inc.
+ */
+package org.sonatype.jsecurity.realms.simple;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * This is a very simple in memory
+ */
+public class UserStore
+{
+
+ private Map<String, SimpleUser> userMap = new HashMap<String, SimpleUser>();
+
+ public UserStore()
+ {
+ // NOTE: Using the same userId from another Nexus realm could result in issues (unless your configuration is
+ // 100% correct)
+ // If you have 2 'jcoder' users, (if the 'jcoder' defined in the primary realm does not have any privileges the
+ // user will not be able to login to Nexus.
+ // to work around this, just assign the user the correct privileges.
+
+ SimpleUser admin = new SimpleUser();
+ admin.setEmail( "admin-simple@sample.com" );
+ admin.setName( "Simple Administrator" );
+ admin.setUserId( "admin-simple" );
+ admin.setPassword( "admin123" );
+
+ SimpleUser deployment = new SimpleUser();
+ deployment.setEmail( "deployment-simple@sample.com" );
+ deployment.setName( "Simple Developer" );
+ deployment.setUserId( "deployment-simple" );
+ deployment.setPassword( "deployment123" );
+
+ SimpleUser anonymous = new SimpleUser();
+ anonymous.setEmail( "anonymous-simple@sample.com" );
+ anonymous.setName( "Simple Anonymous" );
+ anonymous.setUserId( "anonymous-simple" );
+ anonymous.setPassword( "anonymous" );
+
+ // put the users in a map
+ this.userMap.put( admin.getUserId(), admin );
+ this.userMap.put( deployment.getUserId(), deployment );
+ this.userMap.put( anonymous.getUserId(), anonymous );
+
+ }
+
+ public Collection<SimpleUser> getAllUsers()
+ {
+ return this.userMap.values();
+ }
+
+ public SimpleUser getUser( String userId )
+ {
+ return this.userMap.get( userId );
+ }
+
+}
View
64 ...s-simple-memory-realm/src/test/java/org/sonatype/jsecurity/realms/MemoryAuthenticationOnlyRealmTest.java
@@ -0,0 +1,64 @@
+/**
+ * Sonatype Nexus (TM) Open Source Version.
+ * Copyright (c) 2008 Sonatype, Inc. All rights reserved.
+ * Includes the third-party code listed at http://nexus.sonatype.org/dev/attributions.html
+ * This program is licensed to you under Version 3 only of the GNU General Public License as published by the Free Software Foundation.
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License Version 3 for more details.
+ * You should have received a copy of the GNU General Public License Version 3 along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc.
+ * "Sonatype" and "Sonatype Nexus" are trademarks of Sonatype, Inc.
+ */
+package org.sonatype.jsecurity.realms;
+
+import org.codehaus.plexus.PlexusTestCase;
+import org.jsecurity.authc.AuthenticationException;
+import org.jsecurity.authc.AuthenticationInfo;
+import org.jsecurity.authc.UsernamePasswordToken;
+import org.jsecurity.realm.Realm;
+
+public class MemoryAuthenticationOnlyRealmTest
+ extends PlexusTestCase
+{
+ private MemoryAuthenticationOnlyRealm realm;
+
+ @Override
+ protected void setUp()
+ throws Exception
+ {
+ super.setUp();
+
+ realm = ( MemoryAuthenticationOnlyRealm ) lookup( Realm.class, "MemoryAuthenticationOnlyRealm" );
+ }
+
+ public void testSuccessfulAuthentication()
+ throws Exception
+ {
+ UsernamePasswordToken upToken = new UsernamePasswordToken( "admin", "admin321" );
+
+ AuthenticationInfo ai = realm.getAuthenticationInfo( upToken );
+
+ String password = ( String ) ai.getCredentials();
+
+ assertEquals( "admin321", password );
+ }
+
+ public void testFailedAuthentication()
+ throws Exception
+ {
+ UsernamePasswordToken upToken = new UsernamePasswordToken( "admin", "admin123" );
+
+ try
+ {
+ realm.getAuthenticationInfo( upToken );
+
+ fail( "Authentication should have failed" );
+ }
+ catch( AuthenticationException e )
+ {
+ // good
+ }
+ }
+}
View
132 ...-test-harness/nexus-simple-memory-realm/src/test/java/org/sonatype/jsecurity/realms/MemoryRealmTest.java
@@ -0,0 +1,132 @@
+/**
+ * Sonatype Nexus (TM) Open Source Version.
+ * Copyright (c) 2008 Sonatype, Inc. All rights reserved.
+ * Includes the third-party code listed at http://nexus.sonatype.org/dev/attributions.html
+ * This program is licensed to you under Version 3 only of the GNU General Public License as published by the Free Software Foundation.
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License Version 3 for more details.
+ * You should have received a copy of the GNU General Public License Version 3 along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc.
+ * "Sonatype" and "Sonatype Nexus" are trademarks of Sonatype, Inc.
+ */
+package org.sonatype.jsecurity.realms;
+
+import org.codehaus.plexus.PlexusTestCase;
+import org.jsecurity.authc.AuthenticationException;
+import org.jsecurity.authc.AuthenticationInfo;
+import org.jsecurity.authc.UsernamePasswordToken;
+import org.jsecurity.authz.permission.WildcardPermission;
+import org.jsecurity.realm.Realm;
+
+public class MemoryRealmTest
+ extends PlexusTestCase
+{
+ private MemoryRealm realm;
+
+ @Override
+ protected void setUp()
+ throws Exception
+ {
+ super.setUp();
+
+ realm = ( MemoryRealm ) lookup( Realm.class, "MemoryRealm" );
+ }
+
+ public void testSuccessfulAuthentication()
+ throws Exception
+ {
+ UsernamePasswordToken upToken = new UsernamePasswordToken( "admin", "admin123" );
+
+ AuthenticationInfo ai = realm.getAuthenticationInfo( upToken );
+
+ String password = ( String ) ai.getCredentials();
+
+ assertEquals( "admin123", password );
+ }
+
+ public void testFailedAuthentication()
+ throws Exception
+ {
+ UsernamePasswordToken upToken = new UsernamePasswordToken( "admin", "badpassword" );
+
+ try
+ {
+ realm.getAuthenticationInfo( upToken );
+
+ fail( "Authentication should have failed" );
+ }
+ catch( AuthenticationException e )
+ {
+ // good
+ }
+ }
+
+ public void testAdminAuthorization()
+ throws Exception
+ {
+ UsernamePasswordToken upToken = new UsernamePasswordToken( "admin", "admin123" );
+
+ AuthenticationInfo ai = realm.getAuthenticationInfo( upToken );
+
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:status:read" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:authentication:read" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:settings:read" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:settings:update" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:repositories:create" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:repositories:read" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:repositories:update" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:repositories:delete" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:target:1:somerepo:read" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:target:1:somerepo:create" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:target:1:somerepo:delete" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:target:1:somerepo:update" ) ) );
+
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "junk" ) ) );
+ }
+
+ public void testAnonymousAuthorization()
+ throws Exception
+ {
+ UsernamePasswordToken upToken = new UsernamePasswordToken( "anonymous", "anonymous" );
+
+ AuthenticationInfo ai = realm.getAuthenticationInfo( upToken );
+
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:status:read" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:authentication:read" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:settings:read" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:settings:update" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:repositories:create" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:repositories:read" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:repositories:update" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:repositories:delete" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "junk" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:target:1:somerepo:read" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:target:1:somerepo:create" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:target:1:somerepo:delete" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:target:1:somerepo:update" ) ) );
+ }
+
+ public void testDeploymentAuthorization()
+ throws Exception
+ {
+ UsernamePasswordToken upToken = new UsernamePasswordToken( "deployment", "deployment123" );
+
+ AuthenticationInfo ai = realm.getAuthenticationInfo( upToken );
+
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:status:read" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:authentication:read" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:settings:read" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:settings:update" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:repositories:create" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:repositories:read" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:repositories:update" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:repositories:delete" ) ) );
+ assertFalse( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "junk" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:target:1:somerepo:read" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:target:1:somerepo:create" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:target:1:somerepo:delete" ) ) );
+ assertTrue( realm.isPermitted( ai.getPrincipals(), new WildcardPermission( "nexus:target:1:somerepo:update" ) ) );
+ }
+}
View
194 ...arness/nexus-simple-memory-realm/src/test/java/org/sonatype/jsecurity/realms/simple/SimpleRealmTest.java
@@ -0,0 +1,194 @@
+/**
+ * Sonatype Nexus (TM) Open Source Version.
+ * Copyright (c) 2008 Sonatype, Inc. All rights reserved.
+ * Includes the third-party code listed at http://nexus.sonatype.org/dev/attributions.html
+ * This program is licensed to you under Version 3 only of the GNU General Public License as published by the Free Software Foundation.
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License Version 3 for more details.
+ * You should have received a copy of the GNU General Public License Version 3 along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc.
+ * "Sonatype" and "Sonatype Nexus" are trademarks of Sonatype, Inc.
+ */
+package org.sonatype.jsecurity.realms.simple;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import junit.framework.Assert;
+
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.IOUtil;
+import org.jsecurity.authc.AuthenticationException;
+import org.jsecurity.authc.AuthenticationInfo;
+import org.jsecurity.authc.AuthenticationToken;
+import org.jsecurity.authc.UsernamePasswordToken;
+import org.jsecurity.subject.PrincipalCollection;
+import org.jsecurity.subject.SimplePrincipalCollection;
+import org.sonatype.jsecurity.realms.PlexusSecurity;
+import org.sonatype.nexus.AbstractNexusTestCase;
+import org.sonatype.nexus.configuration.application.NexusConfiguration;
+
+public class SimpleRealmTest
+ extends AbstractNexusTestCase
+{
+
+ // Realm Tests
+ /**
+ * Test authentication with a valid user and password.
+ *
+ * @throws Exception
+ */
+ public void testValidAuthentication()
+ throws Exception
+ {
+ PlexusSecurity plexusSecurity = this.lookup( PlexusSecurity.class, "web" );
+ AuthenticationToken token = new UsernamePasswordToken( "admin-simple", "admin123" );
+ AuthenticationInfo authInfo = plexusSecurity.authenticate( token );
+
+ // check
+ Assert.assertNotNull( authInfo );
+ }
+
+ /**
+ * Test authentication with a valid user and invalid password.
+ *
+ * @throws Exception
+ */
+ public void testInvalidPasswordAuthentication()
+ throws Exception
+ {
+ PlexusSecurity plexusSecurity = this.lookup( PlexusSecurity.class, "web" );
+ AuthenticationToken token = new UsernamePasswordToken( "admin-simple", "INVALID" );
+
+ try
+ {
+ AuthenticationInfo authInfo = plexusSecurity.authenticate( token );
+ }
+ catch ( AuthenticationException e )
+ {
+ // expected
+ }
+ }
+
+ /**
+ * Test authentication with a invalid user and password.
+ *
+ * @throws Exception
+ */
+ public void testInvalidUserAuthentication()
+ throws Exception
+ {
+ PlexusSecurity plexusSecurity = this.lookup( PlexusSecurity.class, "web" );
+ AuthenticationToken token = new UsernamePasswordToken( "INVALID", "INVALID" );
+
+ try
+ {
+ AuthenticationInfo authInfo = plexusSecurity.authenticate( token );
+ }
+ catch ( AuthenticationException e )
+ {
+ // expected
+ }
+ }
+
+ //
+ /**
+ * Test authorization using the NexusMethodAuthorizingRealm. <BR/> Take a look a the security.xml in
+ * src/test/resources this maps the users in the UserStore to nexus roles/privileges
+ *
+ * @throws Exception
+ */
+ public void testPrivileges()
+ throws Exception
+ {
+ PlexusSecurity plexusSecurity = this.lookup( PlexusSecurity.class, "web" );
+
+ PrincipalCollection principal = new SimplePrincipalCollection( "admin-simple", PlexusSecurity.class
+ .getSimpleName() );
+
+ // test one of the privleges that the admin user has
+ Assert.assertTrue( plexusSecurity.isPermitted( principal, "nexus:repositories:create" ) );// Repositories -
+ // (create,read)
+
+ }
+
+ /**
+ * Tests a valid privilege for an invalid user
+ * @throws Exception
+ */
+ public void testPrivilegesInvalidUser()
+ throws Exception
+ {
+ PlexusSecurity plexusSecurity = this.lookup( PlexusSecurity.class, "web" );
+
+ PrincipalCollection principal = new SimplePrincipalCollection( "INVALID", PlexusSecurity.class
+ .getSimpleName() );
+
+ // test one of the privleges
+ Assert.assertFalse( plexusSecurity.isPermitted( principal, "nexus:repositories:create" ) );// Repositories -
+ // (create,read)
+
+ }
+
+ @Override
+ protected void setUp()
+ throws Exception
+ {
+ // call super
+ FileUtils.deleteDirectory( PLEXUS_HOME );
+
+ PLEXUS_HOME.mkdirs();
+ WORK_HOME.mkdirs();
+ CONF_HOME.mkdirs();
+
+ // copy the tests nexus.xml and security.xml to the correct location
+ this.copyTestConfigToPlace();
+
+ if ( loadConfigurationAtSetUp() )
+ {
+ nexusConfiguration = this.lookup( NexusConfiguration.class );
+
+ nexusConfiguration.loadConfiguration();
+
+ // TODO: SEE WHY IS SEC NOT STARTING? (Max, JSec changes)
+ nexusConfiguration.setSecurityEnabled( false );
+
+ nexusConfiguration.applyConfiguration();
+ }
+ }
+
+ private void copyTestConfigToPlace()
+ throws FileNotFoundException,
+ IOException
+ {
+ InputStream nexusConf = null;
+ InputStream securityConf = null;
+
+ OutputStream nexusOut = null;
+ OutputStream securityOut = null;
+
+ try
+ {
+ nexusConf = Thread.currentThread().getContextClassLoader().getResourceAsStream( "nexus.xml" );
+ nexusOut = new FileOutputStream( getNexusConfiguration() );
+ IOUtil.copy( nexusConf, nexusOut );
+
+ securityConf = Thread.currentThread().getContextClassLoader().getResourceAsStream( "security.xml" );
+ securityOut = new FileOutputStream( getNexusSecurityConfiguration() );
+ IOUtil.copy( securityConf, securityOut);
+ }
+ finally
+ {
+ IOUtil.close( nexusConf );
+ IOUtil.close( securityConf );
+ IOUtil.close( nexusOut );
+ IOUtil.close( securityOut );
+
+ }
+ }
+}
View
24 .../nexus-simple-memory-realm/src/test/java/org/sonatype/jsecurity/realms/simple/SimpleRoleLocatorTest.java
@@ -0,0 +1,24 @@
+package org.sonatype.jsecurity.realms.simple;
+
+import java.util.Set;
+
+import junit.framework.Assert;
+
+import org.codehaus.plexus.PlexusTestCase;
+import org.sonatype.jsecurity.locators.users.PlexusRoleLocator;
+
+public class SimpleRoleLocatorTest
+ extends PlexusTestCase
+{
+
+ public void testListRoleIds() throws Exception
+ {
+ PlexusRoleLocator roleLocator = this.lookup( PlexusRoleLocator.class, "Simple" );
+
+ Set<String> roleIds = roleLocator.listRoleIds();
+ Assert.assertTrue( roleIds.contains( "role-xyz" ) );
+ Assert.assertTrue( roleIds.contains( "role-abc" ) );
+ Assert.assertTrue( roleIds.contains( "role-123" ) );
+ }
+
+}
View
71 .../nexus-simple-memory-realm/src/test/java/org/sonatype/jsecurity/realms/simple/SimpleUserLocatorTest.java
@@ -0,0 +1,71 @@
+/**
+ * Sonatype Nexus (TM) Open Source Version.
+ * Copyright (c) 2008 Sonatype, Inc. All rights reserved.
+ * Includes the third-party code listed at http://nexus.sonatype.org/dev/attributions.html
+ * This program is licensed to you under Version 3 only of the GNU General Public License as published by the Free Software Foundation.
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License Version 3 for more details.
+ * You should have received a copy of the GNU General Public License Version 3 along with this program.
+ * If not, see http://www.gnu.org/licenses/.
+ * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc.
+ * "Sonatype" and "Sonatype Nexus" are trademarks of Sonatype, Inc.
+ */
+package org.sonatype.jsecurity.realms.simple;
+
+import java.util.Set;
+
+import junit.framework.Assert;
+
+import org.codehaus.plexus.PlexusTestCase;
+import org.sonatype.jsecurity.locators.users.PlexusUser;
+import org.sonatype.jsecurity.locators.users.PlexusUserLocator;
+import org.sonatype.jsecurity.locators.users.PlexusUserSearchCriteria;
+
+public class SimpleUserLocatorTest
+ extends PlexusTestCase
+{
+
+ public void testLocatorLookup()
+ throws Exception
+ {
+ // a bit of plexus back ground, this is how you can look up a component from a test class
+ this.lookup( PlexusUserLocator.class, "Simple" );
+ }
+
+ public void testSearch()
+ throws Exception
+ {
+ PlexusUserLocator userLocator = this.lookup( PlexusUserLocator.class, "Simple" );
+
+ Set<PlexusUser> result = userLocator.searchUsers( new PlexusUserSearchCriteria( "adm" ) );
+ Assert.assertEquals( 1, result.size() );
+ // your test could be a bit more robust
+ Assert.assertEquals( result.iterator().next().getUserId(), "admin-simple" );
+ }
+
+ public void testIdList()
+ throws Exception
+ {
+ PlexusUserLocator userLocator = this.lookup( PlexusUserLocator.class, "Simple" );
+
+ Set<String> ids = userLocator.listUserIds();
+
+ Assert.assertTrue( ids.contains( "admin-simple" ) );
+ Assert.assertTrue( ids.contains( "deployment-simple" ) );
+ Assert.assertTrue( ids.contains( "anonymous-simple" ) );
+
+ Assert.assertEquals( 3, ids.size() );
+ }
+
+ public void testUserList()
+ throws Exception
+ {
+ PlexusUserLocator userLocator = this.lookup( PlexusUserLocator.class, "Simple" );
+
+ Set<PlexusUser> users = userLocator.listUsers();
+ // your test could be a bit more robust
+ Assert.assertEquals( 3, users.size() );
+ }
+
+}
View
9 nexus-test-harness/nexus-simple-memory-realm/src/test/resources/log4j.properties
@@ -0,0 +1,9 @@
+log4j.rootLogger=INFO, console
+
+log4j.logger.org.apache.commons=INFO
+log4j.logger.httpclient=INFO
+
+# CONSOLE
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d %p [%c] - %m%n
View
263 nexus-test-harness/nexus-simple-memory-realm/src/test/resources/nexus.xml
@@ -0,0 +1,263 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nexusConfiguration>
+ <version>1.0.8</version>
+
+ <smtpConfiguration>
+ <host>smtp-host</host>
+ <port>25</port>
+ <sslEnabled>false</sslEnabled>
+ <tlsEnabled>false</tlsEnabled>
+ <username>smtp-username</username>
+ <password>smtp-password</password>
+ <debugMode>false</debugMode>
+ <systemEmailAddress>system@nexus.org</systemEmailAddress>
+ </smtpConfiguration>
+
+ <security>
+ <enabled>true</enabled>
+ <anonymousAccessEnabled>true</anonymousAccessEnabled>
+ <anonymousUsername>anonymous</anonymousUsername>
+ <anonymousPassword>anonymous</anonymousPassword>
+ <realms>
+ <realm>Simple</realm> <!-- Changed from XmlAuthenticatingRealm -->
+ <realm>XmlAuthorizingRealm</realm>
+ </realms>
+ </security>
+
+ <globalConnectionSettings>
+ <connectionTimeout>10000</connectionTimeout>
+ <retrievalRetryCount>3</retrievalRetryCount>
+ <queryString></queryString>
+ </globalConnectionSettings>
+
+ <routing>
+ <followLinks>true</followLinks>
+ <notFoundCacheTTL>1440</notFoundCacheTTL>
+ <groups>
+ <stopItemSearchOnFirstFoundFile>true</stopItemSearchOnFirstFoundFile>
+ <mergeMetadata>true</mergeMetadata>
+ </groups>
+ </routing>
+
+ <restApi>
+ <accessAllowedFrom>*</accessAllowedFrom>
+ </restApi>
+
+ <httpProxy>
+ <enabled>true</enabled>
+ <port>8082</port>
+ <proxyPolicy>strict</proxyPolicy>
+ </httpProxy>
+
+ <repositories>
+
+ <!-- PUBLIC RELEASE REPOSITORIES -->
+
+ <repository>
+ <id>central</id>
+ <name>Maven Central</name>
+ <localStatus>inService</localStatus>
+ <proxyMode>allow</proxyMode>
+ <allowWrite>false</allowWrite>
+ <browseable>true</browseable>
+ <indexable>true</indexable>
+ <notFoundCacheTTL>1440</notFoundCacheTTL>
+ <artifactMaxAge>-1</artifactMaxAge>
+ <metadataMaxAge>1440</metadataMaxAge>
+ <maintainProxiedRepositoryMetadata>false</maintainProxiedRepositoryMetadata>
+ <repositoryPolicy>release</repositoryPolicy>
+ <remoteStorage>
+ <provider>apacheHttpClient3x</provider>
+ <url>http://repo1.maven.org/maven2/</url>
+ </remoteStorage>
+ </repository>
+
+ <!-- SNAPSHOT SNAPSHOT REPOSITORIES -->
+
+ <repository>
+ <id>apache-snapshots</id>
+ <name>Apache Snapshots</name>
+ <localStatus>inService</localStatus>
+ <proxyMode>allow</proxyMode>
+ <allowWrite>false</allowWrite>
+ <browseable>true</browseable>
+ <indexable>true</indexable>
+ <notFoundCacheTTL>1440</notFoundCacheTTL>
+ <artifactMaxAge>1440</artifactMaxAge>
+ <metadataMaxAge>1440</metadataMaxAge>
+ <maintainProxiedRepositoryMetadata>false</maintainProxiedRepositoryMetadata>
+ <repositoryPolicy>snapshot</repositoryPolicy>
+ <remoteStorage>
+ <provider>apacheHttpClient3x</provider>
+ <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+ </remoteStorage>
+ </repository>
+
+ <repository>
+ <id>codehaus-snapshots</id>
+ <name>Codehaus Snapshots</name>
+ <localStatus>inService</localStatus>
+ <proxyMode>allow</proxyMode>
+ <allowWrite>false</allowWrite>
+ <browseable>true</browseable>
+ <indexable>true</indexable>
+ <notFoundCacheTTL>1440</notFoundCacheTTL>
+ <artifactMaxAge>1440</artifactMaxAge>
+ <metadataMaxAge>1440</metadataMaxAge>
+ <maintainProxiedRepositoryMetadata>false</maintainProxiedRepositoryMetadata>
+ <repositoryPolicy>snapshot</repositoryPolicy>
+ <remoteStorage>
+ <provider>apacheHttpClient3x</provider>
+ <url>http://snapshots.repository.codehaus.org/</url>
+ </remoteStorage>
+ </repository>
+
+ <!-- PRIVATE REPOSITORIES -->
+
+ <repository>
+ <id>releases</id>
+ <name>Releases</name>
+ <localStatus>inService</localStatus>
+ <allowWrite>true</allowWrite>
+ <browseable>true</browseable>
+ <indexable>true</indexable>
+ <notFoundCacheTTL>1440</notFoundCacheTTL>
+ <artifactMaxAge>-1</artifactMaxAge>
+ <metadataMaxAge>1440</metadataMaxAge>
+ <maintainProxiedRepositoryMetadata>false</maintainProxiedRepositoryMetadata>
+ <repositoryPolicy>release</repositoryPolicy>
+ </repository>
+
+ <repository>
+ <id>snapshots</id>
+ <name>Snapshots</name>
+ <localStatus>inService</localStatus>
+ <allowWrite>true</allowWrite>
+ <browseable>true</browseable>
+ <indexable>true</indexable>
+ <notFoundCacheTTL>1440</notFoundCacheTTL>
+ <artifactMaxAge>1440</artifactMaxAge>
+ <metadataMaxAge>1440</metadataMaxAge>
+ <maintainProxiedRepositoryMetadata>false</maintainProxiedRepositoryMetadata>
+ <repositoryPolicy>snapshot</repositoryPolicy>
+ </repository>
+
+ <repository>
+ <id>thirdparty</id>
+ <name>3rd party</name>
+ <localStatus>inService</localStatus>
+ <allowWrite>true</allowWrite>
+ <browseable>true</browseable>
+ <indexable>true</indexable>
+ <notFoundCacheTTL>1440</notFoundCacheTTL>
+ <artifactMaxAge>-1</artifactMaxAge>
+ <metadataMaxAge>1440</metadataMaxAge>
+ <maintainProxiedRepositoryMetadata>false</maintainProxiedRepositoryMetadata>
+ <repositoryPolicy>release</repositoryPolicy>
+ </repository>
+
+ </repositories>
+
+ <repositoryShadows>
+
+ <repositoryShadow>
+ <id>central-m1</id>
+ <name>Central M1 shadow</name>
+ <localStatus>inService</localStatus>
+ <shadowOf>central</shadowOf>
+ <type>m2-m1-shadow</type>
+ <syncAtStartup>false</syncAtStartup>
+ </repositoryShadow>
+
+ </repositoryShadows>
+
+ <repositoryGrouping>
+
+ <pathMappings>
+ <pathMapping>
+ <id>inhouse-stuff</id>
+ <groupId>*</groupId>
+ <routePattern>.*/(com|org)/somecompany/.*</routePattern>
+ <routeType>inclusive</routeType>
+ <repositories>
+ <repository>snapshots</repository>
+ <repository>releases</repository>
+ </repositories>
+ </pathMapping>
+ <pathMapping>
+ <id>apache-stuff</id>
+ <groupId>*</groupId>
+ <routePattern>.*/org/some-oss/.*</routePattern>
+ <routeType>exclusive</routeType>
+ <repositories>
+ <repository>releases</repository>
+ <repository>snapshots</repository>
+ </repositories>
+ </pathMapping>
+ <!--
+ <pathMapping> <id>nasty-stuff</id> <groupId>*</groupId> <routePattern>.*/some/nasty/path/.*</routePattern>
+ <routeType>blocking</routeType> </pathMapping>
+ -->
+ </pathMappings>
+
+ <repositoryGroups>
+ <repositoryGroup>
+ <groupId>public</groupId>
+ <type>maven2</type>
+ <name>Public Repositories</name>
+ <repositories>
+ <repository>releases</repository>
+ <repository>snapshots</repository>
+ <repository>thirdparty</repository>
+ <repository>central</repository>
+ </repositories>
+ </repositoryGroup>
+ <repositoryGroup>
+ <groupId>public-snapshots</groupId>
+ <type>maven2</type>
+ <name>Public Snapshot Repositories</name>
+ <repositories>
+ <repository>apache-snapshots</repository>
+ <repository>codehaus-snapshots</repository>
+ </repositories>
+ </repositoryGroup>
+ </repositoryGroups>
+
+ </repositoryGrouping>
+
+ <repositoryTargets>
+ <repositoryTarget>
+ <id>1</id>
+ <name>All (Maven2)</name>
+ <contentClass>maven2</contentClass>
+ <patterns>
+ <pattern>.*</pattern>
+ </patterns>
+ </repositoryTarget>
+ <repositoryTarget>
+ <id>2</id>
+ <name>All (Maven1)</name>
+ <contentClass>maven1</contentClass>
+ <patterns>
+ <pattern>.*</pattern>
+ </patterns>
+ </repositoryTarget>
+ <repositoryTarget>
+ <id>3</id>
+ <name>All but sources (Maven2)</name>
+ <contentClass>maven2</contentClass>
+ <patterns>
+ <pattern>(?!.*-sources.*).*</pattern>
+ </patterns>
+ </repositoryTarget>
+ <repositoryTarget>
+ <id>4</id>
+ <name>All Metadata (Maven2)</name>
+ <contentClass>maven2</contentClass>
+ <patterns>
+ <pattern>.*maven-metadata\.xml.*</pattern>
+ </patterns>
+ </repositoryTarget>
+ </repositoryTargets>
+
+</nexusConfiguration>
View
31 nexus-test-harness/nexus-simple-memory-realm/src/test/resources/security.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<security>
+ <version>2.0.2</version>
+
+
+ <userRoleMappings>
+ <userRoleMapping>
+ <userId>admin-simple</userId>
+ <source>Simple</source>
+ <roles>
+ <role>admin</role>
+ </roles>
+ </userRoleMapping>
+ <userRoleMapping>
+ <userId>deployment-simple</userId>
+ <source>Simple</source>
+ <roles>
+ <role>deployment</role>
+ <role>repo-all-full</role>
+ </roles>
+ </userRoleMapping>
+ <userRoleMapping>
+ <userId>anonymous-simple</userId>
+ <source>Simple</source>
+ <roles>
+ <role>anonymous</role>
+ <role>repo-all-read</role>
+ </roles>
+ </userRoleMapping>
+ </userRoleMappings>
+</security>
View
119 nexus-test-harness/nexus-test-harness-base/pom.xml
@@ -0,0 +1,119 @@
+<project 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/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.sonatype.nexus</groupId>
+ <artifactId>nexus-test-harness</artifactId>
+ <version>1.4.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>nexus-test-harness-base</artifactId>
+
+ <name>Nexus Test Harness Base</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assemble/resources.xml</descriptor>
+ <descriptor>src/assemble/bundle-conf.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.sonatype.nexus</groupId>
+ <artifactId>nexus-rest-client-java</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-jetty-testsuite</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.sonatype.appbooter.plexus-booters</groupId>
+ <artifactId>plexus-app-booter</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-archiver</artifactId>
+ <version>1.0-alpha-9</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-http-lightweight</artifactId>
+ <version>1.0-beta-2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.sonatype.appbooter</groupId>
+ <artifactId>plexus-forked-app-booter</artifactId>
+ <version>${plexus.appbooter.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jul-to-slf4j</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-verifier</artifactId>
+ <version>1.2-SONATYPE-708675</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.icegreen</groupId>
+ <artifactId>greenmail</artifactId>
+ <version>1.3</version>
+ </dependency>
+
+ </dependencies>
+
+</project>
View
15 nexus-test-harness/nexus-test-harness-base/src/assemble/bundle-conf.xml
@@ -0,0 +1,15 @@
+<assembly>
+ <id>bundle-conf</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <baseDirectory>/</baseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <outputDirectory>/</outputDirectory>
+ <directory>src/assemble/bundle-conf</directory>
+ </fileSet>
+ </fileSets>
+</assembly>
View
12 nexus-test-harness/nexus-test-harness-base/src/assemble/bundle-conf/conf/plexus.properties
@@ -0,0 +1,12 @@
+application-port=${nexus-application-port}
+application-host=${jetty-application-host}
+runtime=${project.build.directory}/bundle/${nexus-bundle-name}-${project.version}/runtime
+apps=${runtime}/apps
+nexus-work=${runtime}/work
+webapp=${runtime}/apps/nexus/webapp
+webapp-context-path=/nexus
+security-xml-file=${nexus-work}/conf/security.xml
+application-conf=${nexus-work}/conf/
+
+# Used to configure log4j
+log4j-prop-file=${apps}/nexus/conf/log4j.properties
View
22 ...s-test-harness/nexus-test-harness-base/src/assemble/bundle-conf/runtime/apps/nexus/conf/log4j.properties
@@ -0,0 +1,22 @@
+log4j.rootLogger=DEBUG, logfile
+
+log4j.logger.org.apache.commons=WARN, logfile
+log4j.logger.httpclient=WARN, logfile
+log4j.logger.org.apache.http=WARN, logfile
+log4j.logger.org.sonatype.nexus=INFO, logfile
+
+
+
+# LOGFILE
+log4j.appender.logfile=org.apache.log4j.RollingFileAppender
+log4j.appender.logfile.File=${project.build.directory}/logs/nexus.log
+log4j.appender.logfile.Append=true
+log4j.appender.logfile.MaxBackupIndex=30
+log4j.appender.logfile.MaxFileSize=10MB
+log4j.appender.logfile.layout=org.sonatype.nexus.log4j.ConcisePatternLayout
+log4j.appender.logfile.layout.ConversionPattern=%4d{yyyy-MM-dd HH:mm:ss} %-5p [%-15.15t] - %c - %m%n
+
+# CONSOLE
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d %p [%c] - %m%n
View
15 nexus-test-harness/nexus-test-harness-base/src/assemble/resources.xml
@@ -0,0 +1,15 @@
+<assembly>
+ <id>resources</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <baseDirectory>/</baseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <outputDirectory>/</outputDirectory>
+ <directory>src/assemble/resources</directory>
+ </fileSet>
+ </fileSets>
+</assembly>
View
23 nexus-test-harness/nexus-test-harness-base/src/assemble/resources/baseTest.properties
@@ -0,0 +1,23 @@
+nexus.base.url=${nexus-base-url}
+nexus.control.port=${nexus-control-port}
+nexus.bundle.dir=${bundle-expanded-dir}
+nexus.base.dir=${nexus-abs-basedir}
+nexus.work.dir=${work-target-dir}
+nexus.log.dir=${project.build.directory}/logs
+
+proxy.repo.base.dir=${project.build.directory}/test-classes/${proxy-repo-target-dir-name}/
+proxy.repo.base.url=${proxy-repo-base-url}
+proxy.repo.control.port=${proxy-repo-control-port}
+
+maven.local.repo=${project.build.directory}/maven_repo
+maven.instance=${project.build.directory}/apache-maven-${maven-version}
+
+email.server.port=${email-server-port}
+
+test.root.dir=${project.build.testOutputDirectory}
+
+webproxy.server.port=${webproxy-server-port}
+
+proxy.server.port=${proxy-repo-port}
+
+nexus.application.port=${nexus-application-port}
View
21 nexus-test-harness/nexus-test-harness-base/src/assemble/resources/default-config/log4j.propertiesd
@@ -0,0 +1,21 @@
+log4j.rootLogger=INFO, logfile
+
+log4j.logger.org.apache.commons=DEBUG logfile
+log4j.logger.httpclient=DEBUG logfile
+log4j.logger.org.apache.http=DEBUG logfile
+log4j.logger.org.sonatype.nexus=DEBUG logfile
+
+
+
+# LOGFILE
+log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.logfile.File=./target/logs/${test-harness-id}/nexus.log
+log4j.appender.logfile.Append=true
+log4j.appender.logfile.DatePattern='.'yyyy-MM-dd
+log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
+log4j.appender.logfile.layout.ConversionPattern=%4d{yyyy-MM-dd HH:mm:ss.SSS} %-5p [%t:%x] - %c: %m%n
+
+# CONSOLE
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d %p [%c] - %m%n
View
173 nexus-test-harness/nexus-test-harness-base/src/assemble/resources/default-config/nexus.xml
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nexusConfiguration>
+ <version>1.0.8</version>
+
+ <smtpConfiguration>
+ <host>localhost</host>
+ <port>${email-server-port}</port>
+ <sslEnabled>false</sslEnabled>
+ <tlsEnabled>false</tlsEnabled>
+ <username>smtp-username</username>
+ <password>smtp-password</password>
+ <debugMode>false</debugMode>
+ <systemEmailAddress>system@nexus.org</systemEmailAddress>
+ </smtpConfiguration>
+
+ <security>
+ <enabled>false</enabled>
+ <anonymousAccessEnabled>true</anonymousAccessEnabled>
+ <anonymousUsername>anonymous</anonymousUsername>
+ <anonymousPassword>anonymous</anonymousPassword>
+ <realms>
+ <realm>XmlAuthenticatingRealm</realm>
+ <realm>XmlAuthorizingRealm</realm>
+ </realms>
+ </security>
+ <globalConnectionSettings />
+ <restApi>
+ <baseUrl>http://localhost:${nexus-application-port}/nexus</baseUrl>
+ </restApi>
+ <httpProxy />
+ <routing>
+ <groups />
+ </routing>
+ <repositories>
+ <!--
+ <repository> <id>central</id> <name>Maven Central</name> <localStatus>inService</localStatus> <proxyMode>allow</proxyMode> <allowWrite>false</allowWrite> <browseable>true</browseable> <indexable>true</indexable>
+ <notFoundCacheTTL>1440</notFoundCacheTTL> <artifactMaxAge>-1</artifactMaxAge> <metadataMaxAge>1440</metadataMaxAge> <maintainProxiedRepositoryMetadata>false</maintainProxiedRepositoryMetadata> <repositoryPolicy>release</repositoryPolicy>
+ <remoteStorage> <provider>apacheHttpClient3x</provider> <url>http://repo1.maven.org/maven2/</url> </remoteStorage> </repository>
+ -->
+
+
+ <repository>
+ <id>fake-central</id>
+ <name>fake-central</