Browse Source

Branch for metadata rejig. Should stop issues like MRM-885 from ever happening again.


git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@685392 13f79535-47bb-0310-9956-ffa450edef68
tags/archiva-1.2-M1
James William Dumay 16 years ago
parent
commit
58da8544b7
100 changed files with 6450 additions and 0 deletions
  1. 261
    0
      metadata-rejig-1.2/LICENSE
  2. 116
    0
      metadata-rejig-1.2/archiva-cli/pom.xml
  3. 47
    0
      metadata-rejig-1.2/archiva-cli/src/main/assembly/archiva-cli-assembly.xml
  4. 63
    0
      metadata-rejig-1.2/archiva-cli/src/main/java/org/apache/maven/archiva/cli/AbstractProgressConsumer.java
  5. 285
    0
      metadata-rejig-1.2/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java
  6. 96
    0
      metadata-rejig-1.2/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArtifactCountConsumer.java
  7. 125
    0
      metadata-rejig-1.2/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java
  8. 10
    0
      metadata-rejig-1.2/archiva-cli/src/main/resources/log4j.properties
  9. 114
    0
      metadata-rejig-1.2/archiva-docs/pom.xml
  10. 68
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/configuration-files.apt
  11. 22
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/configuration.apt
  12. 91
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/consumers.apt
  13. 50
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/customising-security.apt
  14. 93
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/databases.apt
  15. 26
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/index.apt
  16. 15
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/installing.apt
  17. 44
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/legacy.apt
  18. 21
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/network-proxies.apt
  19. 68
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/proxy-connectors.apt
  20. 66
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/reports.apt
  21. 180
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/repositories.apt
  22. 44
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/roles.apt
  23. 16
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/security.apt
  24. 169
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/standalone.apt
  25. 84
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/webapp.apt
  26. 87
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/customising/writing-consumer.apt
  27. 23
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/index.apt
  28. 73
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/quick-start.apt
  29. 403
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/release-notes.apt
  30. 70
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/browsing.apt
  31. 206
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/deploy.apt
  32. 36
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/find-artifact.apt
  33. 27
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/index.apt
  34. 61
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/rss.apt
  35. 69
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/searching.apt
  36. 124
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/using-repository.apt
  37. 117
    0
      metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/virtual-repositories.apt
  38. 33
    0
      metadata-rejig-1.2/archiva-docs/src/site/assembly/docs.xml
  39. 71
    0
      metadata-rejig-1.2/archiva-docs/src/site/resources/css/site.css
  40. BIN
      metadata-rejig-1.2/archiva-docs/src/site/resources/images/archiva-report.jpg
  41. BIN
      metadata-rejig-1.2/archiva-docs/src/site/resources/images/find-artifact-security.png
  42. BIN
      metadata-rejig-1.2/archiva-docs/src/site/resources/images/find-artifact.png
  43. BIN
      metadata-rejig-1.2/archiva-docs/src/site/resources/images/search-results.jpg
  44. BIN
      metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/admin.png
  45. BIN
      metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/maintenance.png
  46. BIN
      metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/project.png
  47. BIN
      metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/proxy.png
  48. BIN
      metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/reports.png
  49. BIN
      metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/rss.png
  50. BIN
      metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/search.png
  51. BIN
      metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/security.png
  52. BIN
      metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/upload.png
  53. BIN
      metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/virtual-repos.png
  54. 78
    0
      metadata-rejig-1.2/archiva-docs/src/site/site.xml
  55. 26
    0
      metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/admin.xml
  56. 104
    0
      metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/index.xml
  57. 28
    0
      metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/maintenance.xml
  58. 26
    0
      metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/project.xml
  59. 26
    0
      metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/proxy.xml
  60. 26
    0
      metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/reports.xml
  61. 25
    0
      metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/rss.xml
  62. 26
    0
      metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/search.xml
  63. 26
    0
      metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/security.xml
  64. 25
    0
      metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/upload.xml
  65. 26
    0
      metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/virtual-repos.xml
  66. 293
    0
      metadata-rejig-1.2/archiva-jetty/pom.xml
  67. 141
    0
      metadata-rejig-1.2/archiva-jetty/src/main/appended-resources/notice-supplements.xml
  68. 119
    0
      metadata-rejig-1.2/archiva-jetty/src/main/assembly/bin.xml
  69. 1
    0
      metadata-rejig-1.2/archiva-jetty/src/main/conf/archiva.xml
  70. 32
    0
      metadata-rejig-1.2/archiva-jetty/src/main/conf/jetty-logging.xml
  71. 341
    0
      metadata-rejig-1.2/archiva-jetty/src/main/conf/jetty.xml
  72. 1
    0
      metadata-rejig-1.2/archiva-jetty/src/main/conf/shared.xml
  73. 261
    0
      metadata-rejig-1.2/archiva-jetty/src/main/resources/LICENSE
  74. 72
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/pom.xml
  75. 50
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/maven/archiva/converter/artifact/ArtifactConversionException.java
  76. 58
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/maven/archiva/converter/artifact/ArtifactConverter.java
  77. 690
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/maven/archiva/converter/artifact/LegacyToDefaultConverter.java
  78. 71
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/maven/archiva/converter/artifact/Messages.java
  79. 51
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/main/resources/org/apache/maven/archiva/converter/artifact/messages.properties
  80. 6
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/converted-artifact-one.pom
  81. 6
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/converted-artifact-three.pom
  82. 6
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/converted-artifact-two.pom
  83. 28
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/converted-v3-snapshot.pom
  84. 28
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/converted-v3-timestamped-snapshot.pom
  85. 28
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/converted-v3-warnings.pom
  86. 28
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/converted-v3.pom
  87. 7
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/maven-foo-plugin-1.0.pom
  88. 10
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/newversion-artifact-metadata.xml
  89. 6
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/maven-metadata.xml
  90. 1
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.jar
  91. 28
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.pom
  92. 9
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/relocated-test/relocated-v3artifact/maven-metadata.xml
  93. 12
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.pom
  94. 9
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/v3-artifact-metadata.xml
  95. 9
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/v3-snapshot-artifact-metadata.xml
  96. 6
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/v3-snapshot-metadata.xml
  97. 11
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/v3-timestamped-snapshot-metadata.xml
  98. 6
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/v3-version-metadata.xml
  99. 9
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/v4-artifact-metadata.xml
  100. 0
    0
      metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/v4-snapshot-artifact-metadata.xml

+ 261
- 0
metadata-rejig-1.2/LICENSE View File

@@ -0,0 +1,261 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



For the Java Service Wrapper (v3.2.3):

Copyright (c) 1999, 2006 Tanuki Software, Inc.

Permission is hereby granted, free of charge, to any person
obtaining a copy of the Java Service Wrapper and associated
documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sub-license,
and/or sell copies of the Software, and to permit persons to
whom the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.


Portions of the Software have been derived from source code
developed by Silver Egg Technology under the following license:

BEGIN Silver Egg Techology License -----------------------------------
Copyright (c) 2001 Silver Egg Technology
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sub-license, and/or
sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
END Silver Egg Techology License -------------------------------------


+ 116
- 0
metadata-rejig-1.2/archiva-cli/pom.xml View File

@@ -0,0 +1,116 @@
<?xml version="1.0"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<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.apache.archiva</groupId>
<artifactId>archiva</artifactId>
<version>1.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-cli</artifactId>
<name>Archiva Command Line Client</name>
<dependencies>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-repository-layer</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-dependency-tree-consumer</artifactId>
<version>1.2-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-xml-tools</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-converter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.cli-parser</groupId>
<artifactId>cli</artifactId>
<version>7</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-spring</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl104-over-slf4j</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>apache-archiva-cli-${project.version}</finalName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
</transformers>
<artifactSet>
<excludes>
<exclude>xerces:xercesImpl</exclude>
<exclude>xml-apis:xml-apis</exclude>
<exclude>xalan:xalan</exclude>
<exclude>commons-beanutils:commons-beanutils</exclude>
<exclude>commons-io:commons-io</exclude>
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.1</version>
<configuration>
<archive>
<manifest>
<mainClass>org.apache.maven.archiva.cli.ArchivaCli</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>

+ 47
- 0
metadata-rejig-1.2/archiva-cli/src/main/assembly/archiva-cli-assembly.xml View File

@@ -0,0 +1,47 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<assembly>
<id>cli</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>jar</format>
</formats>
<fileSets>
<fileSet>
<directory>target/classes</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<outputDirectory>/</outputDirectory>
<unpack>true</unpack>
<scope>runtime</scope>
<excludes>
<exclude>xml-apis:xml-apis</exclude>
<exclude>xalan:xalan</exclude>
</excludes>
</dependencySet>
</dependencySets>
</assembly>

+ 63
- 0
metadata-rejig-1.2/archiva-cli/src/main/java/org/apache/maven/archiva/cli/AbstractProgressConsumer.java View File

@@ -0,0 +1,63 @@
package org.apache.maven.archiva.cli;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import java.util.Date;

import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer;
import org.apache.maven.archiva.consumers.ConsumerException;
import org.apache.maven.archiva.consumers.RepositoryContentConsumer;

/**
* AbstractProgressConsumer
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*/
public abstract class AbstractProgressConsumer
extends AbstractMonitoredConsumer
implements RepositoryContentConsumer
{
private int count = 0;

public void beginScan( ManagedRepositoryConfiguration repository, Date whenGathered )
throws ConsumerException
{
this.count = 0;
}

public void processFile( String path )
throws ConsumerException
{
count++;
if ( ( count % 1000 ) == 0 )
{
System.out.println( "Files Processed: " + count );
}

}

public void completeScan()
{
System.out.println( "Final Count of Artifacts processed by " + getId() + ": " + count );
}

}

+ 285
- 0
metadata-rejig-1.2/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java View File

@@ -0,0 +1,285 @@
package org.apache.maven.archiva.cli;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.consumers.ConsumerException;
import org.apache.maven.archiva.consumers.InvalidRepositoryContentConsumer;
import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
import org.apache.maven.archiva.consumers.RepositoryContentConsumer;
import org.apache.maven.archiva.converter.RepositoryConversionException;
import org.apache.maven.archiva.converter.legacy.LegacyRepositoryConverter;
import org.apache.maven.archiva.repository.RepositoryException;
import org.apache.maven.archiva.repository.scanner.RepositoryScanStatistics;
import org.apache.maven.archiva.repository.scanner.RepositoryScanner;
import org.apache.maven.artifact.manager.WagonManager;
import org.codehaus.plexus.spring.PlexusClassPathXmlApplicationContext;
import org.codehaus.plexus.spring.PlexusToSpringUtils;

import com.sampullara.cli.Args;
import com.sampullara.cli.Argument;

/**
* ArchivaCli
*
* @todo add back reading of archiva.xml from a given location
* @author Jason van Zyl
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*/
public class ArchivaCli
{
// ----------------------------------------------------------------------------
// Properties controlling Repository conversion
// ----------------------------------------------------------------------------

public static final String SOURCE_REPO_PATH = "sourceRepositoryPath";

public static final String TARGET_REPO_PATH = "targetRepositoryPath";

public static final String BLACKLISTED_PATTERNS = "blacklistPatterns";

private static String getVersion()
throws IOException
{
Properties properties = new Properties();
properties.load( ArchivaCli.class.getResourceAsStream( "/META-INF/maven/org.apache.archiva/archiva-cli/pom.properties" ) );
return properties.getProperty( "version" );
}

private PlexusClassPathXmlApplicationContext applicationContext;

public ArchivaCli()
{
applicationContext =
new PlexusClassPathXmlApplicationContext( new String[] { "classpath*:/META-INF/spring-context.xml",
"classpath*:/META-INF/plexus/components.xml" } );
}

public static void main( String[] args )
throws Exception
{
Commands command = new Commands();

try
{
Args.parse( command, args );
}
catch ( IllegalArgumentException e )
{
System.err.println( e.getMessage() );
Args.usage( command );
return;
}

new ArchivaCli().execute( command );
}

private void execute( Commands command )
throws Exception
{
if ( command.help )
{
Args.usage( command );
}
else if ( command.version )
{
System.out.print( "Version: " + getVersion() );
}
else if ( command.convert )
{
doConversion( command.properties );
}
else if ( command.scan )
{
if ( command.repository == null )
{
System.err.println( "The repository must be specified." );
Args.usage( command );
return;
}

doScan( command.repository, command.consumers.split( "," ) );
}
else if ( command.listConsumers )
{
dumpAvailableConsumers();
}
else
{
Args.usage( command );
}
}

private void doScan( String path, String[] consumers )
throws ConsumerException, MalformedURLException
{
// hack around poorly configurable project builder by pointing all repositories back at this location to be self
// contained
WagonManager wagonManager =
(WagonManager) applicationContext.getBean( PlexusToSpringUtils.buildSpringId( WagonManager.class.getName() ) );
wagonManager.addMirror( "internal", "*", new File( path ).toURL().toExternalForm() );

ManagedRepositoryConfiguration repo = new ManagedRepositoryConfiguration();
repo.setId( "cliRepo" );
repo.setName( "Archiva CLI Provided Repo" );
repo.setLocation( path );

List<KnownRepositoryContentConsumer> knownConsumerList = new ArrayList<KnownRepositoryContentConsumer>();

knownConsumerList.addAll( getConsumerList( consumers ) );

List<InvalidRepositoryContentConsumer> invalidConsumerList = Collections.emptyList();

List<String> ignoredContent = new ArrayList<String>();
ignoredContent.addAll( Arrays.asList( RepositoryScanner.IGNORABLE_CONTENT ) );

RepositoryScanner scanner = (RepositoryScanner) lookup( RepositoryScanner.class );

try
{
RepositoryScanStatistics stats =
scanner.scan( repo, knownConsumerList, invalidConsumerList, ignoredContent,
RepositoryScanner.FRESH_SCAN );

System.out.println( "\n" + stats.toDump( repo ) );
}
catch ( RepositoryException e )
{
e.printStackTrace( System.err );
}
}

private Object lookup( Class<?> clazz )
{
return applicationContext.getBean( PlexusToSpringUtils.buildSpringId( clazz.getName(), null ) );
}

private List<KnownRepositoryContentConsumer> getConsumerList( String[] consumers )
throws ConsumerException
{
List<KnownRepositoryContentConsumer> consumerList = new ArrayList<KnownRepositoryContentConsumer>();

Map<String, KnownRepositoryContentConsumer> availableConsumers = getConsumers();

for ( String specifiedConsumer : consumers )
{
if ( !availableConsumers.containsKey( specifiedConsumer ) )
{
System.err.println( "Specified consumer [" + specifiedConsumer + "] not found." );
dumpAvailableConsumers();
System.exit( 1 );
}

consumerList.add( availableConsumers.get( specifiedConsumer ) );
}

return consumerList;
}

private void dumpAvailableConsumers()
{
Map<String, KnownRepositoryContentConsumer> availableConsumers = getConsumers();

System.out.println( ".\\ Available Consumer List \\.______________________________" );

for ( Map.Entry<String, KnownRepositoryContentConsumer> entry : availableConsumers.entrySet() )
{
String consumerHint = (String) entry.getKey();
RepositoryContentConsumer consumer = (RepositoryContentConsumer) entry.getValue();
System.out.println( " " + consumerHint + ": " + consumer.getDescription() + " ("
+ consumer.getClass().getName() + ")" );
}
}

@SuppressWarnings( "unchecked" )
private Map<String, KnownRepositoryContentConsumer> getConsumers()
{
return PlexusToSpringUtils.lookupMap( "knownRepositoryContentConsumer", applicationContext );
}

private void doConversion( String properties )
throws FileNotFoundException, IOException, RepositoryConversionException
{
LegacyRepositoryConverter legacyRepositoryConverter =
(LegacyRepositoryConverter) lookup( LegacyRepositoryConverter.class );

Properties p = new Properties();

p.load( new FileInputStream( properties ) );

File oldRepositoryPath = new File( p.getProperty( SOURCE_REPO_PATH ) );

File newRepositoryPath = new File( p.getProperty( TARGET_REPO_PATH ) );

System.out.println( "Converting " + oldRepositoryPath + " to " + newRepositoryPath );

List<String> fileExclusionPatterns = null;

String s = p.getProperty( BLACKLISTED_PATTERNS );

if ( s != null )
{
fileExclusionPatterns = Arrays.asList( StringUtils.split( s, "," ) );
}

legacyRepositoryConverter.convertLegacyRepository( oldRepositoryPath, newRepositoryPath, fileExclusionPatterns );
}

private static class Commands
{
@Argument( description = "Display help information", value = "help", alias = "h" )
private boolean help;

@Argument( description = "Display version information", value = "version", alias = "v" )
private boolean version;

@Argument( description = "List available consumers", value = "listconsumers", alias = "l" )
private boolean listConsumers;

@Argument( description = "The consumers to use (comma delimited)", value = "consumers", alias = "u" )
private String consumers = "count-artifacts";

@Argument( description = "Scan the specified repository", value = "scan", alias = "s" )
private boolean scan;

@Argument( description = "Convert a legacy Maven 1.x repository to a Maven 2.x repository using a properties file to describe the conversion", value = "convert", alias = "c" )
private boolean convert;

@Argument( description = "The properties file for the converstion", value = "properties" )
private String properties = "conversion.properties";

@Argument( description = "The repository to scan", value = "repository" )
private String repository;
}
}

+ 96
- 0
metadata-rejig-1.2/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArtifactCountConsumer.java View File

@@ -0,0 +1,96 @@
package org.apache.maven.archiva.cli;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import java.util.ArrayList;
import java.util.List;

import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;

/**
* ArtifactCountConsumer
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*
* @plexus.component role="org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer"
* role-hint="count-artifacts"
* instantiation-strategy="per-lookup"
*/
public class ArtifactCountConsumer
extends AbstractProgressConsumer
implements KnownRepositoryContentConsumer
{
/**
* @plexus.configuration default-value="count-artifacts"
*/
private String id;

/**
* @plexus.configuration default-value="Count Artifacts"
*/
private String description;

private List includes;

public ArtifactCountConsumer()
{
// TODO: shouldn't this use filetypes?
includes = new ArrayList();
includes.add( "**/*.pom" );
includes.add( "**/*.jar" );
includes.add( "**/*.war" );
includes.add( "**/*.ear" );
includes.add( "**/*.sar" );
includes.add( "**/*.car" );
includes.add( "**/*.mar" );
includes.add( "**/*.dtd" );
includes.add( "**/*.tld" );
includes.add( "**/*.gz" );
includes.add( "**/*.bz2" );
includes.add( "**/*.zip" );
}

public String getDescription()
{
return description;
}

public String getId()
{
return id;
}

public boolean isPermanent()
{
return false;
}

public List getExcludes()
{
return null;
}

public List getIncludes()
{
return includes;
}

}

+ 125
- 0
metadata-rejig-1.2/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java View File

@@ -0,0 +1,125 @@
package org.apache.maven.archiva.cli;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.consumers.ConsumerException;
import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
import org.apache.maven.archiva.model.ArchivaProjectModel;
import org.apache.maven.archiva.repository.project.ProjectModelException;
import org.apache.maven.archiva.repository.project.ProjectModelReader;
import org.apache.maven.archiva.repository.project.readers.ProjectModel400Reader;

/**
* ProjectReaderConsumer
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*
* @plexus.component role="org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer"
* role-hint="read-poms"
* instantiation-strategy="per-lookup"
*/
public class ProjectReaderConsumer
extends AbstractProgressConsumer
implements KnownRepositoryContentConsumer
{
/**
* @plexus.configuration default-value="read-poms"
*/
private String id;

/**
* @plexus.configuration default-value="Read POMs and report anomolies."
*/
private String description;

private ProjectModelReader reader;

private ManagedRepositoryConfiguration repo;

private List includes;

public ProjectReaderConsumer()
{
reader = new ProjectModel400Reader();

includes = new ArrayList();
includes.add( "**/*.pom" );
}

public String getDescription()
{
return description;
}

public String getId()
{
return id;
}

public boolean isPermanent()
{
return false;
}

public List getExcludes()
{
return null;
}

public List getIncludes()
{
return includes;
}

public void beginScan( ManagedRepositoryConfiguration repository, Date whenGathered )
throws ConsumerException
{
super.beginScan( repository, whenGathered );
this.repo = repository;
}

public void processFile( String path )
throws ConsumerException
{
super.processFile( path );

File pomFile = new File( repo.getLocation(), path );
try
{
ArchivaProjectModel model = reader.read( pomFile );
if ( model == null )
{
System.err.println( "Got null model on " + pomFile );
}
}
catch ( ProjectModelException e )
{
System.err.println( "Unable to process: " + pomFile );
e.printStackTrace( System.out );
}
}
}

+ 10
- 0
metadata-rejig-1.2/archiva-cli/src/main/resources/log4j.properties View File

@@ -0,0 +1,10 @@
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=ERROR, A1

# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender

# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=[%t] %-5p %c %x - %m%n


+ 114
- 0
metadata-rejig-1.2/archiva-docs/pom.xml View File

@@ -0,0 +1,114 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<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.apache.archiva</groupId>
<artifactId>archiva</artifactId>
<version>1.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-docs</artifactId>
<packaging>pom</packaging>
<name>Archiva Documentation</name>
<url>http://archiva.apache.org/docs/${project.version}/</url>

<build>
<plugins>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<executions>
<execution>
<id>site</id>
<phase>package</phase>
<goals>
<goal>site</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.1</version>
<configuration>
<descriptor>src/site/assembly/docs.xml</descriptor>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<finalName>apache-archiva-${project.version}</finalName>
</build>

<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.0.1</version>
<reportSets>
<reportSet>
<reports>
<report>license</report>
<report>project-team</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>

<distributionManagement>
<site>
<id>apache.website</id>
<url>${siteBaseDeployment}/docs/${project.version}</url>
</site>
</distributionManagement>

<profiles>
<profile>
<id>release</id>
<!-- TODO: this deploys directly - what about staging? -->
<build>
<plugins>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<executions>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>

+ 68
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/configuration-files.apt View File

@@ -0,0 +1,68 @@
------
Configuration Files of Apache Archiva
------

Configuration Files of Apache Archiva

While Archiva is primarily configured via the graphical administration interface, it stores all configuration in XML configuration
files that can be hand edited and used for backup and migration.

The following files compose the configuration for Archiva:

* <<<archiva.xml>>> - this is the primary Archiva configuration file

* <<<security.properties>>> - this configures the security as described in the {{{security.html} security configuration documentation}}

* <<<plexus.xml>>> - only applies when running the standalone Archiva instance, as described in the {{{standalone.html} installing Archiva standalone documentation}}

This section will focus on the <<<archiva.xml>>> file.

* The Archiva configuration file

The Archiva configuration file is stored in one of two locations:

* The application server configuration directory (see {{{standalone.html} installing Archiva standalone}} for more information)

* The user home directory (<<<~/.m2/archiva.xml>>>).

[]

When modified in the GUI, the file is written back to the location it was initially read from, with the home directory taking priority if both exist. When using a
standalone installation, it is highly recommended that a configuration file is only maintained in one of the locations.

The following shows a basic configuration file:

----
<configuration>
<version>2</version>
<managedRepositories>
<managedRepository>
<location>${appserver.base}/repositories/internal</location>
<daysOlder>30</daysOlder>
<id>internal</id>
<name>Archiva Managed Internal Repository</name>
</managedRepository>
</managedRepositories>
<remoteRepositories>
<remoteRepository>
<url>http://repo1.maven.org/maven2</url>
<id>central</id>
<name>Central Repository</name>
</remoteRepository>
</remoteRepositories>
<proxyConnectors>
<proxyConnector>
<sourceRepoId>internal</sourceRepoId>
<targetRepoId>central</targetRepoId>
<policies>
<releases>always</releases>
<checksum>fix</checksum>
<snapshots>never</snapshots>
<cache-failures>no</cache-failures>
</policies>
</proxyConnector>
</proxyConnectors>
</configuration>
----

~~TODO: need a full reference

+ 22
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/configuration.apt View File

@@ -0,0 +1,22 @@
------
Runtime Configuration of Apache Archiva
------

Runtime Configuration of Apache Archiva

Archiva is primarily configured via the graphical administration interface.

The following describe the various sections of the administration menu:

* {{{repositories.html} Configuring repositories}}

* {{{proxy-connectors.html} Configuring proxy connectors}}

* {{{network-proxies.html} Configuring network proxies}}

* {{{legacy.html} Configuring legacy (maven 1) support}}

* {{{consumers.html} Configuring repository scanning and consumers}}

[]


+ 91
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/consumers.apt View File

@@ -0,0 +1,91 @@
------
Understanding Consumers in Apache Archiva
------
Maria Odea Ching
------
21 Nov 2007
------

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership. The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License. You may obtain a copy of the License at
~~
~~ http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied. See the License for the
~~ specific language governing permissions and limitations
~~ under the License.

~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/guides/mini/guide-apt-format.html

Understanding Consumers in Apache Archiva

Archiva makes use of the concept of consumers. Consumers are components which consumes or processes an artifact. There are 2 types
of consumers in Archiva: repository content consumers and database consumers.

* Repository Content Consumers
The repository content consumers consume or process artifacts during repository scanning. For every artifact found in the repository,
each consumer processes them. There are 8 available repository content consumers which can be configured in the Repository Scanning
page. These are:
* <auto-remove> - Removes files in the repository being scanned if the file type matches any of the configured file types to be removed.
* <auto-rename> - Automatically renames common artifact mistakes.
* <create-missing-checksums> - Creates the md5 and sha1 checksum files of the artifact if there are none available in the repository.
* <index-content> - Adds the content of the artifact (specifically the pom) to the index, allowing the artifact to be searched in Archiva.
* <metadata-updater> - Updates artifact metadata files depending on the content of the repository.
* <repository-purge> - Removes old snapshots from the repository either by the number of days old or by the retention count.
* <update-db-artifact> - Adds the artifact (in the form of ArchivaArtifact) to the database.
* <validate-checksums> - Validates the checksum files of the artifact.
* Database Consumers

The database consumers, on the other hand, consume or process artifacts during database scanning. The database consumers are split up
into two types: the unprocessed artifacts consumers and the artifact cleanup consumers.
[[1]] Unprocessed Artifacts Consumers
These are consumers for those artifacts already in the index that haven't been processed yet, meaning the details about the artifact
are not yet processed and stored in the database. There are 6 unprocessed artifact consumers which can be configured in the
Database page:
* <validate-repository-metadata> - Verifies repository metadata files against database.
* <index-archive-toc> - Indexes the archiva table of contents for full text search.
* <index-artifact> - Indexes the artifact for the 'Find Artifact' functionality.
* <update-db-project> - Gets the details of the artifact from the pom and saves it into the database (as a project model)
* <index-public-methods> - Indexes the java public methods for full text search.
* <update-db-bytecode-stats> - Updates database with java bytecode stats.
[]
[]
[[2]] Artifact Cleanup Consumers
These are the consumers for cleaning up the database. There are 3 which can be configured in the Database page, and these are:
* <not-present-remove-db-artifact> - Removes the artifact from the database if the artifact no longer exists in the file system.
* <not-present-remove-indexed> - Removes the artifact from the index if the artifact no longer exists in the file system.
* <not-present-remove-db-project> - Removes the project model of the artifact from the database if the artifact itself no longer exists in the file system.

+ 50
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/customising-security.apt View File

@@ -0,0 +1,50 @@
-----
Archiva Security Configuration
-----

Archiva Security Configuration

Security properties and password rules can be configured in the
<<<security.properties>>> file, which by default is searched for in:

* <<<~/.m2/security.properties>>>
* <<<conf/security.properties>>> in the Archiva installation

[]

(In the above list, <<<~>>> is the home directory of the user who is running
Archiva.)

~~TODO: Link to plexus-redback documentation when available

Following are some of the properties you can modify. For a complete list,
consult the default properties file in Redback's svn repo:
{{{http://svn.codehaus.org/redback/redback/trunk/redback-configuration/src/main/resources/org/codehaus/plexus/redback/config-defaults.properties}
config-defaults.properties}}

+-----+
# Security Policies
#security.policy.password.encoder=
security.policy.password.previous.count=6
security.policy.password.expiration.days=90
security.policy.allowed.login.attempt=3

# Password Rules
security.policy.password.rule.alphanumeric.enabled=false
security.policy.password.rule.alphacount.enabled=true
security.policy.password.rule.alphacount.minimum=1
security.policy.password.rule.characterlength.enabled=true
security.policy.password.rule.characterlength.minimum=1
security.policy.password.rule.characterlength.maximum=8
security.policy.password.rule.musthave.enabled=true
security.policy.password.rule.numericalcount.enabled=true
security.policy.password.rule.numericalcount.minimum=1
security.policy.password.rule.reuse.enabled=true
security.policy.password.rule.nowhitespace.enabled=true
+-----+
<<Note:>> If installed standalone, Archiva's list of configuration files is <itself> configurable, and
can be found in:
<<<apps/archiva/WEB-INF/classes/META-INF/plexus/application.xml>>>


+ 93
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/databases.apt View File

@@ -0,0 +1,93 @@
------
Apache Archiva Databases
------

Apache Archiva Databases

Archiva uses an external database for two purposes:

* Storing artifact information

* As a default user store for security

[]

Generally, it is unnecessary to configure anything - the built in embedded database is suitable for the artifact management, and if
an external authentication mechanism is not needed, the user database.

However, it is possible to configure an external database as needed.

* Configuring an external database

Archiva uses JNDI data sources to locate the databases to use:

* <<<jdbc/archiva>>> - the repository database

* <<<jdbc/users>>> - the user store

Configuring an external database for either or both of these sources depends is configured in <<<jetty.xml>>> if you are using the
{{{standalone.html} standalone installation}}, or in the application server configuration if you are using the {{{webapp.html} web application
installation}}.

By default the archiva and users databases are stored in the <<<databases>>> directory where Archiva is installed. To change the
path, just edit all instances of the "DatabaseName" property in <<<conf/jetty.xml>>> (see below).

+------+
...
<New id="archiva" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/archiva</Arg>
<Arg>
<New class="org.apache.derby.jdbc.EmbeddedDataSource">
<Set name="DatabaseName">/path/to/database/directory/archiva</Set>
<Set name="user">sa</Set>
<Set name="createDatabase">create</Set>
</New>
</Arg>
</New>

<New id="archivaShutdown" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/archivaShutdown</Arg>
<Arg>
<New class="org.apache.derby.jdbc.EmbeddedDataSource">
<Set name="DatabaseName">/path/to/database/directory/archiva</Set>
<Set name="user">sa</Set>
<Set name="shutdownDatabase">shutdown</Set>
</New>
</Arg>
</New>

<New id="users" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/users</Arg>
<Arg>
<New class="org.apache.derby.jdbc.EmbeddedDataSource">
<Set name="DatabaseName">/path/to/database/directory/users</Set>
<Set name="user">sa</Set>
<Set name="createDatabase">create</Set>
</New>
</Arg>
</New>

<New id="usersShutdown" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/usersShutdown</Arg>
<Arg>
<New class="org.apache.derby.jdbc.EmbeddedDataSource">
<Set name="DatabaseName">/path/to/database/directory/users</Set>
<Set name="user">sa</Set>
<Set name="shutdownDatabase">shutdown</Set>
</New>
</Arg>
</New>
...
+------+

* Backing up the database

While it is a good idea to back up both databases, it is not strictly necessary to back up the repository database on a regular basis. Should any
data loss be suffered, this database can be regenerated by deleting it's contents and re-scanning the repositories.

If you are using the default user security mechanism, it is important to back up the users database on a regular basis to ensure that the user
passwords and information are not lost in the event of corruption. With the default embedded storage this is simply a matter of making a copy of
the database directory on the filesystem. If you have configured an external database as the source for user information, please refer to your
database documentation for backup instructions.
~~TODO: link to wiki location that does others

+ 26
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/index.apt View File

@@ -0,0 +1,26 @@
------
System Administrators Guide to Apache Archiva
------

System Administrators Guide to Apache Archiva

Archiva is designed to be simple to install and maintain - including both manual configuration files and a comprehensive
graphical administration interface.

The following sections describe the process for configuring Archiva for use:

* {{{installing.html} Installing Archiva}}

* {{{databases.html} Configuring databases for Archiva}}

* {{{security.html} Configuring security for Archiva}}

* {{{configuration.html} Using the graphical administration interface}}

* {{{configuration-files.html} The configuration files available for Archiva}}

* {{{reports.html} Repository health reports}}

[]



+ 15
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/installing.apt View File

@@ -0,0 +1,15 @@
------
Installing Apache Archiva
------

Installing Apache Archiva

Whether you choose to install Archiva as a standalone application or as a web application in your preferred Java EE
application server, only a minimal amount of configuration is necessary.

The following documents cover the different installation alternatives:

* {{{standalone.html} Installing standalone}}

* {{{webapp.html} Installing as a web application}}


+ 44
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/legacy.apt View File

@@ -0,0 +1,44 @@
------
Apache Archiva legacy repository support configuration
------
Apache Archiva legacy repository support configuration
Archiva supports both Maven 1 and Maven 2 clients transparently when used as a proxy. The
underlying managed repository can use either the default or legacy layout, and Archiva will
convert the requested path to the expected internal format.
However, due to the lack of structure in maven 1 "legacy" artifact request format,
Archiva must split the request path to discover artifactId, version and
classifier - and this is not always deterministic.
The strategy used by Archiva has been tested on many existing artifacts in the public central
repository, but users may require support for private artifacts or for
artifacts with classifiers.
Since version 1.0.1, Archiva provides a legacy support configuration to the administrator. It
is possible to register some custom legacy path and the expected artifact
reference. Archiva will check that the entered artifact reference matches
the legacy path, to avoid corrupted data in repository.
For example:
* Path: <<<jaxen/jars/jaxen-1.0-FCS-full.jar>>>
* Group ID: <<<jaxen>>>
* Artifact ID: <<<jaxen>>>
* Version: <<<1.0-FCS>>>
* Classifier: <<<full>>>
* Type: <<<jar>>>
This prevents the artifact incorrectly getting translated to a version of <<<1.0>>> and a classifier of <<<FCS-full>>>.
Those custom legacy path are stored in the archiva.xml configuration file.
By default, <<<jaxen-1.0-FCS-full>>> is registered, as it is used by some core
Maven 1 plugins (however this is not the case if you upgraded from a previous
version and retained your configuration file).

+ 21
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/network-proxies.apt View File

@@ -0,0 +1,21 @@
------
Understanding Network Proxy Configuration of Apache Archiva
------

Understanding Network Proxy Configuration of Apache Archiva

Archiva uses the terminology "proxy" for two different concepts:

* The remote repository proxying cache, as configured through {{{proxy-connectors.html} proxy connectors}} between repositories

* Network proxies, which are traditional protocol based proxies (primarily for HTTP access to remote repositories over a firewall)

[]

Network proxies are configured using standard HTTP proxy settings as provided by your network administrator.

Once configured, the network proxy can be attached to operations that access remote resources. At present, this is configured on the
remote repository proxy connectors that need to access the remote repository over the HTTP protocol.

~~TODO: walkthrough configuration


+ 68
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/proxy-connectors.apt View File

@@ -0,0 +1,68 @@
------
Understanding Proxy Connector Configuration of Apache Archiva
------

Understanding Proxy Connector Configuration of Apache Archiva

Archiva uses the terminology "proxy" for two different concepts:

* The remote repository proxying cache, as configured through proxy connectors between repositories

* {{{network-proxies.html} Network proxies}}, which are traditional protocol based proxies (primarily for HTTP access to remote repositories over a firewall)

[]

A proxy connector is used to link a managed repository (stored on the Archiva machine) to a remote repository (accessed via a URL). This will mean that when a request
is received by the managed repository, the connector is consulted to decide whether it should request the resource from the remote repository (and potentially cache
the result locally for future requests).

Each managed repository can proxy multiple remote repositories to allow grouping of repositories through a single interface inside the Archiva instance. For instance,
it is common to proxy all remote releases through a single repository for Archiva, as well as a single snapshot repository for all remote snapshot repositories.

A basic proxy connector configuration simply links the remote repository to the managed repository (with an optional network proxy for access through a firewall).
However, the behaviour of different types of artifacts and paths can be specifically managed by the proxy connectors to make access to remote repositories more flexibly controlled.

* Configuring policies

When an artifact is requested from the managed repository and a proxy connector is configured, the policies for the connector are first consulted to decide whether
to retrieve and cache the remote artifact or not. Which policies are applied depends on the type of artifact.

By default, Archiva comes with the following policies:

* <<<Releases>>> - how to behave for released artifact metadata (those not carrying a <<<SNAPSHOT>>> version). This can be set to <<<always>>> (default), <<<hourly>>>, <<<daily>>>, <<<once>>> and <<<never>>>.

* <<<Snapshots>>> - how to behave for snapshot artifact metadata (those carrying a <<<SNAPSHOT>>> version). This can be set to <<<always>>> (default), <<<hourly>>>, <<<daily>>>, <<<once>>> and <<<never>>>.

* <<<Checksum>>> - how to handle incorrect checksums when downloading an artifact from the remote repository (ie, the checksum of the artifact does not match the corresponding detached checksum file).
The options are to fail the request for the remote artifact, fix the checksum on the fly (default), or simply ignore the incorrect checksum

* <<<Cache failures>>> - whether failures retrieving the remote artifact should be cached (to save network bandwidth for missing or bad artifacts), or uncached (default).

* <<<Return error when>>> - if a remote proxy causes an error, this option determines whether an existing artifact should be returned (error when <<<artifact not already present>>>), or the error passed on regardless (<<<always>>>).

* <<<On remote error>>> - if a remote error is encountered, <<<stop>>> causes the error to be returned immediately, <<<queue error>>> will return all errors after checking for other successful remote repositories first, and <<<ignore>>> will disregard ay errors.

[]

* Configuring whitelists and blacklists

By default, all artifact requests to the managed repository are proxied to the remote repository via the proxy connector if the policies pass. However, it can be more efficient to
configure whitelists and blacklists for a given remote repository that match the expected artifacts to be retrieved.

If only a whitelist is configured, all requests not matching one of the whitelisted elements will be rejected. Conversely, if only a blacklist is configured, all requests not matching one of
the blacklisted elements will be accepted (while those matching will be rejected). If both a whitelist and blacklist are defined, a path must be listed in the whitelist and not in the blacklist
to be accepted - all other requests are rejected.

The path in the whitelist or blacklist is a repository path, and not an artifact path, and matches the request and format of the remote repository. The characters <<<*>>> and <<<**>>> are wildcards,
with <<<*>>> matching anything in the current path, while <<<**>>> matches anything in the current path and deeper in the directory hierarchy.

For instance, to only retrieve artifacts in the Apache group ID from a repository, but no artifacts from the Maven group ID, you would configure the following:

* White list: <<<org/apache/**>>>

* Black list: <<<org/apache/maven/**>>>

[]

~~TODO: walkthrough configuration


+ 66
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/reports.apt View File

@@ -0,0 +1,66 @@
------
Making the most of Reporting in Apache Archiva
------
Maria Odea Ching
------
12 Nov 2007
------

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership. The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License. You may obtain a copy of the License at
~~
~~ http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied. See the License for the
~~ specific language governing permissions and limitations
~~ under the License.

~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/guides/mini/guide-apt-format.html

Making the most of Reporting in Apache Archiva

Reporting in Archiva is currently limited to a detailed listing of the problematic artifacts in the different
repositories. Problematic artifacts are those artifacts that were detected by Archiva to have defects (ex.
the versions in the pom and in the artifact itself do not match).
* Configuring a Report

There are 3 fields which can be configured when viewing the reports. These are: the number of rows per page,
the group id and the repository.
1. Setting the row count. This field is for configuring the number of rows or artifacts to be displayed per page
of the report. By default, this is set to 100. The minimum number of rows per page is 10 and the maximum number
of rows is 1000.
2. Setting the group id. The group id pertains to the group id of the artifact (ex. org.apache.maven.plugins).
This field has a blank default value -- meaning, show defective artifacts which has any group id.
3. Setting the repository. You can view the defective artifacts found on specific repositories by setting the
repository field. By default, it is set to All Repositories. Please note that the repository field options list
only contains the repositories which have one or more defective artifacts in it. So not all the repositories
you have configured in the Repositories section will show up in this list, unless of course they all contain
defective artifacts.
* Contents of a Report
The Show Report button will display a detailed list of problematic artifacts filtered according to the
configuration you've set. Below is a sample Archiva report:

[../images/archiva-report.jpg] Archiva Report
You can see in the sample report that there are links to the groupId and artifactId directories
of each artifact. Clicking on any of these links will bring you to the appropriate navigation page in the
Repository Browse. Going back to the report, shown below the links is the specific problem or defect of the
artifact. These are usually detected during repository or database scanning. The page number is also displayed on
the lower left-hand part of the report.


+ 180
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/repositories.apt View File

@@ -0,0 +1,180 @@
------
Understanding Repository Configuration of Apache Archiva
------
Maria Odea Ching
------
13 Nov 2007
------

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership. The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License. You may obtain a copy of the License at
~~
~~ http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied. See the License for the
~~ specific language governing permissions and limitations
~~ under the License.

~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/guides/mini/guide-apt-format.html

Understanding Repository Configuration of Apache Archiva

~~TODO: revise more as suggested by Jeff in the dev list

Archiva has two types of repository configuration: managed repository and remote repository.
* Managed Repository

A managed repository is a repository which resides locally to the server where Archiva is running. It could serve as a
proxy repository, an internal deployment repository or a local mirror repository.
Managed repository fields:
* <identifier> - the id of the repository. This must be unique.
* <name> - the name of the repository.
* <directory> - the location of the repository. If the path specified does not exist, Archiva will create the missing
directories.
* <type> - the repository layout (maven 2 or maven 1)
* <cron> - the {{{http://quartz.sourceforge.net/javadoc/org/quartz/CronTrigger.html}cron schedule}} when repository scanning will be executed.
* <repository purge by days older> - the first option for repository purge. Archiva will check how old the artifact is
and if it is older than the set number of days in this field, then the artifact will be deleted respecting the retention
count (see #7) of course. In order to disable the purge by number of days old and set Archiva to purge by retention count, just set the
repository purge field to 0. The maximum number of days which can be set here is 1000. See the Repository Purge section
below for more details.
* <repository purge by retention count> - the second option for repository purge. When running the repository purge, Archiva
will retain only the number of artifacts set for this field for a specific snapshot version. See the Repository Purge section
below for more details.
* <releases included> - specifies whether there are released artifacts in the repository.
* <snapshots included> - specifies whether there are snapshot artifacts in the repository.
* <scannable> - specifies whether the repository can be scanned, meaning it is a local repository which can be indexed, browsed,
purged, etc.
* <delete released snapshots> - specifies whether to remove those snapshot artifacts which already has release versions
of it in the repository during repository purge.
[]
Each repository has its own Webdav url. This allows the user to browse and access the repository via webdav. The url has the
following format:
+----+
http://[URL TO ARCHIVA]/repository/[REPOSITORY ID] (e.g. http://localhost:8080/archiva/repository/releases).
+----+

A pom snippet is also available for each repository. The \<distributionManagement\> section can be copied and pasted into a
project's pom to specify that the project will be deployed in that managed repository. The \<repositories\> section on the
other hand, can be copied and pasted to a project's pom.xml or to Maven's settings.xml to tell Maven to get artifacts
from the managed repository when building the project.
* Remote Repository

A remote repository is a repository which resides remotely. These repositories are usually the proxied repositories. See
Proxy Connectors on how to proxy a repository.

Remote repository fields:
* <identifier> - the id of the remote repository.
* <name> - the name of the remote repository.
* <url> - the url of the remote repository. It is also possible to use a 'file://' url to proxy a local repository. Be careful that if this local repository is a managed repository of archiva which has some proxies connectors, those ones won't be triggered.
* <username> - the username (if authentication is needed) to be used to access the repository.
* <password> - the password (if authentication is needed) to be used to access the repository.
* <type> - the layout (maven 2 or maven 1) of the remote repository.
* Scanning a Repository
Repository scan can be executed on schedule or it can be explicitly executed by clicking the 'Scan Repository Now' button in
the repositories page. For every artifact found by the repository scanner, processing is done on this artifact by different
consumers. Examples of the processing done are: indexing, repository purge and database update. Details about consumers are
available in the {{{consumers.html} Consumers}} page.

* Repository Purge

Repository purge is the process of cleaning up the repository of old snapshots. When deploying a snapshot to a repository,
Maven deploys the project/artifact with a timestamped version. Doing daily/nightly builds of the project then tends to bloat
the repository. What if the artifact is large? Then disk space will definitely be a problem. That's where Archiva's repository
purge feature comes in. Given a criteria to use -- by the number of days old and by retention count, it would clean up the
repository by removing old snapshots.

Please take note that the by number of days old criteria is activated by default (set to 100 days). In order to de-activate it and
use the by retention count criteria, you must set the Repository Purge By Days Older field to 0. Another thing to note here is that
if the by number of days old criteria is activated, the retention count would still be respected (See the Repository Purge By Days Older
section below for more details) but not the other way around.
Let's take a look at different behaviours for repository purge using the following scenario:

+----+
Artifacts in the repository:

../artifact-x/2.0-SNAPSHOT/artifact-x-20061118.060401-2.jar
../artifact-x/2.0-SNAPSHOT/artifact-x-20061118.060401-2.pom
../artifact-x/2.0-SNAPSHOT/artifact-x-20070113.034619-3.jar
../artifact-x/2.0-SNAPSHOT/artifact-x-20070113.034619-3.pom
../artifact-x/2.0-SNAPSHOT/artifact-x-20070203.028902-4.jar
../artifact-x/2.0-SNAPSHOT/artifact-x-20070203.028902-4.pom
+----+
[[1]] Repository Purge By Days Older
Using this criteria for the purge, Archiva will check how old an artifact is and if it is older than the set value in the
repository purge by days older field, then the artifact will be deleted respecting the retention count of course.
If repository purge by days older is set to 100 days (with repository purge by retention count field set to 1),
and the current date is let's say 03-01-2007, given the scenario above.. the following artifacts will be retained:
artifact-x-20070113.034619-3.jar, artifact-x-20070113.034619-3.pom, artifact-x-20070203.028902-4.jar and
artifact-x-20070203.028902-4.pom. It is clear in the version timestamps that these 4 artifacts are not more than
100 days old from the current date (which is 03-01-2007 in our example) so they are all retained. In this case
the retention count doesn't have any effect since the priority is the age of the artifact.
Now, if the repository purge by days older is set to 30 days (with repository purge by retention count field still
set to 1) and the current date is still 03-01-2007, then given the same scenario above.. only the following artifacts
will be retained: artifact-x-20070203.028902-4.jar and artifact-x-20070203.028902-4.pom. In this case, we can see
that the retained artifacts are still not older by the number of days set in the repository purge by days older field
and the retention count is still met.
Now, let's set the repository purge by days older to 10 days (with repository purge by retention count field still
set to 1) and the current date is still 03-01-2007, then still given the same repository contents above.. the
following artifacts will still be retained: artifact-x-20070203.028902-4.jar and artifact-x-20070203.028902-4.pom.
It is clear from the version timestamps that the artifacts ARE MORE THAN the repository purge by days older value,
which is 10 days. Why is it still retained? Recall the value of the repository purge by retention count -- 1 :)
This ensures that there is ALWAYS 1 artifact timestamped version retained for every unique version snapshot directory
of an artifact.
[[2]] Repository Purge By Retention Count
If the repository purge by retention count field is set to 2, then only the artifacts artifact-x-20070113.034619-3.jar,
artifact-x-20070113.034619-3.pom, artifact-x-20070203.028902-4.jar and artifact-x-20070203.028902-4.pom will be retained
in the repository. The oldest snapshots will be deleted maintaining only a number of snapshots equivalent to the set
retention count (regardless of how old or new the artifact is).

* Scanning a Database

Another scanning process also occurs in Archiva, the database scanning. Same as with repository scanning,
it can also be executed on schedule or explicitly. This can be configured in the 'Database' page, via the 'Database -
Unprocessed Artifacts Scanning' section.

It is essential that the database scan occur after the repo scan as this is where the pom information of the artifacts in
the database will be processed by the consumers and in turn, added to the database (as ArchivaProjectModel objects). For
more details about the different database consumers, please see the {{{consumers.html} Consumers}} page.

+ 44
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/roles.apt View File

@@ -0,0 +1,44 @@
------
Understanding Apache Archiva Security Roles
------

Understanding Apache Archiva Security Roles

Archiva uses the {{{http://redback.codehaus.org/} Redback}} security framework for managing repository security. When the server is first started,
you will be prompted to create an administration user. This user will be given permission to administer all aspects of the system (as well as
access to all of the repositories). This user can then be used to grant permissions to other users.

A guest user is also created by default, and given read access to the default repositories (<<<internal>>> and <<<snapshots>>>). Repositories with
guest user access can be accessed without the use of a username and password (or without being logged in to the web interface).

However, when new repositories are created, by default no permissions are assigned and only the administrators will have access until it is
explicitly granted.

Note that Redback has the concept of inferred roles, so the assignment of some roles will imply other roles (which will be displayed in the web interface).

* Repository Roles

Archiva contains the following roles for repository access:

* <Repository Observer>: users with this role can read from the given repository that the role is for (including access through the browse and search features of the
web interface)

* <Repository Manager>: users with this role can write to and administer the given repository that the role is for

* <Global Repository Observer>: users with this role can read from any repository (including access through the browse and search features of the
web interface)

* <Global Repository Manager>: users with this role can write to and administer any repository in the instance

* General Roles

Archiva also contains the following general roles for security of the instance:

* <System Administrator>: full access to all functionality in the system

* <User Administrator>: ability to create, edit, and grant roles to other users in the system

The guest and registered user roles do not affect repository access.

~~TODO: walkthrough screens


+ 16
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/security.apt View File

@@ -0,0 +1,16 @@
------
Understanding Apache Archiva Security
------

Understanding Apache Archiva Security

Archiva's security is managed by {{{http://redback.codehaus.org/} Redback}}. The following document describes how to configure your
repository security:

* {{{roles.html} Roles in Archiva}}

* {{{customising-security.html} Customising Security}}

[]

~~TODO: LDAP

+ 169
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/standalone.apt View File

@@ -0,0 +1,169 @@
------
Installing Standalone Distribution of Apache Archiva
------

Installing Standalone Distribution of Apache Archiva

Installing the standalone distribution of Archiva is quite simple - for an example, see the {{{../quick-start.html} Quick Start}} guide.

However, the best way to use this installation technique is to separate the configuration from the installation to make it easy to
upgrade to newer versions in the future.

* Running Archiva

Archiva can be run by executing:

* <<<bin/archiva>>>, or <<<bin\archiva.bat>>> for windows (select the one for your environment). The argument can be <<<console>>> to run
interactively, or <<<start>>> to run in the background (in this case, run the script with <<<stop>>> to later stop the server). The logs
are available in the <<<logs>>> directory where Archiva is installed.

[]

* Installing as a Service on Windows

On Windows, to use the <<<start>>> and <<<stop>>> commands you must first install it as a service. This is done by running:

----
.\bin\archiva install
----

You can then use the <<<start>>> and <<<stop>>> commands as well as the traditional Windows service management console to manage the Archiva
service.

This procedure installs the service to run as the local system user. You must ensure that it has access to read the installation, and to write
to the logs and data directories.

You can later remove the service with:

----
.\bin\archiva remove
----

* Separating the base from the installation

The standalone instance of Archiva uses the Plexus application server, which is capable of separating it's configuration from installation,
in much the same way Tomcat does for example.

This is achieved by the following steps:

[[1]] Creating the base location. For example, you might install Archiva in <<</opt/archiva-1.0>>> and the data in <<</var/archiva>>>. Create the directories <<</var/archiva/logs>>>, <<</var/archiva/data>>> and <<</var/archiva/conf>>>.

[[2]] Copy the configuration files from the Archiva installation (eg <<</opt/archiva-1.0/conf>>> to the new location (eg. <<</var/archiva/conf>>>). If you've previously run Archiva, you may need to edit <<<conf/archiva.xml>>> to change the location of the repositories

[[3]] Set the environment variable <<<ARCHIVA_BASE>>> to the data location (eg. <<</var/archiva>>>). In bash, be sure to export the variable.

[[4]] Start Archiva standalone as described above from the installation location

* Configuring Archiva

Archiva's configuration is loaded from the following files, in order of most precedent:

* <<<~/.m2/archiva.xml>>>

* <<<$ARCHIVA_BASE/conf/archiva.xml>>>

* <<<conf/archiva.xml>>> in the Archiva installation

When Archiva saves it's configuration, all configuration is stored to a single file. The file chosen is by the following rules:

* If <<<~/.m2/archiva.xml>>> exists, it is saved there

* Otherwise, it is saved to <<<$ARCHIVA_BASE/conf/archiva.xml>>>, regardless of whether it previously existed.

The configuration will never be saved in the Archiva installation directory if you are using a separate base directory.

Note that the configuration can be edited, but only when Archiva is not running as it will not reload a changed configuration file, and will save over it
if something is changed in the web interface.

* Database

By default, Archiva uses embedded {{{http://db.apache.org/derby}Apache Derby}}
to store the user information. It can be configured to use an external database
by providing a JDBC driver and editing the <<<jetty.xml>>> file.

[[1]] Place the jar containing the JDBC driver in the <<<lib>>> directory of the Archiva installation.

[[2]] Edit <<<conf/jetty.xml>>>, providing the JDBC driver class
name, database url, username, and password.

[]

The example below uses Mysql for the database server. You can take a look at
{{{http://cwiki.apache.org/confluence/display/ARCHIVA/Archiva+with+MySQL}Archiva with MySQL}}
for more details.

+------+
...
<!-- Archiva Database -->

<New id="archiva" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/archiva</Arg>
<Arg>
<New class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource">
<Set name="serverName">localhost</Set>
<Set name="databaseName">archiva</Set>
<Set name="user">archiva</Set>
<Set name="password">sa</Set>
</New>
</Arg>
</New>

<New id="archivaShutdown" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/archivaShutdown</Arg>
<Arg>
<New class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource">
<Set name="serverName">localhost</Set>
<Set name="databaseName">archiva</Set>
<Set name="user">archiva</Set>
<Set name="password">sa</Set>
</New>
</Arg>
</New>

<!-- Users / Security Database -->

<New id="users" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/users</Arg>
<Arg>
<New class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource">
<Set name="serverName">localhost</Set>
<Set name="databaseName">redback</Set>
<Set name="user">archiva</Set>
<Set name="password">sa</Set>
</New>
</Arg>
</New>

<New id="usersShutdown" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/usersShutdown</Arg>
<Arg>
<New class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource">
<Set name="url">jdbc:mysql://localhost/redback</Set>
<Set name="user">archiva</Set>
<Set name="password">sa</Set>
</New>
</Arg>
</New>
...
+------+

More information about using Derby Network Server as an external user database
for Archiva can be found on the wiki:
{{{http://cwiki.apache.org/confluence/display/ARCHIVA/Archiva+User+DB+on+Derby+Network+Server}
Archiva User DB on Derby Network Server}}


{Upgrading Archiva}

Upgrading Archiva is straightforward if the directions for separating the base from the installation above are followed. Simply retain the <<<data/repositories>>> and <<<data/databases/users>>> directories,
and the configuration files (in the conf directory, or the other locations specified above) and use a new extracted installation of Archiva.

Note that the <<<users>>> database must always be retained as it contains the permissions and user information across versions. However,
in order to take advantage of the improvements in search in Archiva 1.1 (and higher versions), s.a. search by java class/package/method, the archiva database must
be re-created. So you need to delete the <<<data/databases/archiva>>> directory, delete the <<<.index>>> directories of your respective repositories, and execute the repository and database scanners after
starting Archiva.

The repository data is portable across versions, and multiple versions can be configured to look at the same repositories (though not run simultaneously).




+ 84
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/adminguide/webapp.apt View File

@@ -0,0 +1,84 @@
------
Installing Apache Archiva as a Web Application
------

Installing Apache Archiva as a Web Application

~~TODO: link to wiki location for other application servers

Archiva can be deployed as a web application into any Java EE application server. This document will show an
example of doing so with Tomcat 5.5 and Tomcat 6.0.x.

<<Note>>: When you first start Archiva, you will see an Exception that schema SA does not exist - however it doesn't
cause a problem. If you use a username other than 'sa', such as 'archiva', then you seem to get the same error but
Tomcat fails to start the context and you have to shutdown and restart again.


To deploy Archiva on Tomcat 5.5 and Tomcat 6.0

* Create a directory in tomcat called archiva, at the same level as bin, conf, logs and the others.

* Copy the war file into the new directory

* Create a <<<\<tomcat home\>/conf/Catalina/localhost/archiva.xml>>> file with the following data (replace the database paths with a suitable location):

+-------------------------------------------------------------------------+
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/archiva"
docBase="${catalina.home}/archiva/apache-archiva-1.1.war">

<Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"
username="sa"
password=""
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby:/path/to/database/users;create=true" />

<Resource name="jdbc/archiva" auth="Container" type="javax.sql.DataSource"
username="sa"
password=""
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby:/path/to/database/archiva;create=true" />

<Resource name="mail/Session" auth="Container"
type="javax.mail.Session"
mail.smtp.host="localhost"/>
</Context>
+-------------------------------------------------------------------------+

* Install <<<derby-10.1.3.1.jar>>> (or later), <<<activation-1.1.jar>>> and <<<mail-1.4.jar>>> into the Tomcat 5.5 <<<common/lib>>> or Tomcat 6.0 <<<lib>>> directory.
This is required since the data sources are instantiated before the web application.

<<Note>>: Tomcat 5.5.20 and 5.5.23 are missing MailSessionFactory and a
few other classes. JNDI mail sessions will <not> work. Use Tomcat 5.5.25
instead, or see {{{http://issues.apache.org/bugzilla/show_bug.cgi?id=40668}
Bug 40668}} for a workaround.

* The ${appserver.base} java property is used by the Archiva internal logging configuration to determine where to output its logs to.
It is important to define this property either in the $CATALINA_OPTS system environment variable (if Tomcat is being launched via the
command line) or the service properties (if being launched as a service or daemon). The format typically expected is
-Dappserver.base=<SOMEWHERE>. In this example, we'll put the logs in Tomcat's <<<logs>>> directory so we need to set appserver.base
property to where Tomcat is installed:

+-----------+
export CATALINA_OPTS="-Dappserver.home=$CATALINA_HOME -Dappserver.base=$CATALINA_HOME"
+-----------+

For more information, see {{{http://cwiki.apache.org/confluence/display/ARCHIVA/Archiva+on+Tomcat} Archiva on Tomcat}} in the wiki.

Archiva Configuration

Archiva is configured using the <<<~/.m2/archiva.xml>>> configuration file by default when using a Java EE application server.

~~TODO: how to configure the other file

Upgrading Archiva

To upgrade the Archiva web application, simply replace the web application with an alternative. Since the database and configuration files are stored
externally to the application, no further maintainance is needed.

For general information about upgrading Archiva, see the relevant section in the {{{standalone.html#Upgrading%20Archiva} Installing standalone}} guide.

Configuring and Running Archiva

Once Archiva is running, it is configured in the same way as the standalone instance. See the {{{../quick-start.html#Setting%20up%20your%20Archiva%20instance} quick start}} guide for more information.

+ 87
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/customising/writing-consumer.apt View File

@@ -0,0 +1,87 @@
------
Writing a Consumer Plugin
------
Maria Odea Ching
------
23 Nov 2007
------

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership. The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License. You may obtain a copy of the License at
~~
~~ http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied. See the License for the
~~ specific language governing permissions and limitations
~~ under the License.

~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/guides/mini/guide-apt-format.html

Writing a Consumer Plugin

For a sample custom consumer, you can checkout the archiva-consumer-plugin at the archiva sandbox in the SVN repository:

+----+
http://svn.apache.org/repos/asf/archiva/sandbox/archiva-consumer-plugin
+----+

Below are the steps on how to create a custom repository consumer and plug it in Archiva:

[[1]] Create a project for your component.

[[2]] Declare your class or in this case, consumer as a component as shown in the example below. This
should be put at the class level.

+----+
Ex.
@plexus.component role="org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer"
role-hint="discover-new-artifact"
instantiation-strategy="per-lookup"

where,
role: the interface that your class implements
role-hint: the lookup name of the component (your class/consumer)
instantiation-strategy: how your class will be instantiated
+----+

[[3]] Make sure to add the snippet below in the <build> section of the project's pom. This is needed to
generate the components.xml.

+----+
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-maven-plugin</artifactId>
<version>1.3.5</version>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
+----+

[[4]] Package your project by executing 'mvn clean package'

[[5]] Let's say you are using the apache-archiva-1.0-bin.tar.gz to run Archiva. Unpack
the binaries then go to bin/linux-x86-32/ (assuming you are running on Linux), then execute
'./run.sh console'. Then stop or shutdown Archiva after it started. (This is necessary to unpack
the war file.)

[[6]] Copy the jar file you created in step 4 in apache-archiva-1.0/apps/archiva/webapp/lib/

[[7]] Add the necessary configurations in archiva.xml (in this case, add 'discover-new-artifact' as a
<knownContentConsumer>)

[[8]] Start up Archiva again.

+ 23
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/index.apt View File

@@ -0,0 +1,23 @@
-----
Welcome to Archiva
-----
-----
-----

Archiva is a build artifact repository manager for use with
build tools such as {{{http://maven.apache.org} Maven}}, {{{http://continuum.apache.org} Continuum}}, and {{{http://ant.apache.org/} ANT}}.

With Archiva, you can share artifacts with other developers and manage the associated
security required, aggregate (proxy) content from remote artifact repositories, visualise
your artifact utilisation with search, browse and reporting, and perform routine
maintenance on your repositories.

To get started with Archiva, you can read the following documentation:
* {{{quick-start.html} A Quick Getting Started Guide}}

* {{{userguide/index.html} Users Guide}}

* {{{adminguide/index.html} Administrators Guide}}

[]

+ 73
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/quick-start.apt View File

@@ -0,0 +1,73 @@
-----
Quick Start
-----
Henri Yandell
-----
1 October 2006
-----

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership. The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License. You may obtain a copy of the License at
~~
~~ http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied. See the License for the
~~ specific language governing permissions and limitations
~~ under the License.

~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/guides/mini/guide-apt-format.html

Installing Archiva

The quickest way to install Archiva is to use the standalone distribution. This includes a bundled Jetty server which can be easily started.
For more information on advanced configuration of this instance, refer to the {{{adminguide/standalone.html} Administration Guide}}.

To get started right away, you can run the following after unpacking:

----
./bin/archiva console (Linux, Mac, Solaris)
.\bin\archiva console (Windows)
----

You will need to choose a different start command based on your platform. The <<<console>>> argument
starts the server with the logs going to standard output, and waits for Ctrl+C to stop the server.

<<Note:>> A Derby exception "Schema 'SA' does not exist" occurs, but is not of concern.

Archiva is now running on <<<http://localhost:8080/archiva/>>>

{Setting up your Archiva instance}

You can now browse the web administration of Archiva. There will be a few basic setup tasks to get started.

The first step is to setup your administration user. The password requires a numerical character and must not be
longer than 8 chars. You'll then need to log in. Use 'admin' as the username and the password you've entered.

At this point, Archiva is fully functional - you can use it with the default repositories and guest user. You might like
to explore the user and administrator guides to find other functionality.

The default configuration for Archiva configures two repositories:

* <<<internal>>> - a repository for containing released artifacts. This is connected by proxy to the central repository, so requests here will
automatically retrieve the remote artifacts.

* <<<snapshots>>> - a repository for storing deployed snapshots. This is not proxied to any remote repositories by default.

In addition, the guest user has read access to these repositories, so you can make anonymous requests to either. To try this out, point a web browser at the following URL:
{{http://localhost:8080/archiva/repository/internal/junit/junit/3.8.1/junit-3.8.1.jar}}. Though the artifact is not present locally, you will see in the Archiva logs that it is
downloaded from the central repository, and then handed back to the browser and downloaded from Archiva. Future requests for the artifact will be much faster as they need not be
downloaded from the central repository.

Once this artifact is downloaded, Archiva automatically indexes it, so you can access it's information at the following URL: {{http://localhost:8080/archiva/browse/junit/junit/3.8.1/}}.
It will also be available from the search interface.



+ 403
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/release-notes.apt View File

@@ -0,0 +1,403 @@
-----
Release Notes for Archiva 1.1.1
-----

Release Notes for Archiva 1.1.1

The Apache Archiva team would like to announce the release of Archiva 1.1.1.

Archiva 1.1.1 is {{{http://archiva.apache.org/download.html} available for download from the web site}}.

Archiva is an application for managing one or more remote repositories, including administration, artifact handling, browsing and searching.

If you have any questions, please consult:

* the web site: {{http://archiva.apache.org/}}

* the archiva-user mailing list: {{http://archiva.apache.org/mail-lists.html}}

* New in Archiva 1.1

** Artifact Uploads

To simplify adding artifacts to a repository, an upload form has been put in place that allows you to put an artifact and POM into
the repository without the need for the Maven <<<deploy-file>>> command.

** RSS

RSS is now available for getting a feed of new artifacts being added to a given repository. Two types of feeds are generated by Archiva:
new artifacts in a repository and new versions of a specific artifact. Details are available in {{{userguide/rss.html}Rss Feeds}}.

** Virtual Repositories

Virtual repositories or repository groups allows downloading from a group of repositories via one url. For more details of this feature,
see {{{userguide/virtual-repositories.html}Virtual Repositories}}.

** Timeouts

Connections to remote repositories can now have a configurable timeout value

** New Runtime Bundle

The application is now distributed using Jetty 6.1 and it's documented configuration, rather than the previous
Plexus application server bundle. It continues to use the Java Service Wrapper (v3.2.3) for application monitoring,
though the configuration has been improved, particularly with regard to separating the application configuration from the installation.

** Using Spring

Archiva now uses the Spring Framework as it's underlying container instead of Plexus. This results in a boost in performance and
stability for the web application in particular.

** Using Apache Jackrabbit WebDAV Servlet

Archiva now uses Apache Jackrabbit's WebDAV servlet for serving repository content instead of plexus-webdav. The change results in reduced
codebase complexity, increased standards compliance, better webdav client support and a small peformance boost.

* Release Notes

The Archiva 1.1 feature set can be seen in the {{{tour/index.html} feature tour}}.

* Changes in Archiva 1.1.1

** Bug

* [MRM-584] - Newly created user cannot login

* [MRM-631] - network proxy is always used when defined

* [MRM-814] - Invalid cron expressions are accepted in Database Scanning

* [MRM-873] - repository groups - move up/down should not show when it's not possible

* [MRM-883] - RSS syndication java.lang.ArrayIndexOutOfBoundsException

* [MRM-884] - network proxy fails after upgrading to archiva 1.1

* [MRM-888] - add notes on reindexing to the upgrade docs

* [MRM-891] - Unable to use archiva as http source with maven-stage-plugin

* [MRM-892] - Search for java classes and package names is broken

* [MRM-895] - Archiva version doesn't appear on the footer when it is installed on Tomcat

* [MRM-896] - classifier is appended to pom filename after artifact upload

** Improvement

* [MRM-817] - Artifact information screen should indicate the name of repository in which the artifact resides

The full list of changes can be found {{{http://jira.codehaus.org/secure/ReleaseNote.jspa?version=14461&styleName=Text&projectId=10980} in JIRA}}.

* Changes in Archiva 1.1

** Sub-task

* [MRM-801] - Create documentation for virtual repositories

* [MRM-861] - Paginate Search Results page

** Bug

* [MRM-234] - Moving files between repos through webdav doesn't work

* [MRM-312] - ConcurrentModificationException

* [MRM-523] - Appearance Actions do not work when ${user.home} is invalid.

* [MRM-538] - Browse > Info not synchronised with updated POM contents

* [MRM-550] - proxy connectors - move up/down should not show when it's not possible

* [MRM-584] - Newly created user cannot login

* [MRM-597] - Cannot run Archiva as another user because su is run with option "-" (--login)

* [MRM-602] - add "maintainance" to the feature tour

* [MRM-605] - unit tests fail on archiva 1.0 source distribution

* [MRM-610] - a number of unit tests fail on windows

* [MRM-614] - User validation message has incorrect URL

* [MRM-624] - Failed to install Archiva as windows service

* [MRM-629] - NullPointer when setting corporate POM on a fresh archvia install

* [MRM-638] - some developer reports are appearing in the archiva-docs module and need to be disabled

* [MRM-650] - Deleted metadata files still appear in search results

* [MRM-652] - Invalid html links in "webdav" directory browsing

* [MRM-653] - WebDAV deploy fails with error

* [MRM-658] - org.apache.maven.archiva.repository.content.FilenameParser is unable to determine unique snapshot versions with specific version names

* [MRM-682] - Archiva runs out of heap memory

* [MRM-692] - Repository problem is kept in database even though its related artifact has been already removed

* [MRM-702] - in the standalone bundle, the pid file is written into the installation directory alongside the wrapper, but should be in a temporary location

* [MRM-711] - Security using ldap throws NullPointerException

* [MRM-733] - Error ending component lifecycle

* [MRM-753] - Error while deploying an artifact to archiva

* [MRM-767] - generated LICENSE and NOTICE files need improvement

* [MRM-768] - Cannot proxy maven2 plugin (jaxb) from a maven1 repository (http://download.java.net/maven/1)

* [MRM-769] - CLONE - 507 Insufficient Storage when deploying artifact with webdav

* [MRM-777] - assignments.jsp: missing <tr></tr> group under "Resource Roles":

* [MRM-778] - DefaultDavServerManager.createServer doesn't create server

* [MRM-780] - Access to indexes files with a browser is not possible

* [MRM-784] - mailing-info on the website points to 'old' maven.apache.org addresses

* [MRM-785] - No message is displayed after a successful artifact upload

* [MRM-789] - Archiva may delete you app server installation

* [MRM-790] - [regression] proxying metadata causes an IO exception in new checksum code

* [MRM-792] - remove references to maven in code

* [MRM-796] - releases always activated in repositories

* [MRM-797] - Delete Released Snapshots doesn't work

* [MRM-800] - Admin user account user lockout via Webdav only?

* [MRM-810] - Uploads done through the Web UI are not reported in the audit log

* [MRM-818] - [Repository Group] Page will be broken if entered identifier is too long

* [MRM-819] - ERROR 404 page when clicking the URL of Repository Group with identifier i.e. "test/test"

* [MRM-820] - 404 when the dav url of an Archiva default repository (internal or snapshots) is accessed

* [MRM-823] - Deleted repository still shows up in the repo group

* [MRM-824] - dependency cleanup

* [MRM-835] - Checksum search appears broken

* [MRM-840] - Wagon HTTP deadlocks under high load

* [MRM-845] - Continuous Loop when you click a repository group link

* [MRM-846] - "Repository Purge By Retention Count" option not working

* [MRM-847] - DependencyTreeGeneratorConsumerTest fails under windows due to line ending

* [MRM-851] - wrong taglib short-name causes deployment error on Geronimo

* [MRM-853] - HTTP Error 500 when uploading artifact with Windows OS

* [MRM-855] - java.lang.NoClassDefFoundError: org/apache/xml/serialize/OutputFormat

* [MRM-856] - Artifact Upload replaces all instances of the name "jar" with "pom" when trying to change the file extension

* [MRM-858] - last-modified header is missing

* [MRM-865] - Upload snapshot should work like a deploy

* [MRM-867] - 500 on HEAD method

* [MRM-869] - many empty folders created in managed repos with proxy connectors when used in a group

* [MRM-870] - addRepositoryToGroup.action => AbstractMethodError on DeferredDocumentImpl.getXmlStandalone()

* [MRM-871] - jetty.host and jetty.port properties are set by default in jetty.xml preventing user from using other hostname if user is not aware of these properties

* [MRM-872] - empty metadatas frmo a repository group

** Improvement

* [MRM-591] - Reports should show from which repository the defective artifact was found.

* [MRM-651] - Updated consumer plugin to build against the 1.1 apis

* [MRM-654] - Archetype for generation of Consumer plugins

* [MRM-667] - Timeout implementation for Archiva

* [MRM-678] - 404 errors on proxies should be cached

* [MRM-737] - Don't list metadata files in the search results

* [MRM-752] - Trim URL in Remote Repositories

* [MRM-760] - set JSW to auto-restart if it crashes or hangs

* [MRM-773] - Improve RSS feed generation

* [MRM-781] - Removal of Archiva-Webdav implementation in favor of Jackrabbit-webdav

* [MRM-802] - Display the url for the repository group

* [MRM-804] - When uploading artifacts to the repo, they should be added to the index instantly

* [MRM-822] - add org/jvnet/**, com/sun/** to the whitelist for the default java.net repository

* [MRM-829] - Replace Company POM feature with simple Appearence customisation

* [MRM-831] - When deploying artifacts to the repo, they should be added to the index instantly

* [MRM-857] - set a user agent for proxy HTTP requests

* [MRM-859] - Use File.createTempFile() when downloading files from a remote repository

** New Feature

* [MRM-123] - add RSS view to repository manager

* [MRM-216] - Upload (deploy) artifacts to a repository - via a web form (not using wagon)

* [MRM-694] - Virtual repositories or repository grouping

* [MRM-730] - Index/Search by class, method or package name

* [MRM-751] - Support database connection pooling

* [MRM-774] - Support inclusion of pom file when deploying an artifact via the web upload form

* [MRM-864] - Searching within search results

** Task

* [MRM-677] - Upgrade archiva to the latest redback (1.0.1)

* [MRM-688] - Replace plexus-runtime with standalone jetty bundle

* [MRM-708] - Migrate from Plexus Logging to Slf4J

* [MRM-754] - Update the screenshots in the docs
The full list of changes can be found {{{http://jira.codehaus.org/secure/ReleaseNote.jspa?version=13861&styleName=Text&projectId=10980} in JIRA}}.

* Changes in Archiva 1.0.2

** Bug

* [MRM-159] - should not respond with a 404 if proxying a file results in a remote error

* [MRM-532] - Unable to specify the location of the index files through the web ui

* [MRM-598] - Validation error on new repository creation and other fields under certain conditions

* [MRM-608] - Unable to find project model for [...] if the initial import of the POM failed

* [MRM-617] - Reporting does not work due to bug in client-side JavaScript validation

* [MRM-618] - PLEXUS_BASE does not work for local databases

* [MRM-622] - database not being updated with project model information

* [MRM-626] - ClassCastException when saving proxy connector with property defined

* [MRM-627] - Archiva doesn't download SNAPSHOTs for proxied repositories.

* [MRM-631] - network proxy is always used when defined

* [MRM-642] - archiva-common tests rely on relative paths

* [MRM-655] - The logs are duplicated in the archiva.log and wrapper.log file.

* [MRM-659] - archiva cannot serve ejb artifacts from a maven1 repository

* [MRM-661] - remote repository removals are not saved after restart

* [MRM-664] - Cannot download a strut-module artifact in a Legacy repository

* [MRM-674] - LayoutException when downloading SNAPSHOT test-sources

* [MRM-683] - Archiva version missing from pages and logs

* [MRM-687] - Project model cannot be added to database if it inherits groupId and/or version from parent POM

* [MRM-689] - Incorrect war name in example for tomcat

* [MRM-690] - using undefined appserver.base

* [MRM-691] - Can't get any of the consumers to work without through a NPE

* [MRM-701] - Buggy documentation on "separating the base from the installation"

* [MRM-703] - Artifacts with extensions longer than fours characters breaks repository scanning.

* [MRM-713] - extensionPattern in FilenameParser is incorrect

* [MRM-715] - error adding artifacts to Lucene under some circumstances

* [MRM-719] - NPE during repository scan

* [MRM-725] - /archiva/browse URL does not work on WebSphere

* [MRM-727] - Archiva does not download plugin artifacts in Geronimo

* [MRM-734] - Unable to update metadata - No versions found for reference

* [MRM-746] - unable to include *.xml in artifacts list as it picks up maven-metadata.xml

* [MRM-750] - Adding a network proxy doesn't require an identifier

* [MRM-755] - No content type for .pom files denoted in file "archiva-mime-types.txt" - workaround included

* [MRM-758] - unable to schedule cron expressions that contain a comma

* [MRM-761] - Exception when trying to retrieve a Maven 1 artifact of type zip

* [MRM-762] - Footer doesn't stretch across repositoryScanning and database pages

* [MRM-763] - Default cron expression for database update is invalid

* [MRM-764] - default policies are not selected in the add proxy connector page

** Improvement

* [MRM-504] - Find Artifact page needs more onscreen information/instructions

* [MRM-656] - Admin guide for installing WAR needs updating

* [MRM-666] - Edit Managed Repository page should indicate the repo id being edited

* [MRM-700] - Review the documentation on deploying to Archiva for inconsistent repository ids

* [MRM-720] - Upgrade Lucene from 2.0 to 2.3.1

* Changes in Archiva 1.0.1

** Bug

* [MRM-623] - find artifact self signed certificate will expire soon

* [MRM-628] - In the audit.log file the userid for each action is guest, even though the deploy was performed by admin

* [MRM-630] - http 502 proxy error with browse button after 2 days running

* [MRM-633] - Logging is too verbose

* [MRM-646] - Documentation for configuring for Tomcat is invalid

* [MRM-662] - Repo purge is not deleting artifacts in correct order

* [MRM-668] - Repo browse and search isn't working in trunk and in archiva 1.0.1 release candidate

* [MRM-670] - legacy artifact mapping form needs better validation

** Improvement

* [MRM-594] - add some minimal hook in LegacyPathParser to allow exception management in artifact resolution

** Task

* [MRM-619] - Update docs/site for some corrections


+ 70
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/browsing.apt View File

@@ -0,0 +1,70 @@
------
Browsing
------
Maria Odea Ching
------
9 November 2007
------

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership. The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License. You may obtain a copy of the License at
~~
~~ http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied. See the License for the
~~ specific language governing permissions and limitations
~~ under the License.

~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/guides/mini/guide-apt-format.html

Browsing

* Permissions
The user can only browse those repositories where the user is an observer or a manager. If the user does not
have permission to access any repository, a message saying "You have access to no repositories. Ask your
system administrator for access" will be displayed.

* Repository Browse Layout

The current layout of the repositories in Repository Browse uses the Maven 2 layout, which is the groupId,
artifactId and version. When the version is clicked, the Artifact Info page (see the next section) will be
displayed. There is currently an issue with regard to Maven 1 artifacts, see {{{http://jira.codehaus.org/browse/MRM-585} http://jira.codehaus.org/browse/MRM-585}}.

* Artifact Info

The Artifact Info page is divided into 5 views:
1. Info. Basic information about the artifact is displayed here. These are the groupId, artifactId, version and
packaging. A dependency pom snippet is also available, which a user can just copy and paste in a pom file
to declare the artifact as a dependency of the project.
2. Dependencies. The dependencies of the artifact will be listed here. The user can easily navigate to a specific
dependency by clicking on the groupId, artifactId or version link. The scope of the dependency is also shown.
3. Dependency Tree. The dependencies of the artifact are displayed in a tree-like view, which can also be
navigated.
4. Used By. Lists all the artifacts in the repository which use this artifact.
5. Mailing Lists. The project mailing lists available in the artifact's pom are displayed here.
* Downloading Artifacts

Artifacts can be downloaded from the artifact info page. All files, except for the metadata.xml files, that are
associated with the artifact are available in the download box. The size of the files in bytes are displayed
at the right section of the download box.

+ 206
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/deploy.apt View File

@@ -0,0 +1,206 @@
------
Deploying to Repository
------

Deploying to Repository

There are different ways on how you can deploy artifacts in an Archiva repository.

* {{{#Maven} Configuring Maven to deploy to an Archiva repository}}

* {{{#Web UI} Deploying via the Web UI Form}}

* Configuring {Maven} to deploy to an Archiva repository
[[1]] Create a user in Archiva to use for deployment (or use guest if you wish to deploy without a username and password)

[[2]] The deployment user needs the Role 'Repository Manager' for each repository that you want to deploy to

[[3]] Define the server for deployment inside your 'settings.xml', use the newly created user for authentication

+-------------------------------------------------------------------------+
<settings>
...
<servers>
<server>
<id>archiva.internal</id>
<username>{archiva-deployment-user}</username>
<password>{archiva-deployment-pwd}</password>
</server>
<server>
<id>archiva.snapshots</id>
<username>{archiva-deployment-user}</username>
<password>{archiva-deployment-pwd}</password>
</server>
...
</servers>
...
</settings>
+-------------------------------------------------------------------------+

** Deploying to Archiva using HTTP

Configure the <<<distributionManagement>>> part of your <<<pom.xml>>> (customising the URLs as needed).
The <<<id>>> of the repository in <<<distributionManagement>>> <<must>> match the <<<id>>> of the <<<server>>>
element in <<<settings.xml>>>.
+-------------------------------------------------------------------------+
<project>
...
<distributionManagement>
<repository>
<id>archiva.internal</id>
<name>Internal Release Repository</name>
<url>http://reposerver.mycompany.com:8080/archiva/repository/internal/</url>
</repository>
<snapshotRepository>
<id>archiva.snapshots</id>
<name>Internal Snapshot Repository</name>
<url>http://reposerver.mycompany.com:8080/archiva/repository/snapshots/</url>
</snapshotRepository>
</distributionManagement>
...
</project>
+-------------------------------------------------------------------------+

** Deploying to Archiva using WebDAV

In some cases, you may want to use WebDAV to deploy instead of HTTP. If you find this is necessary, follow the same
process as for HTTP, with these additional steps:

[[1]] Add <<<dav:>>> to the front of the deployment URLs:
+-------------------------------------------------------------------------+
<project>
...
<distributionManagement>
<repository>
<id>archiva.internal</id>
<name>Internal Release Repository</name>
<url>dav:http://reposerver.mycompany.com:8080/archiva/repository/internal/</url>
</repository>
<snapshotRepository>
<id>archiva.snapshots</id>
<name>Internal Snapshot Repository</name>
<url>dav:http://reposerver.mycompany.com:8080/archiva/repository/snapshots/</url>
</snapshotRepository>
</distributionManagement>
...
</project>
+-------------------------------------------------------------------------+

[[2]] Add a build extension to your <<<pom.xml>>> (not required in Maven 2.0.9 and above)

+-------------------------------------------------------------------------+
<project>
...
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav</artifactId>
<version>1.0-beta-2</version>
</extension>
</extensions>
</build>
...
</project>
+-------------------------------------------------------------------------+

** Deploying using other protocols

You can also deploy to the Archiva server using traditional means such as SCP, FTP, etc. For more information on these deployment
techniques, refer to the Maven documentation.

Note that once the files are deployed into the location of the Archiva managed repository, they will not be detected by Archiva until the
next scan takes place, so the interval should be configured to a reasonably frequent setting.
** Deploying Third-Party Artifacts to Archiva using Maven

You can use <<<mvn deploy:deploy-file>>> to deploy single artifacts to Archiva. Once you have the settings file in place as
described above, you can deploy the artifact using this type of command:

+------+
mvn deploy:deploy-file -Dfile=filename.jar -DpomFile=filename.pom
-DrepositoryId=archiva.internal
-Durl=http://repo.mycompany.com:8080/repository/internal/
+------+

For more information, consult the {{{http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html} documentation for the
<<<deploy:deploy-file>>> goal}}

If you wish to use WebDAV to deploy the file, add <<<dav:>>> to the start of the URL as in the previous instructions.

However, on versions of Maven prior to 2.0.9, you will also need to create a file called <<<pom.xml>>>
in the directory from which you intend to execute "<<<mvn
deploy:deploy-file>>>":
+-------+
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>webdav-deploy</artifactId>
<packaging>pom</packaging>
<version>1</version>
<name>Webdav Deployment POM</name>

<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav</artifactId>
<version>1.0-beta-2</version>
</extension>
</extensions>
</build>
</project>
+-------+

This pom will not be deployed with the artifact, it simply serves to make the
WebDAV protocol available to the build process.
Alternately, you can save this file somewhere else, and use "<<<mvn ... -f
/path/to/filename>>>" to force the use of an alternate POM file.
* Deploying via the {Web UI} Form

The easiest way to deploy in the repository is via the Web UI form, which can be accessed in the 'Upload Artifact' section.
Just follow these steps:

[[1]] Fill up the following required fields:

* Group Id - the groupId of the artifact to be deployed.

* Artifact Id - the artifactId of the artifact to be deployed.

* Version - the version of the artifact to be deployed.

* Packaging - the packaging of the artifact to be deployed. (ex. jar, war, ear, etc.)

* Artifact File - the actual artifact to be deployed.

[]

[[2]] Select the repository you want to deploy to. Please note that if you do not have write permission to the repository,
you will not be allowed to deploy in it.

[[3]] Now, if you want Archiva to generate a pom for the artifact, check the Generate Maven 2 POM field.
(Right now, only Maven 2 poms can be generated.) Alternately, supply a POM file to be deployed alongside the artifact.

[[4]] Click Submit and a message will be displayed notifying you if the upload/deployment was successful or not.

[]
These are the files that will be in your repository after deployment:

* artifact

* POM file (if you supplied one or checked Generate Maven 2 POM)

* maven-metadata.xml (this will be created if none exists in the artifact level yet, otherwise it will just be updated)

* maven-metadata.xml.sha1 and maven-metadata.xml.md5 (these will be generated for newly created maven-metadata.xml files, otherwise
they will just be updated)

~~TODO: information for Maven 1, ant tasks, ivy, etc.


+ 36
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/find-artifact.apt View File

@@ -0,0 +1,36 @@
------
Identifying an Artifact
------

Identifying an Artifact

Archiva indexes all of the artifacts that it discovers during the repository scanning process, storing information about their contents.
This includes the checksum of the artifact, which can help to uniquely identify it within the repository.

Archiva includes a feature that allows you to check for the existence of a given artifact in the repository by checksum. This is useful in
identifying a JAR or other artifact located from an external source that does not contain any Maven or version information.

To use this functionality, click the "Find Artifact" link in the left navigation.

When the screen first loads, a Java applet that will allow you to create a local checksum of a given artifact is loaded. Since it is reading the
content of the artifact from the filesystem, it will present a security dialog similar to the following:

[../images/find-artifact-security.png] Java Applet

By trusting the applet, you can checksum files of any size locally and just upload the small checksum to the server. If you opt not to trust the
applet, you must enter the checksum into the web form by hand.

Once you have loaded the page, you have the choice of browsing for a local file to identify, or entering the checksum directly.

[../images/find-artifact.png] Find Artifact

Once you submit the form Archiva will look to match the checksum:

* If more than one artifact matches, a list of results are returned

* If a unique match is found, the individual artifact information page is returned

* If no match is found, a "no results" page is returned



+ 27
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/index.apt View File

@@ -0,0 +1,27 @@
------
Users Guide
------

Users Guide

Welcome to the Archiva user's guide. Getting to know and use Archiva is very simple - please select one of the following documents to learn how to use
Archiva quickly.

* {{{browsing.html} Browsing Archiva repositories}}

* {{{searching.html} Searching Archiva repositories}}

* {{{find-artifact.html} Identifying an unknown artifact by comparing the repository checksum database}}

* {{{using-repository.html} Using Archiva as a repository for Maven, Ivy, etc.}}

* {{{deploy.html} Deploying artifacts to the repository}}

* {{{virtual-repositories.html} Configuring Virtual Repositories}}

* {{{rss.html}RSS Feeds in Archiva}}

[]




+ 61
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/rss.apt View File

@@ -0,0 +1,61 @@
------
RSS Feeds
------
Maria Odea Ching
------
7 May 2008
------

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership. The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License. You may obtain a copy of the License at
~~
~~ http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied. See the License for the
~~ specific language governing permissions and limitations
~~ under the License.

~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/guides/mini/guide-apt-format.html

RSS Feeds

There are two types of rss feeds in Archiva: new artifacts in repo feed and new versions of artifact feed.

* New Artifacts In Repository

The default url for this feed is: <<<http://[hostname]:[port]/archiva/rss/rss_feeds?repoId=[repositoryId]>>>

There are two ways to subscribe to this feed:

1. By copying the default url specified above and adding this to your feed reader. Just make sure to replace the <<<hostname>>>,
<<<port>>> and <<<repositoryId>>>. The <<<repositoryId>>> is the id of the Archiva repo which you want to monitor.

2. Via the feed icon in the Repositories page. Right click on the feed icon in the upper right hand corner of the repository
configuration and copy the link. Then add this link to your feed reader.

* New Versions of an Artifact

The default url for this feed is: <<<http://[hostname]:[port]/archiva/rss/rss_feeds?groupId=[groupId]&artifactId=[artifactId]>>>

You could subscribe to the feed the same way as specified in the New Artifacts In Repository section except that in #1, you
need to specify the <<<groupId>>> and <<<artifactId>>> instead of the <<<repositoryId>>>. And in #2, you need to go to the
Browse section. The rss feed icon is located in the artifactId level.

* Authentication

The authentication method used for the rss feeds is Http Basic Authentication. If your reader supports this, you would be
prompted for a username and password when you subscribe to the feed. Supply your Archiva account credentials for this. Take
note that only users with an Observer role for the specific repository would be able to subscribe to this feed.

If the 'guest' account is enabled for the repository, you would no longer be asked for the username and password when you
subscribe to the feed.

+ 69
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/searching.apt View File

@@ -0,0 +1,69 @@
------
Searching
------
Maria Odea Ching
------
23 Nov 2007
------

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership. The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License. You may obtain a copy of the License at
~~
~~ http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied. See the License for the
~~ specific language governing permissions and limitations
~~ under the License.

~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/guides/mini/guide-apt-format.html


Searching

The Search functionality of Archiva allows a user to search for specific artifact references in the repository.

* What Can Be Searched?

The repository files that are indexed during repository scan can be configured in the Repository Scanning page, in the
Repository Scanning - File Types section (indexable-content). By default, the indexable-content file types are:

+-----+
**/*.txt
**/*.TXT
**/*.block
**/*.config
**/*.pom
**/*.xml
**/*.xsd
**/*.dtd
**/*.tld
+-----+

The contents of all the files in the repository that matches the above configuration will be indexed during repository
scan. So when you type a word in the search box, Archiva will search the index for that query string and return all the
search hits in the form of a list of artifacts. For example you typed in 'classworlds', the search result would contain
the list of artifacts that use or reference 'classworlds'.

Below is a sample screenshot of the search results:

[../images/search-results.jpg] Search Results

When the user clicks a specific artifact in the search results list, Archiva will direct the user in the Artifact Info
page (the same page from the Repository Browse). Otherwise if it is not a pom file (ex. metadata.xml), the file will
appear as a file to be downloaded from the browser.

* Security

The Search functionality respects the repository permissions. If the user is not logged in to Archiva and does a search,
only those repositories with guest permissions will be searched for the query string. And if the user is logged in to
Archiva and does a search, only those repositories in which that user has permission to access will be searched for the
query string.

+ 124
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/using-repository.apt View File

@@ -0,0 +1,124 @@
------
Using as a Repository
------

Configuring Maven 2 to use an Archiva repository

To get your local Maven 2 installation to use an Archiva proxy you need to add the repositories you require to your 'settings.xml'. This file is usually found in ${user.dir}/.m2/settings.xml (see the {{{http://maven.apache.org/settings.html}Settings Reference}}).

How you configure the settings depends on how you would like to utilise the repository. You can add the Archiva repository as an additional repository to others already declared by the project, or lock down the
environment to only use the Archiva repositories (possibly proxying content from a remote repository).

* Locking down to only use Archiva

If you would like Archiva to serve as the only repository used by your Maven installation, you can use the Maven mirror settings to force this behaviour.

First, you need to select the default repository to use when none is configured by adding the following to the <<<settings.xml>>> file:

+-------------------------------------------------------------------------+
<settings>
...
<mirrors>
<mirror>
<id>archiva.default</id>
<url>http://repo.mycompany.com:8080/archiva/repository/internal/</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
...
</settings>
+-------------------------------------------------------------------------+

With this in place, all repository requests will be sent to the internal repository (which by default is configured to proxy the central repository).

If you have separate Archiva repositories that you wish to use, you can add an extra mirror declaration as needed:

+-------------------------------------------------------------------------+
...
<mirror>
<id>archiva.apache.snapshots</id>
<url>http://repo.mycompany.com:8080/archiva/repository/snapshots/</url>
<mirrorOf>apache.snapshots</mirrorOf>
</mirror>
...
+-------------------------------------------------------------------------+

<<WARNING:>> Maven, as of version 2.0.8, does not properly report the correct URL in errors when a mirror is used - so although the Archiva instance is being consulted any error messages will still reflect
the original URL described in the POM.

* Using Archiva as an additional repository
You will need to add one entry for each repository that is setup in Archiva. If your repository contains plugins; remember to also include a \<pluginRepository\> setting.

[[1]] Create a new profile to setup your repositories

+-------------------------------------------------------------------------+
<settings>
...
<profiles>
<profile>
<id>Repository Proxy</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<!-- ******************************************************* -->
<!-- repositories for jar artifacts -->
<!-- ******************************************************* -->
<repositories>
<repository>
...
</repository>
...
</repositories>
<!-- ******************************************************* -->
<!-- repositories for maven plugins -->
<!-- ******************************************************* -->
<pluginRepositories>
<pluginRepository>
...
</pluginRepository>
...
</pluginRepositories>
</profile>
...
</profiles>
...
</settings>
+-------------------------------------------------------------------------+

[[2]] Add your repository configuration to the profile

You can copy the repository configuration from the POM Snippet on the Archiva Administration Page for a normal repository. It should look much like:

+-------------------------------------------------------------------------+
<repository>
<id>repository-1</id>
<url>http://repo.mycompany.com:8080/archiva/repository/internal/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
+-------------------------------------------------------------------------+

[[3]] Add the necessary security configuration

This is only necessary if the guest account does not have read access to the given repository.

+-------------------------------------------------------------------------+
<settings>
...
<servers>
<server>
<id>repository-1</id>
<username>{archiva-user}</username>
<password>{archiva-pwd}</password>
</server>
...
</servers>
...
</settings>
+-------------------------------------------------------------------------+


+ 117
- 0
metadata-rejig-1.2/archiva-docs/src/site/apt/userguide/virtual-repositories.apt View File

@@ -0,0 +1,117 @@
------
Virtual Repositories
------

Virtual Repositories

This is a new feature for Archiva 1.1. The main advantage of virtual repositories (or repository groups) is that you
only need to specify one URL instead of multiple repository URLs if you are using more than 1 proxy repository.

For example, you have the following configuration in your <<<settings.xml>>>:

+-------------------------------------------------------------------------+
<settings>
...
<profiles>
<profile>
<id>Repository Proxy</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>internal.releases</id>
<url>http://localhost:8080/archiva/repository/internal.releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>third.party.repo</id>
<url>http://localhost:8080/archiva/repository/third.party.repo/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots</id>
<url>http://localhost:8080/archiva/repository/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
...
</profiles>
...
</settings>
+-------------------------------------------------------------------------+

If you have a virtual repository configured in Archiva, you only need to configure this in your <<<settings.xml>>>:

+-------------------------------------------------------------------------+
<settings>
...
<profiles>
<profile>
<id>Repository Proxy</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>internal.releases</id>
<url>http://localhost:8080/archiva/repository/[repository_group_id]/</url>
</repository>
</repositories>
</profile>
...
</profiles>
...
</settings>
+-------------------------------------------------------------------------+

And you'll still be able to get all the artifacts that you need. See Configuring Virtual Repositories section for the
steps on how to setup a virtual repo in Archiva.

* How It Works

When Archiva receives a request with a virtual repo (or repo group) URL, Archiva would look for the requested artifact
from the repositories under that group. It would only check the repositories the user has permission to access (meaning
only those repositories which the user has an Obeserver role for). The first resource found for the requested artifact
would be returned.

* Configuring Virtual Repositories

Below are the steps for setting up the virtual repositories:

[[1]] In the webapp, go to the <<<Repository Groups>>> page. To create a virtual repository or repository group,
fill in the <<<Identifier>>> field and click Add Group.

[[2]] To add a repository under this group, choose from the drop-down menu on the lower right hand side of the
repository group box and click Add Repository.

[[3]] Now add the virtual repository URL <<<http://[host]:[port]/archiva/repository/[repository_group_id]/>>>
into your settings.xml the same way you configure regular repositories -- as a <mirror> or as an additional <repository>.

[[4]] If the repositories under the group are secured, you must set your Archiva login credentials in your settings.xml as
well. Please take note that the <server> id should match the repository group identifier.

* Webdav Browse

Webdav Browse for a virtual repository is a read-only view. It displays the merged contents of all the repositories
under that repository group. Just type the url of the virtual repository in your browser in order to view its contents.
User will be asked to authenticate if the 'guest' account is not enabled for the repositories. Only those repositories
which the user has permission to access will be shown.



+ 33
- 0
metadata-rejig-1.2/archiva-docs/src/site/assembly/docs.xml View File

@@ -0,0 +1,33 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<assembly>
<id>docs</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>target/site</directory>
<outputDirectory>/docs/</outputDirectory>
</fileSet>
</fileSets>
</assembly>


+ 71
- 0
metadata-rejig-1.2/archiva-docs/src/site/resources/css/site.css View File

@@ -0,0 +1,71 @@
a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
background: none;
padding-right: 0;
}

body ul {
list-style-type: square;
}

#downloadbox {
float: right;
margin-left: 2em;
padding-left: 1em;
padding-right: 1em;
padding-bottom: 1em;
border: 1px solid #999;
background-color: #eee;
width: 17.5em;
}

#downloadbox h5 {
color: #000;
margin: 0;
border-bottom: 1px solid #aaaaaa;
font-size: smaller;
padding: 0;
margin-top: 1em;
}

#downloadbox p {
margin-top: 1em;
margin-bottom: 0;
}

#downloadbox li {
text-indent: inherit;
}

div.p {
margin-top: 5px;
margin-bottom: 10px;
}

pre.commandline {
border: 1px solid #bbb;
background-color: white;
margin-top: 5px;
margin-bottom: 5px;
font-size: 10pt;
padding: 15px;
color: gray;
}

pre.commandline .input {
color: #55f;
}

pre.commandline .command {
color: black;
font-weight: bold;
}

#banner {
background: none;
}

#banner img {
margin: 10px;
}



BIN
metadata-rejig-1.2/archiva-docs/src/site/resources/images/archiva-report.jpg View File


BIN
metadata-rejig-1.2/archiva-docs/src/site/resources/images/find-artifact-security.png View File


BIN
metadata-rejig-1.2/archiva-docs/src/site/resources/images/find-artifact.png View File


BIN
metadata-rejig-1.2/archiva-docs/src/site/resources/images/search-results.jpg View File


BIN
metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/admin.png View File


BIN
metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/maintenance.png View File


BIN
metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/project.png View File


BIN
metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/proxy.png View File


BIN
metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/reports.png View File


BIN
metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/rss.png View File


BIN
metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/search.png View File


BIN
metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/security.png View File


BIN
metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/upload.png View File


BIN
metadata-rejig-1.2/archiva-docs/src/site/resources/images/tour/virtual-repos.png View File


+ 78
- 0
metadata-rejig-1.2/archiva-docs/src/site/site.xml View File

@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<project>
<body>
<breadcrumbs>
<item name="1.1.1" href="/docs/1.1.1" />
</breadcrumbs>

<menu name="Introduction">
<item name="Quick Start" href="/quick-start.html" />
<item name="Feature Tour" href="/tour/index.html" />
<item name="Release Notes" href="/release-notes.html" />
</menu>

<menu name="Users Guide">
<item name="Browsing" href="/userguide/browsing.html" />
<item name="Searching" href="/userguide/searching.html" />
<item name="Identifying an Artifact" href="/userguide/find-artifact.html" />
<item name="Using as a repository" href="/userguide/using-repository.html" />
<item name="Deploying to repository" href="/userguide/deploy.html" />
<item name="Configuring Virtual Repositories" href="/userguide/virtual-repositories.html" />
<item name="Rss Feeds in Archiva" href="/userguide/rss.html"/>
</menu>

<menu name="Administrators Guide">
<!-- TODO: add an overview in future versions
<item name="Structure of Archiva" href="/adminguide/structure.html" />
-->
<item name="Installing Archiva" href="/adminguide/installing.html" collapse="true">
<item name="Installing Standalone" href="/adminguide/standalone.html" />
<item name="Installing as a WAR" href="/adminguide/webapp.html" />
</item>
<item name="Databases" href="/adminguide/databases.html" />
<item name="Security" href="/adminguide/security.html" collapse="true">
<item name="Roles" href="/adminguide/roles.html" />
<item name="Customising" href="/adminguide/customising-security.html" />
<!-- TODO: for a future version
<item name="Using LDAP" href="/adminguide/ldap.html" />
-->
</item>
<item name="Runtime Configuration" href="/adminguide/configuration.html" collapse="true">
<item name="Repositories" href="/adminguide/repositories.html" />
<item name="Proxy Connectors" href="/adminguide/proxy-connectors.html" />
<item name="Network Proxies" href="/adminguide/network-proxies.html" />
<item name="Legacy (Maven 1) Support" href="/adminguide/legacy.html" />
<item name="Consumers" href="/adminguide/consumers.html" />
</item>
<item name="Configuration Files" href="/adminguide/configuration-files.html" />
<item name="Reports" href="/adminguide/reports.html" />
</menu>

<menu name="Customising Archiva">
<item name="Writing a Consumer Plugin" href="/customising/writing-consumer.html" />
</menu>

<menu name="More Information">
<item name="Archiva Wiki" href="http://cwiki.apache.org/confluence/display/ARCHIVA/Index" />
</menu>
</body>
</project>

+ 26
- 0
metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/admin.xml View File

@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Graphical Administration</title>
<author email="brett@apache.org">Brett Porter</author>
</properties>
<head>
</head>
<body>
<section name="Graphical Administration">
<div style="text-align: center">
<img src="../images/tour/admin.png" width="640" height="401" alt="" />
<p>
Archiva has a comprehensive web-based administration interface for configuring repositories,
remote proxies, scheduled jobs and more. The configuration is kept in sync with the XML
configuration files so that they can also be hand-edited if necessary.
</p>
<p>
<a href="upload.html">Previous: Artifact Upload</a> |
<strong>Graphical Administration</strong> |
<a href="virtual-repos.html">Next: Virtual Repositories</a>
</p>
</div>
</section>
</body>
</document>

+ 104
- 0
metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/index.xml View File

@@ -0,0 +1,104 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Feature Tour</title>
<author email="brett@apache.org">Brett Porter</author>
</properties>
<head>
</head>
<body>
<style type="text/css">
table {
width: inherit;
margin-left: 5em;
}
tr {
text-align: center;
}
td {
font-size: inherit;
}
table.bodyTable tr.a {
background-color: inherit;
}
table.bodyTable tr.b {
background-color: inherit;
}
</style>
<section name="Archiva Feature Tour">

<p>
Archiva is a feature rich repository manager. Below is a short tour of some of the features that are available.
</p>
<table>
<tr>
<td>
<a href="project.html">
<img src="../images/tour/project.png" width="150" height="93" style="border: 1px solid silver; margin-bottom: 0.25em" alt="" /><br/>
1. Project Information
</a>
</td>
<td>
<a href="search.html">
<img src="../images/tour/search.png" width="150" height="93" style="border: 1px solid silver; margin-bottom: 0.25em" alt="" /><br/>
2. Artifact Search
</a>
</td>
<td>
<a href="proxy.html">
<img src="../images/tour/proxy.png" width="150" height="93" style="border: 1px solid silver; margin-bottom: 0.25em" alt="" /><br/>
3. Remote Proxying Cache
</a>
</td>
<td>
<a href="upload.html">
<img src="../images/tour/upload.png" width="150" height="93" style="border: 1px solid silver; margin-bottom: 0.25em" alt="" /><br/>
4. Artifact Upload
</a>
</td>
</tr>
<tr>
<td>
<a href="admin.html">
<img src="../images/tour/admin.png" width="150" height="93" style="border: 1px solid silver; margin-left: 0.25em; margin-bottom: 0.25em" alt="" /><br/>
5. Graphical Administration
</a>
</td>
<td>
<a href="virtual-repos.html">
<img src="../images/tour/virtual-repos.png" width="150" height="93" style="border: 1px solid silver; margin-left: 0.25em; margin-bottom: 0.25em" alt="" /><br/>
6. Virtual Repositories
</a>
</td>
<td>
<a href="rss.html">
<img src="../images/tour/rss.png" width="150" height="93" style="border: 1px solid silver; margin-left: 0.25em; margin-bottom: 0.25em" alt="" /><br/>
7. RSS Feeds
</a>
</td>
<td>
<a href="security.html">
<img src="../images/tour/security.png" width="150" height="93" style="border: 1px solid silver; margin-left: 0.25em; margin-bottom: 0.25em" alt="" /><br/>
8. Role-based Security
</a>
</td>
</tr>
<tr>
<td>
<a href="reports.html">
<img src="../images/tour/reports.png" width="150" height="93" style="border: 1px solid silver; margin-left: 0.25em; margin-bottom: 0.25em" alt="" /><br/>
9. Integrity Reports
</a>
</td>
<td>
<a href="maintenance.html">
<img src="../images/tour/maintenance.png" width="150" height="93" style="border: 1px solid silver; margin-left: 0.25em; margin-bottom: 0.25em" alt="" /><br/>
10. Maintenance
</a>
</td>
</tr>
</table>
</section>
</body>
</document>

+ 28
- 0
metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/maintenance.xml View File

@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Maintenance</title>
<author email="oching@apache.org">Maria Odea Ching</author>
</properties>
<head>
</head>
<body>
<section name="Maintenance">
<div style="text-align: center">
<img src="../images/tour/maintenance.png" width="640" height="401" alt="" />
<p>
Archiva has utilities called consumers that can be used for maintaining the
Archiva repositories. These can be configured or activated in the Repository
Scanning section of the webapp. The configuration are stored in Archiva's
xml configuration files, meaning you can also hand-edit these config files to
enable or disable these consumers.
</p>
<p>
<a href="reports.html">Previous: Integrity Reports</a> |
<strong>Maintenance</strong> |
<a href="index.html">Next: Feature Tour</a>
</p>
</div>
</section>
</body>
</document>

+ 26
- 0
metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/project.xml View File

@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Project Information</title>
<author email="brett@apache.org">Brett Porter</author>
</properties>
<head>
</head>
<body>
<section name="Project Information">
<div style="text-align: center">
<img src="../images/tour/project.png" width="640" height="401" alt="" />
<p>
Archiva provides an informative display for projects and artifacts stored in the repository.
This includes a user-friendly display of the Maven project information, as well as the relationships
between projects.
</p>
<p>
<a href="index.html">Previous: Feature Tour</a> |
<strong>Project Information</strong> |
<a href="search.html">Next: Artifact Search</a>
</p>
</div>
</section>
</body>
</document>

+ 26
- 0
metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/proxy.xml View File

@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Remote Proxying Cache</title>
<author email="brett@apache.org">Brett Porter</author>
</properties>
<head>
</head>
<body>
<section name="Remote Proxying Cache">
<div style="text-align: center">
<img src="../images/tour/proxy.png" width="640" height="401" alt="" />
<p>
Archiva can operate as a proxy for remote repositories, allowing you to improve build
performance by caching artifacts in a closer network location, and control artifact
usage through the use of white and black lists on proxy connectors.
</p>
<p>
<a href="search.html">Previous: Artifact Search</a> |
<strong>Remote Proxying Cache</strong> |
<a href="upload.html">Next: Artifact Upload</a>
</p>
</div>
</section>
</body>
</document>

+ 26
- 0
metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/reports.xml View File

@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Integrity Reports</title>
<author email="brett@apache.org">Brett Porter</author>
</properties>
<head>
</head>
<body>
<section name="Integrity Reports">
<div style="text-align: center">
<img src="../images/tour/reports.png" width="640" height="401" alt="" />
<p>
Archiva monitors the state of the managed repositories and keeps track of
potential problems to allow improvement of metadata and to assist in
troubleshooting problems.
</p>
<p>
<a href="security.html">Previous: Role-based Security</a> |
<strong>Integrity Reports</strong> |
<a href="maintenance.html">Next: Maintenance</a>
</p>
</div>
</section>
</body>
</document>

+ 25
- 0
metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/rss.xml View File

@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<document>
<properties>
<title>RSS Feeds</title>
<author email="oching@apache.org">Maria Odea Ching</author>
</properties>
<head>
</head>
<body>
<section name="RSS Feeds">
<div style="text-align: center">
<img src="../images/tour/rss.png" width="640" height="401" alt="" />
<p>
Archiva provides RSS feeds for new artifacts in the repositories and new versions
of a specific artifact.
</p>
<p>
<a href="virtual-repos.html">Previous: Virtual Repositories</a> |
<strong>RSS Feeds</strong> |
<a href="security.html">Next: Role-based Security</a>
</p>
</div>
</section>
</body>
</document>

+ 26
- 0
metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/search.xml View File

@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Artifact Search</title>
<author email="brett@apache.org">Brett Porter</author>
</properties>
<head>
</head>
<body>
<section name="Artifact Search">
<div style="text-align: center">
<img src="../images/tour/search.png" width="640" height="401" alt="" />
<p>
Archiva has both a user-friendly browsing interface, and powerful search functionalities. The contents of all artifacts are indexed,
including Maven project information and Java class information to facilitate locating code within any repository.
By using the "Find Artifact" feature, you can identify unknown artifacts based on the database of known checksums for known artifacts.
</p>
<p>
<a href="project.html">Previous: Project Information</a> |
<strong>Artifact Search</strong> |
<a href="proxy.html">Next: Remote Proxying Cache</a>
</p>
</div>
</section>
</body>
</document>

+ 26
- 0
metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/security.xml View File

@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Role-based Security</title>
<author email="brett@apache.org">Brett Porter</author>
</properties>
<head>
</head>
<body>
<section name="Role-based Security">
<div style="text-align: center">
<img src="../images/tour/security.png" width="640" height="401" alt="" />
<p>
Archiva uses the Redback security framework to provide flexible role-based security controls for repositories.
You can use the graphical interface to maintain user accounts, as well as secure repositories for read and/or write
access for individuals, or given roles.
</p>
<p>
<a href="rss.html">Previous: RSS Feeds</a> |
<strong>Role-based Security</strong> |
<a href="reports.html">Next: Integrity Reports</a>
</p>
</div>
</section>
</body>
</document>

+ 25
- 0
metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/upload.xml View File

@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Artifact Upload</title>
<author email="oching@apache.org">Maria Odea Ching</author>
</properties>
<head>
</head>
<body>
<section name="Artifact Upload">
<div style="text-align: center">
<img src="../images/tour/upload.png" width="640" height="401" alt="" />
<p>
Archiva now supports artifact uploads via UI. A pom file can also be included
in the upload or Archiva can generate one during the upload.
</p>
<p>
<a href="proxy.html">Previous: Remote Proxying Cache</a> |
<strong>Artifact Upload</strong> |
<a href="admin.html">Next: Graphical Administration</a>
</p>
</div>
</section>
</body>
</document>

+ 26
- 0
metadata-rejig-1.2/archiva-docs/src/site/xdoc/tour/virtual-repos.xml View File

@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<document>
<properties>
<title>Virtual Repositories</title>
<author email="oching@apache.org">Maria Odea Ching</author>
</properties>
<head>
</head>
<body>
<section name="Virtual Repositories">
<div style="text-align: center">
<img src="../images/tour/virtual-repos.png" width="640" height="401" alt="" />
<p>
Archiva implements the concept of virtual repositories, wherein a set of
Archiva repositories can be grouped together under one URL and that one URL
can be used by clients (s.a. Maven) to download from these repositories.
</p>
<p>
<a href="admin.html">Previous: Graphical Administration</a> |
<strong>Virtual Repositories</strong> |
<a href="rss.html">Next: RSS Feeds</a>
</p>
</div>
</section>
</body>
</document>

+ 293
- 0
metadata-rejig-1.2/archiva-jetty/pom.xml View File

@@ -0,0 +1,293 @@
<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.apache.archiva</groupId>
<artifactId>archiva</artifactId>
<version>1.2-SNAPSHOT</version>
</parent>
<artifactId>archiva-jetty</artifactId>
<packaging>pom</packaging>
<!-- This is filtered into the scripts, so should be set to Apache Archiva -->
<name>Apache Archiva</name>
<dependencies>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>start</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-webapp</artifactId>
<type>war</type>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-docs</artifactId>
<type>zip</type>
<classifier>docs</classifier>
</dependency>
<!-- Runtime dependencies that need to be included in the generated binaries -->
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-naming</artifactId>
<version>${jetty.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
<version>${jetty.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-api-2.0</artifactId>
<version>${jetty.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-plus</artifactId>
<version>${jetty.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.1.3.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.6.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>commons-el</groupId>
<artifactId>commons-el</artifactId>
<version>1.0</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler</artifactId>
<version>5.5.15</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>tomcat</groupId>
<artifactId>jasper-runtime</artifactId>
<version>5.5.15</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl104-over-slf4j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler-jdt</artifactId>
<version>5.5.15</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>org.eclipse.jdt</groupId>
<artifactId>core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<daemons>
<daemon>
<id>archiva</id>
<mainClass>org.mortbay.start.Main</mainClass>
<commandLineArguments>
<commandLineArgument>conf/jetty.xml</commandLineArgument>
<commandLineArgument>conf/jetty-logging.xml</commandLineArgument>
</commandLineArguments>
<platforms>
<platform>jsw</platform>
</platforms>
<generatorConfigurations>
<generatorConfiguration>
<generator>jsw</generator>
<configuration>
<property>
<name>wrapper.console.loglevel</name>
<value>INFO</value>
</property>
<property>
<name>wrapper.java.additional.1.stripquotes</name>
<value>TRUE</value>
</property>
<property>
<name>set.default.REPO_DIR</name>
<value>lib</value>
</property>
<property>
<name>wrapper.logfile</name>
<value>%ARCHIVA_BASE%/logs/wrapper.log</value>
</property>
<property>
<name>wrapper.app.parameter.2</name>
<value>%ARCHIVA_BASE%/conf/jetty.xml</value>
</property>
<property>
<name>wrapper.app.parameter.3</name>
<value>%ARCHIVA_BASE%/conf/jetty-logging.xml</value>
</property>
<property>
<name>app.base.envvar</name>
<value>ARCHIVA_BASE</value>
</property>
<property>
<name>wrapper.on_exit.default</name>
<value>RESTART</value>
</property>
<property>
<name>wrapper.on_exit.0</name>
<value>SHUTDOWN</value>
</property>
<property>
<name>wrapper.restart.delay</name>
<value>30</value>
</property>
</configuration>
<includes>
<include>linux-x86-32</include>
<include>linux-x86-64</include>
<include>macosx-x86-universal-32</include>
<include>solaris-x86-32</include>
<include>solaris-sparc-32</include>
<include>solaris-sparc-64</include>
<include>windows-x86-32</include>
</includes>
</generatorConfiguration>
</generatorConfigurations>
<jvmSettings>
<systemProperties>
<systemProperty>appserver.home=.</systemProperty>
<systemProperty>appserver.base=%ARCHIVA_BASE%</systemProperty>
<!-- can't set this at present, it moves the databases if ARCHIVA_BASE is not set
<systemProperty>derby.system.home=%ARCHIVA_BASE%/logs</systemProperty>
-->
<systemProperty>jetty.logs=%ARCHIVA_BASE%/logs</systemProperty>
</systemProperties>
</jvmSettings>
</daemon>
</daemons>
<repoPath>lib</repoPath>
<repositoryLayout>flat</repositoryLayout>
<assembleDirectory>target/generated-resources/appassembler/jsw/archiva</assembleDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>generate-daemons</goal>
<goal>create-repository</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptor>src/main/assembly/bin.xml</descriptor>
<finalName>apache-archiva-${version}</finalName>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>config</id>
<phase>process-resources</phase>
<configuration>
<tasks>
<copy todir="target/generated-resources/appassembler/jsw/archiva/conf">
<fileset dir="src/main/conf" />
</copy>
<mkdir dir="target/generated-resources/appassembler/jsw/archiva/logs" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<configuration>
<supplementalModels>
<supplementalModel>notice-supplements.xml</supplementalModel>
</supplementalModels>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>codehaus.snapshots</id>
<url>http://snapshots.repository.codehaus.org/</url>
</pluginRepository>
</pluginRepositories>
</project>

+ 141
- 0
metadata-rejig-1.2/archiva-jetty/src/main/appended-resources/notice-supplements.xml View File

@@ -0,0 +1,141 @@
<supplementalDataModels>
<supplement>
<project>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<name>Ant</name>
<url>http://ant.apache.org/</url>
<organization>
<name>The Apache Software Foundation</name>
<url>http://www.apache.org/</url>
</organization>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project>
<groupId>geronimo-spec</groupId>
<artifactId>geronimo-spec-jta</artifactId>
<name>Geronimo :: Java Transaction API Specification</name>
<url>http://geronimo.apache.org/</url>
<organization>
<name>The Apache Software Foundation</name>
<url>http://www.apache.org/</url>
</organization>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<name>JavaBeans Activation Framework (JAF)</name>
<organization>
<name>Sun Microsystems</name>
<url>http://www.sun.com/</url>
</organization>
<licenses>
<license>
<name>Common Development and Distribution License (CDDL) v1.0</name>
<url>https://glassfish.dev.java.net/public/CDDLv1.0.html</url>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<name>JavaMail API</name>
<organization>
<name>Sun Microsystems</name>
<url>http://www.sun.com/</url>
</organization>
<licenses>
<license>
<name>Common Development and Distribution License (CDDL) v1.0</name>
<url>https://glassfish.dev.java.net/public/CDDLv1.0.html</url>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<name>Xerces</name>
<url>http://xerces.apache.org/</url>
<organization>
<name>The Apache Software Foundation</name>
<url>http://www.apache.org/</url>
</organization>
<licenses>
<license>
<name>The Apache Software License, Version 1.1</name>
<url>http://www.apache.org/licenses/LICENSE</url>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler</artifactId>
<name>Tomcat Jasper Compiler</name>
<organization>
<name>The Apache Software Foundation</name>
<url>http://www.apache.org/</url>
</organization>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler-jdt</artifactId>
<name>Tomcat Jasper Compiler JDT</name>
<organization>
<name>The Apache Software Foundation</name>
<url>http://www.apache.org/</url>
</organization>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project>
<groupId>tomcat</groupId>
<artifactId>jasper-runtime</artifactId>
<name>Tomcat Jasper Runtime</name>
<organization>
<name>The Apache Software Foundation</name>
<url>http://www.apache.org/</url>
</organization>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
</project>
</supplement>
</supplementalDataModels>

+ 119
- 0
metadata-rejig-1.2/archiva-jetty/src/main/assembly/bin.xml View File

@@ -0,0 +1,119 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<assembly>
<id>bin</id>
<formats>
<format>tar.gz</format>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>target/generated-resources/appassembler/jsw/archiva/apps</directory>
<outputDirectory>apps</outputDirectory>
</fileSet>
<fileSet>
<directory>target/generated-resources/appassembler/jsw/archiva/conf</directory>
<outputDirectory>conf</outputDirectory>
</fileSet>
<fileSet>
<directory>target/generated-resources/appassembler/jsw/archiva/lib</directory>
<outputDirectory>lib</outputDirectory>
<excludes>
<!-- avoid what is pulled in by the appassembler plugin, and the archiva dependencies -->
<exclude>archiva-*</exclude>
<exclude>maven-metadata-appassembler.xml</exclude>
</excludes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>target/generated-resources/appassembler/jsw/archiva/logs</directory>
<outputDirectory>logs</outputDirectory>
</fileSet>
<fileSet>
<directory>target/generated-resources/appassembler/jsw/archiva/bin</directory>
<outputDirectory>bin</outputDirectory>
<includes>
<include>archiva</include>
</includes>
<fileMode>0755</fileMode>
<lineEnding>unix</lineEnding>
</fileSet>
<fileSet>
<directory>target/generated-resources/appassembler/jsw/archiva/bin</directory>
<outputDirectory>bin</outputDirectory>
<includes>
<include>wrapper-linux-x86-32</include>
<include>wrapper-linux-x86-64</include>
<include>wrapper-macosx-universal-32</include>
<include>wrapper-solaris-x86-32</include>
<include>wrapper-solaris-sparc-32</include>
<include>wrapper-solaris-sparc-64</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>target/generated-resources/appassembler/jsw/archiva/bin</directory>
<outputDirectory>bin</outputDirectory>
<includes>
<include>archiva.bat</include>
</includes>
<fileMode>0755</fileMode>
<lineEnding>dos</lineEnding>
</fileSet>
<fileSet>
<directory>target/generated-resources/appassembler/jsw/archiva/bin</directory>
<outputDirectory>bin</outputDirectory>
<includes>
<include>wrapper-windows-x86-32.exe</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>target/maven-shared-archive-resources/META-INF/</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>NOTICE</include>
</includes>
</fileSet>
<fileSet>
<directory>src/main/resources/</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>LICENSE</include>
</includes>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<unpack>true</unpack>
<outputDirectory>apps/archiva</outputDirectory>
<includes>
<include>org.apache.archiva:archiva-webapp</include>
</includes>
</dependencySet>
<dependencySet>
<unpack>true</unpack>
<includes>
<include>org.apache.archiva:archiva-docs:zip:docs</include>
</includes>
</dependencySet>
</dependencySets>
</assembly>


+ 1
- 0
metadata-rejig-1.2/archiva-jetty/src/main/conf/archiva.xml View File

@@ -0,0 +1 @@
<configuration />

+ 32
- 0
metadata-rejig-1.2/archiva-jetty/src/main/conf/jetty-logging.xml View File

@@ -0,0 +1,32 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">


<!-- =============================================================== -->
<!-- Configure stderr and stdout to a Jetty rollover log file -->
<!-- this configuration file should be used in combination with -->
<!-- other configuration files. e.g. -->
<!-- java -jar start.jar etc/jetty-logging.xml etc/jetty.xml -->
<!-- =============================================================== -->
<Configure id="Server" class="org.mortbay.jetty.Server">

<New id="ServerLog" class="java.io.PrintStream">
<Arg>
<New class="org.mortbay.util.RolloverFileOutputStream">
<Arg><SystemProperty name="jetty.logs" default="./logs"/>/yyyy_mm_dd.stderrout.log</Arg>
<Arg type="boolean">false</Arg>
<Arg type="int">90</Arg>
<Arg><Call class="java.util.TimeZone" name="getTimeZone"><Arg>GMT</Arg></Call></Arg>
<Get id="ServerLogName" name="datedFilename"/>
</New>
</Arg>
</New>

<Call class="org.mortbay.log.Log" name="info"><Arg>Redirecting stderr/stdout to <Ref id="ServerLogName"/></Arg></Call>
<Call class="java.lang.System" name="setErr"><Arg><Ref id="ServerLog"/></Arg></Call>
<Call class="java.lang.System" name="setOut"><Arg><Ref id="ServerLog"/></Arg></Call>

</Configure>




+ 341
- 0
metadata-rejig-1.2/archiva-jetty/src/main/conf/jetty.xml View File

@@ -0,0 +1,341 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<!-- =============================================================== -->
<!-- Configure the Jetty Server -->
<!-- -->
<!-- Documentation of this file format can be found at: -->
<!-- http://docs.codehaus.org/display/JETTY/jetty.xml -->
<!-- -->
<!-- =============================================================== -->


<Configure id="Server" class="org.mortbay.jetty.Server">

<!-- =========================================================== -->
<!-- Server Thread Pool -->
<!-- =========================================================== -->
<Set name="ThreadPool">
<!-- Default bounded blocking threadpool
-->
<New class="org.mortbay.thread.BoundedThreadPool">
<Set name="minThreads">10</Set>
<Set name="maxThreads">250</Set>
<Set name="lowThreads">25</Set>
</New>

<!-- Optional Java 5 bounded threadpool with job queue
<New class="org.mortbay.thread.concurrent.ThreadPool">
<Set name="corePoolSize">250</Set>
<Set name="maximumPoolSize">250</Set>
</New>
-->
</Set>

<!-- =========================================================== -->
<!-- Set connectors -->
<!-- =========================================================== -->
<!-- One of each type! -->
<!-- =========================================================== -->

<!-- Use this connector for many frequently idle connections
and for threadless continuations.
-->
<Call name="addConnector">
<Arg>
<New class="org.mortbay.jetty.nio.SelectChannelConnector">
<Set name="host"><SystemProperty name="jetty.host"/></Set>
<Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>
<Set name="maxIdleTime">30000</Set>
<Set name="Acceptors">2</Set>
<Set name="statsOn">false</Set>
<Set name="confidentialPort">8443</Set>
<Set name="lowResourcesConnections">5000</Set>
<Set name="lowResourcesMaxIdleTime">5000</Set>
</New>
</Arg>
</Call>

<!-- Use this connector if NIO is not available.
<Call name="addConnector">
<Arg>
<New class="org.mortbay.jetty.bio.SocketConnector">
<Set name="port">8081</Set>
<Set name="maxIdleTime">50000</Set>
<Set name="lowResourceMaxIdleTime">1500</Set>
</New>
</Arg>
</Call>
-->

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- To add a HTTPS SSL listener -->
<!-- see jetty-ssl.xml to add an ssl connector. use -->
<!-- java -jar start.jar etc/jetty.xml etc/jetty-ssl.xml -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- =========================================================== -->
<!-- Set up global session ID manager -->
<!-- =========================================================== -->
<!--
<Set name="sessionIdManager">
<New class="org.mortbay.jetty.servlet.HashSessionIdManager">
<Set name="workerName">node1</Set>
</New>
</Set>
-->

<!-- =========================================================== -->
<!-- Set handler Collection Structure -->
<!-- =========================================================== -->
<Set name="handler">
<New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.mortbay.jetty.Handler">
<Item>
<New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
</Item>
<Item>
<New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>
</Item>
<Item>
<New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/>
</Item>
</Array>
</Set>
</New>
</Set>
<!-- =========================================================== -->
<!-- Configure the context deployer -->
<!-- A context deployer will deploy contexts described in -->
<!-- configuration files discovered in a directory. -->
<!-- The configuration directory can be scanned for hot -->
<!-- deployments at the configured scanInterval. -->
<!-- -->
<!-- This deployer is configured to deploy contexts configured -->
<!-- in the $JETTY_HOME/contexts directory -->
<!-- -->
<!-- =========================================================== -->
<Call name="addLifeCycle">
<Arg>
<New class="org.mortbay.jetty.deployer.ContextDeployer">
<Set name="contexts"><Ref id="Contexts"/></Set>
<Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
<Set name="scanInterval">1</Set>
</New>
</Arg>
</Call>

<!-- =========================================================== -->
<!-- Configure the webapp deployer. -->
<!-- A webapp deployer will deploy standard webapps discovered -->
<!-- in a directory at startup, without the need for additional -->
<!-- configuration files. It does not support hot deploy or -->
<!-- non standard contexts (see ContextDeployer above). -->
<!-- -->
<!-- This deployer is configured to deploy webapps from the -->
<!-- $JETTY_HOME/webapps directory -->
<!-- -->
<!-- Normally only one type of deployer need be used. -->
<!-- -->
<!-- =========================================================== -->
<Call name="addLifeCycle">
<Arg>
<New class="org.mortbay.jetty.deployer.WebAppDeployer">
<Set name="contexts"><Ref id="Contexts"/></Set>
<Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/apps</Set>
<Set name="parentLoaderPriority">false</Set>
<Set name="extract">true</Set>
<Set name="allowDuplicates">false</Set>
</New>
</Arg>
</Call>

<!-- =========================================================== -->
<!-- Configure Request Log -->
<!-- Request logs may be configured for the entire server here, -->
<!-- or they can be configured for a specific web app in a -->
<!-- contexts configuration (see $(jetty.home)/contexts/test.xml -->
<!-- for an example). -->
<!-- =========================================================== -->
<Ref id="RequestLog">
<Set name="requestLog">
<New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog">
<Set name="filename"><SystemProperty name="jetty.logs" default="./logs"/>/yyyy_mm_dd.request.log</Set>
<Set name="filenameDateFormat">yyyy_MM_dd</Set>
<Set name="retainDays">90</Set>
<Set name="append">true</Set>
<Set name="extended">true</Set>
<Set name="logCookies">false</Set>
<Set name="LogTimeZone">GMT</Set>
</New>
</Set>
</Ref>

<!-- =========================================================== -->
<!-- extra options -->
<!-- =========================================================== -->
<Set name="stopAtShutdown">true</Set>
<Set name="sendServerVersion">true</Set>
<Set name="sendDateHeader">true</Set>
<Set name="gracefulShutdown">1000</Set>


<!-- =========================================================== -->
<!-- JNDI java:comp/env -->
<!-- To use JNDI with Jetty, you will need to tell your -->
<!-- WebAppContext to process the naming related items in -->
<!-- web.xml. For an example of how to do that, see the test -->
<!-- webapp below. More information can be found at -->
<!-- http://docs.codehaus.org/display/JETTY/Jetty+Wiki -->
<!-- =========================================================== -->


<!-- Configuring <resource-ref> and <resource-env-ref>s -->
<!-- -->
<!-- The following are examples of setting up a resource that -->
<!-- can be referenced in a web.xml file as a <resource-ref> or -->
<!-- a <resource-env-ref>. The first argument is the name of the -->
<!-- resource relative to java:comp/env and must be the SAME as -->
<!-- the <res-ref-name> or <resource-env-ref-name> in web.xml. -->
<!-- The second argument is the construction of the resource -->
<!-- object. Any object at all can be configured. -->


<!-- These examples set up a javax.sql.DataSource around an -->
<!-- XADataSource that is provided by the Derby relational db. -->
<!-- The DataSource wrapper that is registered in JNDI is -->
<!-- provided by Atomikos, and works with the Atomikos -->
<!-- transaction manager configured further below. To use these -->
<!-- examples, download Atomikos http://www.atomikos.com and -->
<!-- Derby http://db.apache.org/derby -->


<!-- Configuring Transactions -->
<!-- -->
<!-- The following is a example of a setting up a JTA -->
<!-- transaction manager that can be referenced by looking up -->
<!-- java:comp/UserTransaction. Note that this is just an -->
<!-- example and if you uncomment it, you will need to download -->
<!-- the atomikos jar (see http://www.atomikos.com/download.html)-->
<!-- You can configure any transaction manager that implements -->
<!-- javax.transaction.UserTransaction. -->



<!-- =========================================================== -->
<!-- Configurations for WebAppContexts -->
<!-- Sequence of configurations to be applied to a webapp. -->
<!-- =========================================================== -->
<Array id="plusConfig" type="java.lang.String">
<Item>org.mortbay.jetty.webapp.WebInfConfiguration</Item>
<Item>org.mortbay.jetty.plus.webapp.EnvConfiguration</Item>
<Item>org.mortbay.jetty.plus.webapp.Configuration</Item>
<Item>org.mortbay.jetty.webapp.JettyWebXmlConfiguration</Item>
<Item>org.mortbay.jetty.webapp.TagLibConfiguration</Item>
</Array>

<!-- =========================================================== -->
<!-- Deploy all webapps in webapps-plus -->
<!-- =========================================================== -->
<Call class="org.mortbay.jetty.webapp.WebAppContext" name="addWebApplications">
<Arg><Ref id="Contexts"/></Arg>
<Arg>./apps</Arg>
<Arg>org/mortbay/jetty/webapp/webdefault.xml</Arg>
<Arg><Ref id="plusConfig"/></Arg>
<Arg type="boolean">True</Arg>
<Arg type="boolean">False</Arg>
</Call>

<!-- ARCHIVA CONFIG -->
<New id="validation_mail" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>mail/Session</Arg>
<Arg>
<New class="org.mortbay.naming.factories.MailSessionReference">
<Set name="user"></Set>
<Set name="password"></Set>
<Set name="properties">
<New class="java.util.Properties">
<Put name="mail.smtp.host">localhost</Put>
</New>
</Set>
</New>
</Arg>
</New>

<!-- Archiva database -->
<New id="archiva" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/archiva</Arg>
<Arg>
<New class="org.apache.commons.dbcp.BasicDataSource">
<Set name="driverClassName">org.apache.derby.jdbc.EmbeddedDataSource</Set>
<Set name="url">jdbc:derby:<SystemProperty name="appserver.base" default=".."/>/data/databases/archiva</Set>
<Set name="username">sa</Set>
<Call name="addConnectionProperty">
<Arg>create</Arg>
<Arg>true</Arg>
</Call>
</New>
</Arg>
</New>

<New id="archivaShutdown" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/archivaShutdown</Arg>
<Arg>
<New class="org.apache.commons.dbcp.BasicDataSource">
<Set name="driverClassName">org.apache.derby.jdbc.EmbeddedDataSource</Set>
<Set name="url">jdbc:derby:<SystemProperty name="appserver.base" default=".."/>/data/databases/archiva</Set>
<Set name="username">sa</Set>
<Call name="addConnectionProperty">
<Arg>shutdown</Arg>
<Arg>true</Arg>
</Call>
</New>
</Arg>
</New>
<!-- Users / Security Database -->
<New id="users" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/users</Arg>
<Arg>
<New class="org.apache.derby.jdbc.EmbeddedDataSource">
<Set name="DatabaseName"><SystemProperty name="appserver.base" default=".."/>/data/databases/users</Set>
<Set name="user">sa</Set>
<Set name="createDatabase">create</Set>
</New>
</Arg>
</New>

<New id="usersShutdown" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/usersShutdown</Arg>
<Arg>
<New class="org.apache.derby.jdbc.EmbeddedDataSource">
<Set name="DatabaseName"><SystemProperty name="appserver.base" default=".."/>/data/databases/users</Set>
<Set name="user">sa</Set>
<Set name="shutdownDatabase">shutdown</Set>
</New>
</Arg>
</New>
</Configure>

+ 1
- 0
metadata-rejig-1.2/archiva-jetty/src/main/conf/shared.xml View File

@@ -0,0 +1 @@
<configuration />

+ 261
- 0
metadata-rejig-1.2/archiva-jetty/src/main/resources/LICENSE View File

@@ -0,0 +1,261 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



For the Java Service Wrapper (v3.2.3):

Copyright (c) 1999, 2006 Tanuki Software, Inc.

Permission is hereby granted, free of charge, to any person
obtaining a copy of the Java Service Wrapper and associated
documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sub-license,
and/or sell copies of the Software, and to permit persons to
whom the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.


Portions of the Software have been derived from source code
developed by Silver Egg Technology under the following license:

BEGIN Silver Egg Techology License -----------------------------------
Copyright (c) 2001 Silver Egg Technology
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sub-license, and/or
sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
END Silver Egg Techology License -------------------------------------


+ 72
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/pom.xml View File

@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<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.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
<version>1.2-SNAPSHOT</version>
</parent>
<artifactId>archiva-artifact-converter</artifactId>
<name>Archiva Artifact Converter</name>
<description>Converts between Legacy and Modern Layout Artifacts.</description>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-repository-metadata</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-spring</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-transaction</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-model-converter</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

+ 50
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/maven/archiva/converter/artifact/ArtifactConversionException.java View File

@@ -0,0 +1,50 @@
package org.apache.maven.archiva.converter.artifact;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/**
* ArtifactConversionException
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*/
public class ArtifactConversionException
extends Exception
{

public ArtifactConversionException()
{
}

public ArtifactConversionException( String message )
{
super( message );
}

public ArtifactConversionException( Throwable cause )
{
super( cause );
}

public ArtifactConversionException( String message, Throwable cause )
{
super( message, cause );
}
}

+ 58
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/maven/archiva/converter/artifact/ArtifactConverter.java View File

@@ -0,0 +1,58 @@
package org.apache.maven.archiva.converter.artifact;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.ArtifactRepository;

import java.util.Map;

/**
* ArtifactConverter
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*/
public interface ArtifactConverter
{
public static final String ROLE = ArtifactConverter.class.getName();
/**
* Convert an provided artifact, and place it into the destination repository.
*
* @param artifact the artifact to convert.
* @param destinationRepository the respository to send the artifact to.
* @throws ArtifactConversionException
*/
void convert( Artifact artifact, ArtifactRepository destinationRepository )
throws ArtifactConversionException;

/**
* Get the map of accumulated warnings for the conversion.
*
* @return the {@link Map}&lt;{@link Artifact}, {@link String}&gt; warning messages.
*/
Map getWarnings();

/**
* Clear the list of warning messages.
*/
void clearWarnings();
}

+ 690
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/maven/archiva/converter/artifact/LegacyToDefaultConverter.java View File

@@ -0,0 +1,690 @@
package org.apache.maven.archiva.converter.artifact;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.maven.archiva.transaction.FileTransaction;
import org.apache.maven.archiva.transaction.TransactionException;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.factory.ArtifactFactory;
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.metadata.ArtifactRepositoryMetadata;
import org.apache.maven.artifact.repository.metadata.Metadata;
import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
import org.apache.maven.artifact.repository.metadata.Snapshot;
import org.apache.maven.artifact.repository.metadata.SnapshotArtifactRepositoryMetadata;
import org.apache.maven.artifact.repository.metadata.Versioning;
import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader;
import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Writer;
import org.apache.maven.model.DistributionManagement;
import org.apache.maven.model.Model;
import org.apache.maven.model.Relocation;
import org.apache.maven.model.converter.ModelConverter;
import org.apache.maven.model.converter.PomTranslationException;
import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
import org.codehaus.plexus.digest.Digester;
import org.codehaus.plexus.digest.DigesterException;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.regex.Matcher;

/**
* LegacyToDefaultConverter
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*
* @plexus.component role="org.apache.maven.archiva.converter.artifact.ArtifactConverter"
* role-hint="legacy-to-default"
*/
public class LegacyToDefaultConverter
implements ArtifactConverter
{
/**
* {@link List}&lt;{@link Digester}>
*
* @plexus.requirement role="org.codehaus.plexus.digest.Digester"
*/
private List digesters;

/**
* @plexus.requirement
*/
private ModelConverter translator;

/**
* @plexus.requirement
*/
private ArtifactFactory artifactFactory;

/**
* @plexus.requirement
*/
private ArtifactHandlerManager artifactHandlerManager;

/**
* @plexus.configuration default-value="false"
*/
private boolean force;

/**
* @plexus.configuration default-value="false"
*/
private boolean dryrun;

private Map warnings = new HashMap();

public void convert( Artifact artifact, ArtifactRepository targetRepository )
throws ArtifactConversionException
{
if ( artifact.getRepository().getUrl().equals( targetRepository.getUrl() ) )
{
throw new ArtifactConversionException( Messages.getString( "exception.repositories.match" ) ); //$NON-NLS-1$
}

if ( !validateMetadata( artifact ) )
{
addWarning( artifact, Messages.getString( "unable.to.validate.metadata" ) ); //$NON-NLS-1$
return;
}

FileTransaction transaction = new FileTransaction();

if ( !copyPom( artifact, targetRepository, transaction ) )
{
addWarning( artifact, Messages.getString( "unable.to.copy.pom" ) ); //$NON-NLS-1$
return;
}

if ( !copyArtifact( artifact, targetRepository, transaction ) )
{
addWarning( artifact, Messages.getString( "unable.to.copy.artifact" ) ); //$NON-NLS-1$
return;
}

Metadata metadata = createBaseMetadata( artifact );
Versioning versioning = new Versioning();
versioning.addVersion( artifact.getBaseVersion() );
metadata.setVersioning( versioning );
updateMetadata( new ArtifactRepositoryMetadata( artifact ), targetRepository, metadata, transaction );

metadata = createBaseMetadata( artifact );
metadata.setVersion( artifact.getBaseVersion() );
versioning = new Versioning();

Matcher matcher = Artifact.VERSION_FILE_PATTERN.matcher( artifact.getVersion() );
if ( matcher.matches() )
{
Snapshot snapshot = new Snapshot();
snapshot.setBuildNumber( Integer.valueOf( matcher.group( 3 ) ).intValue() );
snapshot.setTimestamp( matcher.group( 2 ) );
versioning.setSnapshot( snapshot );
}

// TODO: merge latest/release/snapshot from source instead
metadata.setVersioning( versioning );
updateMetadata( new SnapshotArtifactRepositoryMetadata( artifact ), targetRepository, metadata, transaction );

if ( !dryrun )
{
try
{
transaction.commit();
}
catch ( TransactionException e )
{
throw new ArtifactConversionException( Messages.getString( "transaction.failure", e.getMessage() ), e ); //$NON-NLS-1$
}
}
}

private boolean copyPom( Artifact artifact, ArtifactRepository targetRepository, FileTransaction transaction )
throws ArtifactConversionException
{
Artifact pom = artifactFactory.createProjectArtifact( artifact.getGroupId(), artifact.getArtifactId(), artifact
.getVersion() );
pom.setBaseVersion( artifact.getBaseVersion() );
ArtifactRepository repository = artifact.getRepository();
File file = new File( repository.getBasedir(), repository.pathOf( pom ) );

boolean result = true;
if ( file.exists() )
{
File targetFile = new File( targetRepository.getBasedir(), targetRepository.pathOf( pom ) );

String contents = null;
boolean checksumsValid = false;
try
{
if ( testChecksums( artifact, file ) )
{
checksumsValid = true;
}

// Even if the checksums for the POM are invalid we should still convert the POM
contents = FileUtils.readFileToString( file, null );
}
catch ( IOException e )
{
throw new ArtifactConversionException(
Messages.getString( "unable.to.read.source.pom", e.getMessage() ), e ); //$NON-NLS-1$
}

if ( checksumsValid && contents.indexOf( "modelVersion" ) >= 0 ) //$NON-NLS-1$
{
// v4 POM
try
{
boolean matching = false;
if ( !force && targetFile.exists() )
{
String targetContents = FileUtils.readFileToString( targetFile, null );
matching = targetContents.equals( contents );
}
if ( force || !matching )
{
transaction.createFile( contents, targetFile, digesters );
}
}
catch ( IOException e )
{
throw new ArtifactConversionException( Messages
.getString( "unable.to.write.target.pom", e.getMessage() ), e ); //$NON-NLS-1$
}
}
else
{
// v3 POM
StringReader stringReader = new StringReader( contents );
StringWriter writer = null;
try
{
org.apache.maven.model.v3_0_0.io.xpp3.MavenXpp3Reader v3Reader = new org.apache.maven.model.v3_0_0.io.xpp3.MavenXpp3Reader();
org.apache.maven.model.v3_0_0.Model v3Model = v3Reader.read( stringReader );

if ( doRelocation( artifact, v3Model, targetRepository, transaction ) )
{
Artifact relocatedPom = artifactFactory.createProjectArtifact( artifact.getGroupId(), artifact
.getArtifactId(), artifact.getVersion() );
targetFile = new File( targetRepository.getBasedir(), targetRepository.pathOf( relocatedPom ) );
}

Model v4Model = translator.translate( v3Model );

translator.validateV4Basics( v4Model, v3Model.getGroupId(), v3Model.getArtifactId(), v3Model
.getVersion(), v3Model.getPackage() );

writer = new StringWriter();
MavenXpp3Writer Xpp3Writer = new MavenXpp3Writer();
Xpp3Writer.write( writer, v4Model );

transaction.createFile( writer.toString(), targetFile, digesters );

List warnings = translator.getWarnings();

for ( Iterator i = warnings.iterator(); i.hasNext(); )
{
String message = (String) i.next();
addWarning( artifact, message );
}
}
catch ( XmlPullParserException e )
{
addWarning( artifact, Messages.getString( "invalid.source.pom", e.getMessage() ) ); //$NON-NLS-1$
result = false;
}
catch ( IOException e )
{
throw new ArtifactConversionException( Messages.getString( "unable.to.write.converted.pom" ), e ); //$NON-NLS-1$
}
catch ( PomTranslationException e )
{
addWarning( artifact, Messages.getString( "invalid.source.pom", e.getMessage() ) ); //$NON-NLS-1$
result = false;
}
finally
{
IOUtils.closeQuietly( writer );
}
}
}
else
{
addWarning( artifact, Messages.getString( "warning.missing.pom" ) ); //$NON-NLS-1$
}
return result;
}

private boolean testChecksums( Artifact artifact, File file )
throws IOException
{
boolean result = true;
Iterator it = digesters.iterator();
while ( it.hasNext() )
{
Digester digester = (Digester) it.next();
result &= verifyChecksum( file, file.getName() + "." + getDigesterFileExtension( digester ), digester, //$NON-NLS-1$
artifact, "failure.incorrect." + getDigesterFileExtension( digester ) ); //$NON-NLS-1$
}
return result;
}

private boolean verifyChecksum( File file, String fileName, Digester digester, Artifact artifact, String key )
throws IOException
{
boolean result = true;

File checksumFile = new File( file.getParentFile(), fileName );
if ( checksumFile.exists() )
{
String checksum = FileUtils.readFileToString( checksumFile, null );
try
{
digester.verify( file, checksum );
}
catch ( DigesterException e )
{
addWarning( artifact, Messages.getString( key ) );
result = false;
}
}
return result;
}

/**
* File extension for checksums
* TODO should be moved to plexus-digester ?
*/
private String getDigesterFileExtension( Digester digester )
{
return digester.getAlgorithm().toLowerCase().replaceAll( "-", "" ); //$NON-NLS-1$ //$NON-NLS-2$
}

private boolean copyArtifact( Artifact artifact, ArtifactRepository targetRepository, FileTransaction transaction )
throws ArtifactConversionException
{
File sourceFile = artifact.getFile();

if ( sourceFile.getAbsolutePath().indexOf( "/plugins/" ) > -1 ) //$NON-NLS-1$
{
artifact.setArtifactHandler( artifactHandlerManager.getArtifactHandler( "maven-plugin" ) ); //$NON-NLS-1$
}

File targetFile = new File( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) );

boolean result = true;
try
{
boolean matching = false;
if ( !force && targetFile.exists() )
{
matching = FileUtils.contentEquals( sourceFile, targetFile );
if ( !matching )
{
addWarning( artifact, Messages.getString( "failure.target.already.exists" ) ); //$NON-NLS-1$
result = false;
}
}
if ( result )
{
if ( force || !matching )
{
if ( testChecksums( artifact, sourceFile ) )
{
transaction.copyFile( sourceFile, targetFile, digesters );
}
else
{
result = false;
}
}
}
}
catch ( IOException e )
{
throw new ArtifactConversionException( Messages.getString( "error.copying.artifact" ), e ); //$NON-NLS-1$
}
return result;
}

private Metadata createBaseMetadata( Artifact artifact )
{
Metadata metadata = new Metadata();
metadata.setArtifactId( artifact.getArtifactId() );
metadata.setGroupId( artifact.getGroupId() );
return metadata;
}

private Metadata readMetadata( File file )
throws ArtifactConversionException
{
Metadata metadata;
MetadataXpp3Reader reader = new MetadataXpp3Reader();
FileReader fileReader = null;
try
{
fileReader = new FileReader( file );
metadata = reader.read( fileReader );
}
catch ( FileNotFoundException e )
{
throw new ArtifactConversionException( Messages.getString( "error.reading.target.metadata" ), e ); //$NON-NLS-1$
}
catch ( IOException e )
{
throw new ArtifactConversionException( Messages.getString( "error.reading.target.metadata" ), e ); //$NON-NLS-1$
}
catch ( XmlPullParserException e )
{
throw new ArtifactConversionException( Messages.getString( "error.reading.target.metadata" ), e ); //$NON-NLS-1$
}
finally
{
IOUtils.closeQuietly( fileReader );
}
return metadata;
}

private boolean validateMetadata( Artifact artifact )
throws ArtifactConversionException
{
ArtifactRepository repository = artifact.getRepository();

boolean result = true;

RepositoryMetadata repositoryMetadata = new ArtifactRepositoryMetadata( artifact );
File file = new File( repository.getBasedir(), repository.pathOfRemoteRepositoryMetadata( repositoryMetadata ) );
if ( file.exists() )
{
Metadata metadata = readMetadata( file );
result = validateMetadata( metadata, repositoryMetadata, artifact );
}

repositoryMetadata = new SnapshotArtifactRepositoryMetadata( artifact );
file = new File( repository.getBasedir(), repository.pathOfRemoteRepositoryMetadata( repositoryMetadata ) );
if ( file.exists() )
{
Metadata metadata = readMetadata( file );
result = result && validateMetadata( metadata, repositoryMetadata, artifact );
}

return result;
}

private boolean validateMetadata( Metadata metadata, RepositoryMetadata repositoryMetadata, Artifact artifact )
{
String groupIdKey;
String artifactIdKey = null;
String snapshotKey = null;
String versionKey = null;
String versionsKey = null;

if ( repositoryMetadata.storedInGroupDirectory() )
{
groupIdKey = "failure.incorrect.groupMetadata.groupId"; //$NON-NLS-1$
}
else if ( repositoryMetadata.storedInArtifactVersionDirectory() )
{
groupIdKey = "failure.incorrect.snapshotMetadata.groupId"; //$NON-NLS-1$
artifactIdKey = "failure.incorrect.snapshotMetadata.artifactId"; //$NON-NLS-1$
versionKey = "failure.incorrect.snapshotMetadata.version"; //$NON-NLS-1$
snapshotKey = "failure.incorrect.snapshotMetadata.snapshot"; //$NON-NLS-1$
}
else
{
groupIdKey = "failure.incorrect.artifactMetadata.groupId"; //$NON-NLS-1$
artifactIdKey = "failure.incorrect.artifactMetadata.artifactId"; //$NON-NLS-1$
versionsKey = "failure.incorrect.artifactMetadata.versions"; //$NON-NLS-1$
}

boolean result = true;

if ( metadata.getGroupId() == null || !metadata.getGroupId().equals( artifact.getGroupId() ) )
{
addWarning( artifact, Messages.getString( groupIdKey ) );
result = false;
}
if ( !repositoryMetadata.storedInGroupDirectory() )
{
if ( metadata.getGroupId() == null || !metadata.getArtifactId().equals( artifact.getArtifactId() ) )
{
addWarning( artifact, Messages.getString( artifactIdKey ) );
result = false;
}
if ( !repositoryMetadata.storedInArtifactVersionDirectory() )
{
// artifact metadata

boolean foundVersion = false;
if ( metadata.getVersioning() != null )
{
for ( Iterator i = metadata.getVersioning().getVersions().iterator(); i.hasNext() && !foundVersion; )
{
String version = (String) i.next();
if ( version.equals( artifact.getBaseVersion() ) )
{
foundVersion = true;
}
}
}

if ( !foundVersion )
{
addWarning( artifact, Messages.getString( versionsKey ) );
result = false;
}
}
else
{
// snapshot metadata
if ( !artifact.getBaseVersion().equals( metadata.getVersion() ) )
{
addWarning( artifact, Messages.getString( versionKey ) );
result = false;
}

if ( artifact.isSnapshot() )
{
Matcher matcher = Artifact.VERSION_FILE_PATTERN.matcher( artifact.getVersion() );
if ( matcher.matches() )
{
boolean correct = false;
if ( metadata.getVersioning() != null && metadata.getVersioning().getSnapshot() != null )
{
Snapshot snapshot = metadata.getVersioning().getSnapshot();
int build = Integer.valueOf( matcher.group( 3 ) ).intValue();
String ts = matcher.group( 2 );
if ( build == snapshot.getBuildNumber() && ts.equals( snapshot.getTimestamp() ) )
{
correct = true;
}
}

if ( !correct )
{
addWarning( artifact, Messages.getString( snapshotKey ) );
result = false;
}
}
}
}
}
return result;
}

private void updateMetadata( RepositoryMetadata artifactMetadata, ArtifactRepository targetRepository,
Metadata newMetadata, FileTransaction transaction )
throws ArtifactConversionException
{
File file = new File( targetRepository.getBasedir(), targetRepository
.pathOfRemoteRepositoryMetadata( artifactMetadata ) );

Metadata metadata;
boolean changed;

if ( file.exists() )
{
metadata = readMetadata( file );
changed = metadata.merge( newMetadata );
}
else
{
changed = true;
metadata = newMetadata;
}

if ( changed )
{
StringWriter writer = null;
try
{
writer = new StringWriter();

MetadataXpp3Writer mappingWriter = new MetadataXpp3Writer();

mappingWriter.write( writer, metadata );

transaction.createFile( writer.toString(), file, digesters );
}
catch ( IOException e )
{
throw new ArtifactConversionException( Messages.getString( "error.writing.target.metadata" ), e ); //$NON-NLS-1$
}
finally
{
IOUtils.closeQuietly( writer );
}
}
}

private boolean doRelocation( Artifact artifact, org.apache.maven.model.v3_0_0.Model v3Model,
ArtifactRepository repository, FileTransaction transaction )
throws IOException
{
Properties properties = v3Model.getProperties();
if ( properties.containsKey( "relocated.groupId" ) || properties.containsKey( "relocated.artifactId" ) //$NON-NLS-1$ //$NON-NLS-2$
|| properties.containsKey( "relocated.version" ) ) //$NON-NLS-1$
{
String newGroupId = properties.getProperty( "relocated.groupId", v3Model.getGroupId() ); //$NON-NLS-1$
properties.remove( "relocated.groupId" ); //$NON-NLS-1$

String newArtifactId = properties.getProperty( "relocated.artifactId", v3Model.getArtifactId() ); //$NON-NLS-1$
properties.remove( "relocated.artifactId" ); //$NON-NLS-1$

String newVersion = properties.getProperty( "relocated.version", v3Model.getVersion() ); //$NON-NLS-1$
properties.remove( "relocated.version" ); //$NON-NLS-1$

String message = properties.getProperty( "relocated.message", "" ); //$NON-NLS-1$ //$NON-NLS-2$
properties.remove( "relocated.message" ); //$NON-NLS-1$

if ( properties.isEmpty() )
{
v3Model.setProperties( null );
}

writeRelocationPom( v3Model.getGroupId(), v3Model.getArtifactId(), v3Model.getVersion(), newGroupId,
newArtifactId, newVersion, message, repository, transaction );

v3Model.setGroupId( newGroupId );
v3Model.setArtifactId( newArtifactId );
v3Model.setVersion( newVersion );

artifact.setGroupId( newGroupId );
artifact.setArtifactId( newArtifactId );
artifact.setVersion( newVersion );

return true;
}
else
{
return false;
}
}

private void writeRelocationPom( String groupId, String artifactId, String version, String newGroupId,
String newArtifactId, String newVersion, String message,
ArtifactRepository repository, FileTransaction transaction )
throws IOException
{
Model pom = new Model();
pom.setGroupId( groupId );
pom.setArtifactId( artifactId );
pom.setVersion( version );

DistributionManagement dMngt = new DistributionManagement();

Relocation relocation = new Relocation();
relocation.setGroupId( newGroupId );
relocation.setArtifactId( newArtifactId );
relocation.setVersion( newVersion );
if ( message != null && message.length() > 0 )
{
relocation.setMessage( message );
}

dMngt.setRelocation( relocation );

pom.setDistributionManagement( dMngt );

Artifact artifact = artifactFactory.createBuildArtifact( groupId, artifactId, version, "pom" ); //$NON-NLS-1$
File pomFile = new File( repository.getBasedir(), repository.pathOf( artifact ) );

StringWriter strWriter = new StringWriter();
MavenXpp3Writer pomWriter = new MavenXpp3Writer();
pomWriter.write( strWriter, pom );

transaction.createFile( strWriter.toString(), pomFile, digesters );
}

private void addWarning( Artifact artifact, String message )
{
List messages = (List) warnings.get( artifact );
if ( messages == null )
{
messages = new ArrayList();
}
messages.add( message );
warnings.put( artifact, messages );
}

public void clearWarnings()
{
warnings.clear();
}

public Map getWarnings()
{
return warnings;
}
}

+ 71
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/main/java/org/apache/maven/archiva/converter/artifact/Messages.java View File

@@ -0,0 +1,71 @@
package org.apache.maven.archiva.converter.artifact;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

/**
* Messages
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*/
public class Messages
{
private static final String BUNDLE_NAME = "org.apache.maven.archiva.converter.artifact.messages"; //$NON-NLS-1$

private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );

private Messages()
{
}

public static String getString( String key )
{
try
{
return RESOURCE_BUNDLE.getString( key );
}
catch ( MissingResourceException e )
{
return '!' + key + '!';
}
}
public static String getString( String key, Object argument )
{
return getString( key, new Object[] { argument } );
}
public static String getString( String key, Object arguments[] )
{
try
{
String pattern = RESOURCE_BUNDLE.getString( key );
return MessageFormat.format( pattern, arguments );
}
catch ( MissingResourceException e )
{
return '!' + key + '!';
}
}
}

+ 51
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/main/resources/org/apache/maven/archiva/converter/artifact/messages.properties View File

@@ -0,0 +1,51 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

unable.to.validate.metadata=Unable to validate metadata
unable.to.copy.pom=Unable to copy pom.
unable.to.copy.artifact=Unable to copy artifact
unable.to.read.source.pom=Unable to read source POM: {0}
unable.to.write.target.pom=Unable to write target POM: {0}
unable.to.write.converted.pom=Unable to write converted POM


exception.repositories.match=Source repository of artifact, and target repository are the same. No conversion needed.
transaction.failure=Transaction failure: {0}
invalid.source.pom=Invalid source pom: {0}

warning.missing.pom=The artifact had no POM in the source repository.

error.copying.artifact=Error copying artifact
error.reading.target.metadata=Error reading target metadata
error.writing.target.metadata=Error writing target metadata

failure.target.already.exists=The artifact could not be converted because it already exists.
failure.incorrect.groupMetadata.groupId=The group ID in the source group metadata is incorrect.

failure.incorrect.artifactMetadata.artifactId=The artifact ID in the source artifact metadata is incorrect.
failure.incorrect.artifactMetadata.groupId=The group ID in the source artifact metadata is incorrect.
failure.incorrect.artifactMetadata.versions=The version list in the source artifact metadata is incorrect.

failure.incorrect.snapshotMetadata.artifactId=The artifact ID in the source artifact version metadata is incorrect.
failure.incorrect.snapshotMetadata.groupId=The group ID in the source artifact version metadata is incorrect.
failure.incorrect.snapshotMetadata.version=The version in the source artifact version metadata is incorrect.
failure.incorrect.snapshotMetadata.snapshot=The snapshot information in the source artifact version metadata is incorrect.

failure.incorrect.md5=The MD5 checksum value was incorrect.
failure.incorrect.sha1=The SHA1 checksum value was incorrect.

+ 6
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/converted-artifact-one.pom View File

@@ -0,0 +1,6 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>artifact-one</artifactId>
<version>1.0.0</version>
</project>

+ 6
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/converted-artifact-three.pom View File

@@ -0,0 +1,6 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>artifact-three</artifactId>
<version>1.0.0</version>
</project>

+ 6
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/converted-artifact-two.pom View File

@@ -0,0 +1,6 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>artifact-two</artifactId>
<version>1.0.0</version>
</project>

+ 28
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/converted-v3-snapshot.pom View File

@@ -0,0 +1,28 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>v3artifact</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scm>
<connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection>
</scm>
<dependencies>
<dependency>
<groupId>groupId</groupId>
<artifactId>artifactId</artifactId>
<version>version</version>
</dependency>
<dependency>
<groupId>groupId</groupId>
<artifactId>test-artifactId</artifactId>
<version>version</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

+ 28
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/converted-v3-timestamped-snapshot.pom View File

@@ -0,0 +1,28 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>v3artifact</artifactId>
<version>1.0.0-20060105.130101-3</version>
<scm>
<connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection>
</scm>
<dependencies>
<dependency>
<groupId>groupId</groupId>
<artifactId>artifactId</artifactId>
<version>version</version>
</dependency>
<dependency>
<groupId>groupId</groupId>
<artifactId>test-artifactId</artifactId>
<version>version</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

+ 28
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/converted-v3-warnings.pom View File

@@ -0,0 +1,28 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>v3-warnings-artifact</artifactId>
<version>1.0.0</version>
<scm>
<connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection>
</scm>
<dependencies>
<dependency>
<groupId>groupId</groupId>
<artifactId>artifactId</artifactId>
<version>version</version>
</dependency>
<dependency>
<groupId>groupId</groupId>
<artifactId>test-artifactId</artifactId>
<version>version</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

+ 28
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/converted-v3.pom View File

@@ -0,0 +1,28 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>v3artifact</artifactId>
<version>1.0.0</version>
<scm>
<connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection>
</scm>
<dependencies>
<dependency>
<groupId>groupId</groupId>
<artifactId>artifactId</artifactId>
<version>version</version>
</dependency>
<dependency>
<groupId>groupId</groupId>
<artifactId>test-artifactId</artifactId>
<version>version</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

+ 7
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/maven-foo-plugin-1.0.pom View File

@@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-foo-plugin</artifactId>
<version>1.0.0</version>
<packaging>maven-plugin</version>
</project>

+ 10
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/newversion-artifact-metadata.xml View File

@@ -0,0 +1,10 @@
<metadata>
<groupId>test</groupId>
<artifactId>newversion-artifact</artifactId>
<versioning>
<versions>
<version>1.0.0</version>
<version>1.0.1</version>
</versions>
</versioning>
</metadata>

+ 6
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/maven-metadata.xml View File

@@ -0,0 +1,6 @@
<metadata>
<groupId>relocated-test</groupId>
<artifactId>relocated-v3artifact</artifactId>
<version>1.0.0</version>
<versioning />
</metadata>

+ 1
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.jar View File

@@ -0,0 +1 @@
v3

+ 28
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.pom View File

@@ -0,0 +1,28 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>relocated-test</groupId>
<artifactId>relocated-v3artifact</artifactId>
<version>1.0.0</version>
<scm>
<connection>scm:cvs:ext:${maven.username}@localhost:/home/cvs</connection>
</scm>
<dependencies>
<dependency>
<groupId>groupId</groupId>
<artifactId>artifactId</artifactId>
<version>version</version>
</dependency>
<dependency>
<groupId>groupId</groupId>
<artifactId>test-artifactId</artifactId>
<version>version</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

+ 9
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/relocated-test/relocated-v3artifact/maven-metadata.xml View File

@@ -0,0 +1,9 @@
<metadata>
<groupId>relocated-test</groupId>
<artifactId>relocated-v3artifact</artifactId>
<versioning>
<versions>
<version>1.0.0</version>
</versions>
</versioning>
</metadata>

+ 12
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.pom View File

@@ -0,0 +1,12 @@
<project>
<groupId>test</groupId>
<artifactId>relocated-v3artifact</artifactId>
<version>1.0.0</version>
<distributionManagement>
<relocation>
<groupId>relocated-test</groupId>
<artifactId>relocated-v3artifact</artifactId>
<version>1.0.0</version>
</relocation>
</distributionManagement>
</project>

+ 9
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/v3-artifact-metadata.xml View File

@@ -0,0 +1,9 @@
<metadata>
<groupId>test</groupId>
<artifactId>v3artifact</artifactId>
<versioning>
<versions>
<version>1.0.0</version>
</versions>
</versioning>
</metadata>

+ 9
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/v3-snapshot-artifact-metadata.xml View File

@@ -0,0 +1,9 @@
<metadata>
<groupId>test</groupId>
<artifactId>v3artifact</artifactId>
<versioning>
<versions>
<version>1.0.0-SNAPSHOT</version>
</versions>
</versioning>
</metadata>

+ 6
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/v3-snapshot-metadata.xml View File

@@ -0,0 +1,6 @@
<metadata>
<groupId>test</groupId>
<artifactId>v3artifact</artifactId>
<version>1.0.0-SNAPSHOT</version>
<versioning />
</metadata>

+ 11
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/v3-timestamped-snapshot-metadata.xml View File

@@ -0,0 +1,11 @@
<metadata>
<groupId>test</groupId>
<artifactId>v3artifact</artifactId>
<version>1.0.0-SNAPSHOT</version>
<versioning>
<snapshot>
<timestamp>20060105.130101</timestamp>
<buildNumber>3</buildNumber>
</snapshot>
</versioning>
</metadata>

+ 6
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/v3-version-metadata.xml View File

@@ -0,0 +1,6 @@
<metadata>
<groupId>test</groupId>
<artifactId>v3artifact</artifactId>
<version>1.0.0</version>
<versioning />
</metadata>

+ 9
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/v4-artifact-metadata.xml View File

@@ -0,0 +1,9 @@
<metadata>
<groupId>test</groupId>
<artifactId>v4artifact</artifactId>
<versioning>
<versions>
<version>1.0.0</version>
</versions>
</versioning>
</metadata>

+ 0
- 0
metadata-rejig-1.2/archiva-modules/archiva-base/archiva-artifact-converter/src/test/expected-files/v4-snapshot-artifact-metadata.xml View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save