packages (JPACKAGE): maven/maven-doxia-modules.pom (NEW), maven/maven2-2.0....

pawelz pawelz at pld-linux.org
Tue Apr 27 19:09:51 CEST 2010


Author: pawelz                       Date: Tue Apr 27 17:09:51 2010 GMT
Module: packages                      Tag: JPACKAGE
---- Log message:
- raw files from JPP maven2 package

---- Files affected:
packages/maven:
   maven-doxia-modules.pom (NONE -> 1.1.2.1)  (NEW), maven2-2.0.8-excludeexternaljars.patch (NONE -> 1.1.2.1)  (NEW), maven2-MNG-3139.patch (NONE -> 1.1.2.1)  (NEW), maven2-addjdom-depmap.xml (NONE -> 1.1.2.1)  (NEW), maven2-addjdomtobootstrappath.patch (NONE -> 1.1.2.1)  (NEW), maven2-commons-cli-1.1.patch (NONE -> 1.1.2.1)  (NEW), maven2-component-info.xml (NONE -> 1.1.2.1)  (NEW), maven2-empty-dep.pom (NONE -> 1.1.2.1)  (NEW), maven2-enable-bootstrap-repository.patch (NONE -> 1.1.2.1)  (NEW), maven2-fastjar-manifest-fix.patch (NONE -> 1.1.2.1)  (NEW), maven2-javadoc-plugin-pom.patch (NONE -> 1.1.2.1)  (NEW), maven2-jpp-readme.html (NONE -> 1.1.2.1)  (NEW), maven2-jpprepolayout.patch (NONE -> 1.1.2.1)  (NEW), maven2-plugins-MJAVADOC-137-AbstractJavadocMojo.patch (NONE -> 1.1.2.1)  (NEW), maven2-plugins-catch-uncaught-exceptions.patch (NONE -> 1.1.2.1)  (NEW), maven2-plugins-dependency-plugin-import-fix.patch (NONE -> 1.1.2.1)  (NEW), maven2-plugins-disablecobertura.patch (N
 ONE -> 1.1.2.1)  (NEW), maven2-plugins-disableenforcer.patch (NONE -> 1.1.2.1)  (NEW), maven2-plugins-doxiaupdatefix.patch (NONE -> 1.1.2.1)  (NEW), maven2-plugins-javadoc-newdoxia.patch (NONE -> 1.1.2.1)  (NEW), maven2-plugins-jpprepolayout.patch (NONE -> 1.1.2.1)  (NEW), maven2-plugins-project-info-reports-jdkversion.patch (NONE -> 1.1.2.1)  (NEW), maven2-run-it-tests.sh (NONE -> 1.1.2.1)  (NEW), maven2-script (NONE -> 1.1.2.1)  (NEW), maven2-settings.xml (NONE -> 1.1.2.1)  (NEW), maven2-shade-plugin-replacement.patch (NONE -> 1.1.2.1)  (NEW), maven2-site-plugin-addservletdep.patch (NONE -> 1.1.2.1)  (NEW), maven2-sourcetarget.patch (NONE -> 1.1.2.1)  (NEW), maven2-use-unversioned-classworlds.patch (NONE -> 1.1.2.1)  (NEW), maven2-versionless-depmap.xml (NONE -> 1.1.2.1)  (NEW)

---- Diffs:

================================================================
Index: packages/maven/maven-doxia-modules.pom
diff -u /dev/null packages/maven/maven-doxia-modules.pom:1.1.2.1
--- /dev/null	Tue Apr 27 19:09:51 2010
+++ packages/maven/maven-doxia-modules.pom	Tue Apr 27 19:09:42 2010
@@ -0,0 +1,60 @@
+<?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>
+    <artifactId>doxia</artifactId>
+    <groupId>org.apache.maven.doxia</groupId>
+    <version>1.0-alpha-10</version>
+  </parent>
+  <artifactId>doxia-modules</artifactId>
+  <name>Doxia :: Modules</name>
+  <description>Doxia modules for several markup languages.</description>
+
+  <packaging>pom</packaging>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-sink-api</artifactId>
+    </dependency>
+    <!-- test -->
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-core</artifactId>
+      <classifier>tests</classifier>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <modules>
+    <module>doxia-module-confluence</module>
+    <module>doxia-module-docbook-simple</module>
+    <module>doxia-module-twiki</module>
+    <module>doxia-module-itext</module>
+    <module>doxia-module-apt</module>
+    <module>doxia-module-fml</module>
+    <module>doxia-module-latex</module>
+    <module>doxia-module-rtf</module>
+    <module>doxia-module-xdoc</module>
+    <module>doxia-module-xhtml</module>
+  </modules>
+</project>

================================================================
Index: packages/maven/maven2-2.0.8-excludeexternaljars.patch
diff -u /dev/null packages/maven/maven2-2.0.8-excludeexternaljars.patch:1.1.2.1
--- /dev/null	Tue Apr 27 19:09:51 2010
+++ packages/maven/maven2-2.0.8-excludeexternaljars.patch	Tue Apr 27 19:09:42 2010
@@ -0,0 +1,39 @@
+--- ./maven2/maven-core/pom.xml.sav	2007-12-12 16:21:15.000000000 -0500
++++ ./maven2/maven-core/pom.xml	2007-12-12 16:21:10.000000000 -0500
+@@ -39,21 +39,23 @@
+                   <exclude>junit:junit</exclude>
+                   <exclude>jmock:jmock</exclude>
+                   <exclude>xml-apis:xml-apis</exclude>
++                  <exclude>com.jcraft:jsch</exclude>
++                  <exclude>org.codehaus.plexus:plexus-utils</exclude>
++                  <exclude>commons-cli:commons-cli</exclude>
++                  <exclude>org.apache.maven.doxia:doxia-sink-api</exclude>
++                  <exclude>org.apache.maven.wagon:wagon-file</exclude>
++                  <exclude>org.apache.maven.wagon:wagon-http-lightweight</exclude>
++                  <exclude>org.apache.maven.wagon:wagon-http-shared</exclude>
++                  <exclude>org.apache.maven.wagon:wagon-provider-api</exclude>
++                  <exclude>org.apache.maven.wagon:wagon-ssh</exclude>
++                  <exclude>org.apache.maven.wagon:wagon-ssh-common</exclude>
++                  <exclude>org.apache.maven.wagon:wagon-ssh-external</exclude>
++                  <exclude>org.codehaus.plexus:plexus-container-default</exclude>
++                  <exclude>org.codehaus.plexus:plexus-interactivity-api</exclude>
++                  <exclude>jdom:jdom</exclude>
++                  <exclude>jtidy:jtidy</exclude>
+                 </excludes>
+               </artifactSet>
+-              <relocations>
+-                <relocation>
+-                  <pattern>org.codehaus.plexus.util</pattern>
+-                  <excludes>
+-                    <exclude>
+-                      org.codehaus.plexus.util.xml.Xpp3Dom
+-                    </exclude>
+-                    <exclude>
+-                      org.codehaus.plexus.util.xml.pull.*
+-                    </exclude>
+-                  </excludes>
+-                </relocation>
+-              </relocations>
+             </configuration>
+           </execution>
+         </executions>

================================================================
Index: packages/maven/maven2-MNG-3139.patch
diff -u /dev/null packages/maven/maven2-MNG-3139.patch:1.1.2.1
--- /dev/null	Tue Apr 27 19:09:51 2010
+++ packages/maven/maven2-MNG-3139.patch	Tue Apr 27 19:09:42 2010
@@ -0,0 +1,12 @@
+--- maven2/maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java	2008/03/24 20:05:11	640549
++++ maven2/maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java	2009/02/24 20:07:37	747533
+@@ -195,8 +195,7 @@
+             ArtifactRepositoryPolicy policy =
+                 metadata.isSnapshot() ? repository.getSnapshots() : repository.getReleases();
+ 
+-            if ( ( policy.isEnabled() && !repository.isBlacklisted() )
+-                && ( loadMetadata( metadata, repository, localRepository, previousMetadata ) ) )
++            if ( policy.isEnabled() && loadMetadata( metadata, repository, localRepository, previousMetadata ) )
+             {
+                 metadata.setRepository( repository );
+                 selected = repository;

================================================================
Index: packages/maven/maven2-addjdom-depmap.xml
diff -u /dev/null packages/maven/maven2-addjdom-depmap.xml:1.1.2.1
--- /dev/null	Tue Apr 27 19:09:51 2010
+++ packages/maven/maven2-addjdom-depmap.xml	Tue Apr 27 19:09:42 2010
@@ -0,0 +1,10 @@
+
+<dependencies>
+	<add>
+		<dependency>
+			<groupId>jdom</groupId>
+			<artifactId>jdom</artifactId>
+			<version>1.0</version>
+		</dependency>
+	</add>
+</dependencies>

================================================================
Index: packages/maven/maven2-addjdomtobootstrappath.patch
diff -u /dev/null packages/maven/maven2-addjdomtobootstrappath.patch:1.1.2.1
--- /dev/null	Tue Apr 27 19:09:51 2010
+++ packages/maven/maven2-addjdomtobootstrappath.patch	Tue Apr 27 19:09:42 2010
@@ -0,0 +1,8 @@
+diff -up ./maven2/bootstrap/bootstrap-installer/src/main/resources/META-INF/MANIFEST.MF.sav ./maven2/bootstrap/bootstrap-installer/src/main/resources/META-INF/MANIFEST.MF
+--- ./maven2/bootstrap/bootstrap-installer/src/main/resources/META-INF/MANIFEST.MF.sav	2008-11-27 16:47:53.000000000 -0500
++++ ./maven2/bootstrap/bootstrap-installer/src/main/resources/META-INF/MANIFEST.MF	2008-11-27 16:48:22.000000000 -0500
+@@ -1,3 +1,3 @@
+ Manifest-Version: 1.0
+ Main-Class: org.apache.maven.bootstrap.installer.BootstrapInstaller
+-Class-Path: bootstrap-mini-2.0.8-SNAPSHOT.jar plexus-utils-1.0.4.jar
++Class-Path: bootstrap-mini-2.0.8-SNAPSHOT.jar plexus-utils-1.0.4.jar jdom-1.0.jar

================================================================
Index: packages/maven/maven2-commons-cli-1.1.patch
diff -u /dev/null packages/maven/maven2-commons-cli-1.1.patch:1.1.2.1
--- /dev/null	Tue Apr 27 19:09:51 2010
+++ packages/maven/maven2-commons-cli-1.1.patch	Tue Apr 27 19:09:42 2010
@@ -0,0 +1,12 @@
+diff -up ./maven2/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java.sav ./maven2/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
+--- ./maven2/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java.sav	2009-01-29 16:47:45.000000000 -0500
++++ ./maven2/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java	2009-01-29 16:48:00.000000000 -0500
+@@ -645,7 +645,7 @@ public class MavenCli
+                 "Force the use of an alternate POM file." ).create( ALTERNATE_POM_FILE ) );
+ 
+             options.addOption(
+-                OptionBuilder.withLongOpt( "define" ).hasArg().withDescription( "Define a system property" ).create(
++                OptionBuilder.withLongOpt( "define" ).hasArgs(1).withDescription( "Define a system property" ).create(
+                     SET_SYSTEM_PROPERTY ) );
+             options.addOption(
+                 OptionBuilder.withLongOpt( "offline" ).withDescription( "Work offline" ).create( OFFLINE ) );

================================================================
Index: packages/maven/maven2-component-info.xml
diff -u /dev/null packages/maven/maven2-component-info.xml:1.1.2.1
--- /dev/null	Tue Apr 27 19:09:51 2010
+++ packages/maven/maven2-component-info.xml	Tue Apr 27 19:09:42 2010
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="">
+  <component id="org/apache/maven"
+             licenseType=""
+             version="@VERSION@"
+             tag="@TAG@"
+             description=""
+             
+             > 
+              
+    <artifact id="maven-project.jar"/>
+    <artifact id="maven-settings.jar"/>
+    <artifact id="maven-model.jar"/>
+    <artifact id="maven-profile.jar"/>
+    <artifact id="maven-artifact-manager.jar"/>
+    <artifact id="maven-repository-metadata.jar"/>
+    <artifact id="maven-artifact.jar"/>
+    <artifact id="maven-plugin-registry.jar"/>
+    <artifact id="maven-error-diagnostics.jar"/>
+
+
+    <export>
+      <include input="maven-artifact.jar"/>
+      <include input="maven-model.jar"/>
+      <include input="maven-project.jar"/>
+      <include input="maven-artifact-manager.jar"/>
+      <include input="maven-plugin-registry.jar"/>
+      <include input="maven-profile.jar"/>
+      <include input="maven-settings.jar"/>
+      <include input="maven-repository-metadata.jar"/>
+      <include input="maven-error-diagnostics.jar"/>
+
+    </export>
+  </component>
+</project>

================================================================
Index: packages/maven/maven2-empty-dep.pom
diff -u /dev/null packages/maven/maven2-empty-dep.pom:1.1.2.1
--- /dev/null	Tue Apr 27 19:09:51 2010
+++ packages/maven/maven2-empty-dep.pom	Tue Apr 27 19:09:42 2010
@@ -0,0 +1,9 @@
+<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>
+  <groupId>JPP/maven2</groupId>
+  <artifactId>empty-dep</artifactId>
+  <version>2.0.4</version>
+  <name>Empty dependency</name>
+  <description>This is an empty dependency. For use in jpp mode when one or more dependencies need elimination.</description>
+</project>

================================================================
Index: packages/maven/maven2-enable-bootstrap-repository.patch
diff -u /dev/null packages/maven/maven2-enable-bootstrap-repository.patch:1.1.2.1
--- /dev/null	Tue Apr 27 19:09:51 2010
+++ packages/maven/maven2-enable-bootstrap-repository.patch	Tue Apr 27 19:09:42 2010
@@ -0,0 +1,37 @@
+--- maven2/maven-project/src/main/resources/org/apache/maven/project/pom-4.0.0.xml.sav	2008-01-02 19:54:58.000000000 -0500
++++ maven2/maven-project/src/main/resources/org/apache/maven/project/pom-4.0.0.xml	2008-01-02 19:56:27.000000000 -0500
+@@ -24,6 +24,15 @@ under the License.
+ 
+   <repositories>
+     <repository>
++      <id>bootstrap_repo</id>
++      <name>Maven Bootstrap Repository</name>
++      <layout>jpp</layout>
++      <url>file:///usr/share/maven2/bootstrap_repo</url>
++      <snapshots>
++        <enabled>true</enabled>
++      </snapshots>
++    </repository>
++    <repository>
+       <id>__jpp_repo__</id>
+       <name>JPackage Maven Repository</name>
+       <layout>jpp</layout>
+@@ -48,6 +57,18 @@ under the License.
+ 
+   <pluginRepositories>
+      <pluginRepository>
++      <id>bootstrap_repo</id>
++      <name>Maven Bootstrap Plugin Repository</name>
++      <url>file:///usr/share/maven2/bootstrap_repo</url>
++      <layout>jpp</layout>
++      <snapshots>
++        <enabled>true</enabled>
++      </snapshots>
++      <releases>
++        <updatePolicy>never</updatePolicy>
++      </releases>
++     </pluginRepository>
++     <pluginRepository>
+       <id>__jpp_repo__</id>
+       <name>JPackage Maven Plugin Repository</name>
+       <url>file:///usr/share/maven2/repository</url>

================================================================
Index: packages/maven/maven2-fastjar-manifest-fix.patch
diff -u /dev/null packages/maven/maven2-fastjar-manifest-fix.patch:1.1.2.1
--- /dev/null	Tue Apr 27 19:09:51 2010
+++ packages/maven/maven2-fastjar-manifest-fix.patch	Tue Apr 27 19:09:42 2010
@@ -0,0 +1,9 @@
+--- ./maven2/bootstrap/bootstrap-mini/build.sav	2007-08-14 10:37:28.000000000 -0400
++++ ./maven2/bootstrap/bootstrap-mini/build	2007-08-14 10:36:09.000000000 -0400
+@@ -17,5 +17,5 @@ mkdir -p ${classesDir}
+ )
+ ret=$?; if [ $ret != 0 ]; then exit $ret; fi
+ 
+-( cd ${classesDir} ; "$JAVA_HOME/bin/jar" -cfm ../../bootstrap-mini.jar ../../src/main/resources/META-INF/MANIFEST.MF * )
++( cd ${classesDir} ; /bin/cp -f ../../src/main/resources/META-INF/MANIFEST.MF META-INF/; "$JAVA_HOME/bin/jar" -cfm ../../bootstrap-mini.jar ../../src/main/resources/META-INF/MANIFEST.MF * )
+ ret=$?; if [ $ret != 0 ]; then exit $ret; fi

================================================================
Index: packages/maven/maven2-javadoc-plugin-pom.patch
diff -u /dev/null packages/maven/maven2-javadoc-plugin-pom.patch:1.1.2.1
--- /dev/null	Tue Apr 27 19:09:51 2010
+++ packages/maven/maven2-javadoc-plugin-pom.patch	Tue Apr 27 19:09:42 2010
@@ -0,0 +1,19 @@
+--- maven2-plugins/maven-javadoc-plugin/pom.xml.orig	2009-01-31 09:47:18.423411000 -0500
++++ maven2-plugins/maven-javadoc-plugin/pom.xml	2009-01-31 10:39:38.671359000 -0500
+@@ -38,7 +38,7 @@
+   <inceptionYear>2004</inceptionYear>
+ 
+   <prerequisites>
+-    <maven>2.0.9</maven>
++    <maven>2.0.8</maven>
+   </prerequisites>
+ 
+   <scm>
+@@ -215,6 +215,7 @@
+         </executions>
+         <configuration>
+           <version>1.0.0</version>
++          <model>src/main/mdo/javadocOptions.mdo</model>
+           <models>
+             <model>src/main/mdo/javadocOptions.mdo</model>
+           </models>

================================================================
Index: packages/maven/maven2-jpp-readme.html
diff -u /dev/null packages/maven/maven2-jpp-readme.html:1.1.2.1
--- /dev/null	Tue Apr 27 19:09:51 2010
+++ packages/maven/maven2-jpp-readme.html	Tue Apr 27 19:09:42 2010
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>JPackage Maven2</title>
+</head>
+<body>
+<h1>Notes on the JPackage version of Maven2 (2.0.4)</h1>
+<p>
+The maven2 version released with JPackage has extensive modifications to ensure that it works smoothly in off-line mode. In order to facilitate easier maintainability, minimal changes have been made, and most have been kept in separate source files rather than patching into maven code.
+<p>
+
+<p>
+<u><b>How to use it:</b></u><br/>
+
+Previously, when one needed to create a new rpm, for the build part they needed to set up a depmap, run all poms in a project via an xsl transformation that used the depmap to rewrite groupid's/artifactid's/etc., supply repository locations, and then call maven. Most of that has now been done away with. 
+</p>
+
+<p>
+Starting with the 9jpp release, to invoke maven in jpp mode, simply type 'mvn-jpp' with the -Dmaven2.jpp.depmap.file="..." argument if a separate depmap is needed. The command action is almost the same as "mvn" -- only that it supplies '-Dmaven2.offline.mode -Dmaven2.ignore.versions -Dmaven2.usejppjars' prior to invoking maven.
+</p>
+
+<p>
+<b><u>Dependency maps/'depmaps':</b></u><br/>
+
+To build a new project for a new JPackage rpm, a depmap still needs to be created so as to allow finding of the new jars. But this is not too different from the old way of using build-jar-repository with ant. The idea is the same -- tell the build tool where to find the required libraries.<br/><br/>
+
+The depmap has entries in the format:<br/>
+<pre>
+&lt;dependencies&gt;
+..
+    &lt;dependency&gt;
+        &lt;maven&gt;
+            &lt;groupId&gt;OGROUPID&lt;/groupId&gt;
+            &lt;artifactId&gt;OARTIFACTID&lt;/artifactId&gt;
+            &lt;version&gt;OVERSION&lt;/version&gt;
+        &lt;/maven&gt;
+        &lt;jpp&gt;
+            &lt;groupId&gt;NGROUPID&lt;/groupId&gt;
+            &lt;artifactId&gt;NARTIFACTID&lt;/artifactId&gt;
+            &lt;version&gt;NVERSION&lt;/version&gt;
+        &lt;/jpp&gt;
+    &lt;/dependency&gt;
+..
+&lt;dependencies&gt;
+</pre>
+
+<br/><br/>
+Where OGROUPID, OARTIFACTID and OVERSION are old group/artifact/versions (as they exist in your project) and NGROUPID, NARTIFACTID, NVERSION are the new ones. For example:<br/>
+<pre>
+    &lt;dependency&gt;
+        &lt;maven&gt;
+            &lt;groupId&gt;junit&lt;/groupId&gt;
+            &lt;artifactId&gt;junit&lt;/artifactId&gt;
+            &lt;version&gt;3.8.1&lt;/version&gt;
+        &lt;/maven&gt;
+        &lt;jpp&gt;
+            &lt;groupId&gt;JPP&lt;/groupId&gt;
+            &lt;artifactId&gt;junit&lt;/artifactId&gt;
+            &lt;version&gt;3.8.1&lt;/version&gt;
+        &lt;/jpp&gt;
+    &lt;/dependency&gt;
+</pre>
+The above mapping indicates that if any of the poms need an artifact with groupid=junit, artifactid=junit and version=3.8.1, it can be found at $REPOSITORY/JPP/junit.jar
+</p>
+
+Where $REPOSITORY is one of the active repositories with layout="jpp" ("jpp" is a new layout that has been added to our maven2 rpm).<br/><br/>
+
+If maven2.ignore.versions is specified, any requirement of  groupid=junit, artifactid=junit will be satisfied with $REPOSITORY/JPP/junit.jar (i.e. version will be ignored even if mentioned in the depmap).<br/><br/>
+
+If only a &lt;maven&gt; element is supplied and no &lt;jpp&gt;, it is assumed that the dependency is to be discarded. For example, some projects depend on the 'velocity-dep' which has no equivalent jar in JPackage packages as velocity-dep is just a monolithic jar containing velocity dependencies. To remove velocity-dep then, you would add:<br/>
+
+<pre>
+    &lt;dependency&gt;
+        &lt;maven&gt;
+            &lt;groupId&gt;velocity&lt;/groupId&gt;
+            &lt;artifactId&gt;velocity-dep&lt;/artifactId&gt;
+            &lt;version&gt;1.4&lt;/version&gt;
+        &lt;/maven&gt;
+    &lt;/dependency&gt;
+</pre>
+
+to the depmap.<br/><br/>
+
+There are two system depmaps. An unversioned one is located at: <tt>/etc/maven/maven2-versionless-depmap.xml</tt>. This is used when -Dmaven2-ignore-versions is specified. A versioned one is located at <tt>/etc/maven/maven2-depmap.xml</tt>. This is an autogenerated map which is rebuilt each time the <tt>update_maven_depmap</tt> macro is called by an rpm.  
+
+Finally, a custom one can be specified via -Dmaven2.jpp.depmap.file="..."<br/><br/>
+
+The versionless one contains depmap entries for items whose poms are installed by maven2-common-poms (for now). As time passes, more and more packages will start using the <tt>add_to_maven_depmap</tt> and <tt>update_maven_depmap</tt> macros and hopefully, the versionless can be phased out completely. If your project needs a mapping that is not already in there, you will have to create a separate file and use it via the above mentioned property.<br/><br/>
+
+<i>The custom depmap has highest preference, followed by the versioned depmap, followed by the versionless one </i><br/><br/>
+
+<u><b>Packages adding their own depmaps:</b></u><br/>
+Packages from now on should add their own depmap fragments when they get installed. This is achieved by calling the <tt>add_to_maven_depmap</tt> macro for each jar/artifact being installed, followed by calling <tt>update_maven_depmap</tt> in the post and postun sections (note: this means that there will have to be a jpackage-utils >= 0:1.7.2 post and postun requirement for all packages that do this, since jpackage-utils 1.7.2 provides the macros). Finally, <tt>%{_mavendepmapfragdir}</tt> (=/etc/maven/fragments) should be added in the %files section of the main package. The idea is as follows:<br/><br/>
+
+The %install section of each package uses the <tt>add_to_maven_depmap</tt> macro for each jar/pom that the main package and it's subpackages install. The macro puts the resulting data in <tt>$RPM_BUILD_ROOT%{_mavendepmapfragdir}/%{name}</tt>. <tt>update_maven_depmap</tt> in the post and postun then cat's /etc/maven/fragments/* into /etc/maven/maven2-depmap.xml which is read whenever mvn is run. See the plexus-cdc spec for a simple example, and maven-doxia for a more complex one.<br/><br/>
+
+<p>
+<b><u>New properties:</b></u><br/>
+
+<ul>
+<li><i>maven2.offline.mode</i> - Combined with maven2.ignore.versions, this switch is analogous to maven2.jpp.mode in 8jpp and lower. It tells maven to use the pre-configured jpackage repositories.</li>
+
+<li><i>maven2.ignore.versions</i> - Combined with maven2.offline.mode, this switch is analogous to maven2.jpp.mode in 8jpp and lower. It tells maven to ignore versions when looking at the dependency map.</li>
+
+<li><i>maven2.usejppjars</i> - This is a new option. When supplied, maven will try to use jpackage jars whenever possible. It's main intention is to allow users to use /usr/share/java files when available, and fetch jars from the net if not. It may be combined with the above two.</li>
+
+<li><i>maven2.jpp.depmap.file</i> - This option tells maven where to find the dependency mappings.</li>
+</ul>
+</p>
+</body>
+</html>
\ No newline at end of file

================================================================
Index: packages/maven/maven2-jpprepolayout.patch
diff -u /dev/null packages/maven/maven2-jpprepolayout.patch:1.1.2.1
--- /dev/null	Tue Apr 27 19:09:51 2010
+++ packages/maven/maven2-jpprepolayout.patch	Tue Apr 27 19:09:42 2010
@@ -0,0 +1,508 @@
+diff -up ./maven2/bootstrap/bootstrap-installer/src/main/java/org/apache/maven/bootstrap/installer/BootstrapInstaller.java.sav ./maven2/bootstrap/bootstrap-installer/src/main/java/org/apache/maven/bootstrap/installer/BootstrapInstaller.java
+--- ./maven2/bootstrap/bootstrap-installer/src/main/java/org/apache/maven/bootstrap/installer/BootstrapInstaller.java.sav	2007-09-08 19:20:50.000000000 -0400
++++ ./maven2/bootstrap/bootstrap-installer/src/main/java/org/apache/maven/bootstrap/installer/BootstrapInstaller.java	2009-05-05 15:28:38.000000000 -0400
+@@ -57,6 +57,8 @@ public class BootstrapInstaller
+ 
+     private boolean offline;
+ 
++    private String settingsFile;
++
+     public BootstrapInstaller( SimpleArgumentParser parser )
+         throws Exception
+     {
+@@ -72,6 +74,8 @@ public class BootstrapInstaller
+         this.updateSnapshots = parser.isArgumentSet( "--update-snapshots" );
+ 
+         this.offline = parser.isArgumentSet( "--offline" );
++
++       this.settingsFile = parser.getArgumentValue( "--settings" );
+     }
+ 
+     public static void main( String[] args )
+@@ -215,6 +219,11 @@ public class BootstrapInstaller
+             cli.createArgument().setValue( "--update-snapshots" );
+         }
+ 
++        if (this.settingsFile != null) {
++            cli.createArgument().setValue( "-s" );
++            cli.createArgument().setValue( this.settingsFile ); 
++        }
++
+         for ( int i = 0; i < args.length; i++ )
+         {
+             cli.createArgument().setValue( args[i] );
+diff -up ./maven2/bootstrap/bootstrap-mini/build.sav ./maven2/bootstrap/bootstrap-mini/build
+--- ./maven2/bootstrap/bootstrap-mini/build.sav	2006-12-11 23:53:43.000000000 -0500
++++ ./maven2/bootstrap/bootstrap-mini/build	2009-05-05 15:28:38.000000000 -0400
+@@ -9,6 +9,11 @@ rm -rf bootstrap-mini.jar ${buildDir} > 
+ mkdir -p ${classesDir}
+ 
+ "$JAVA_HOME/bin/javac" -g -d ${classesDir} `find ${srcDir} -name '*.java'`
++# FIXME: Is there a better way to make the compiler see the jdom classes? 
++# setting CLASSPATH, or giving -cp/-classpath didn't work :(
++(cd ${classesDir} 
++   jar xf $JDOMCLASS 
++)
+ ret=$?; if [ $ret != 0 ]; then exit $ret; fi
+ 
+ ( cd ${classesDir} ; "$JAVA_HOME/bin/jar" -cfm ../../bootstrap-mini.jar ../../src/main/resources/META-INF/MANIFEST.MF * )
+diff -up ./maven2/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/download/OnlineArtifactDownloader.java.sav ./maven2/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/download/OnlineArtifactDownloader.java
+--- ./maven2/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/download/OnlineArtifactDownloader.java.sav	2007-06-15 02:19:15.000000000 -0400
++++ ./maven2/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/download/OnlineArtifactDownloader.java	2009-05-05 15:28:38.000000000 -0400
+@@ -49,7 +49,8 @@ public class OnlineArtifactDownloader
+ 
+     private String proxyPassword;
+ 
+-    private static final String REPO_URL = "http://repo1.maven.org/maven2";
++    private static final String INTERNAL_REPO_URL = "__INTERNAL_REPO_PLACEHOLDER__";
++    private static final String EXTERNAL_REPO_URL = "__EXTERNAL_REPO_PLACEHOLDER__";
+ 
+     private Map downloadedArtifacts = new HashMap();
+ 
+@@ -170,7 +171,10 @@ public class OnlineArtifactDownloader
+             try
+             {
+                 String version = dep.getVersion();
+-                if ( snapshot )
++                if ( snapshot && 
++                   ((System.getProperty("maven2.offline.mode") == null) && 
++                       (System.getProperty("maven2.jpp.mode") == null)) )
++
+                 {
+                     String filename = "maven-metadata-" + remoteRepo.getId() + ".xml";
+                     File localFile = getLocalRepository().getMetadataFile( dep.getGroupId(), dep.getArtifactId(),
+@@ -252,7 +256,10 @@ public class OnlineArtifactDownloader
+ 
+                     file.getParentFile().mkdirs();
+ 
+-                    if ( !file.exists() || version.indexOf( "SNAPSHOT" ) >= 0 )
++                    if ( (!file.exists() || version.indexOf( "SNAPSHOT" ) >= 0) && 
++                       ((System.getProperty("maven2.offline.mode") == null) && 
++                           (System.getProperty("maven2.jpp.mode") == null)) )
++
+                     {
+                         String filename = dep.getArtifactId() + "-" + version + ".pom";
+                         String metadataPath = remoteRepo.getMetadataPath( dep.getGroupId(), dep.getArtifactId(),
+@@ -340,11 +347,8 @@ public class OnlineArtifactDownloader
+ 
+         if ( remoteRepositories.isEmpty() )
+         {
+-            // TODO: use super POM?
+-            remoteRepositories.add( new Repository( "central", REPO_URL, Repository.LAYOUT_DEFAULT, false, true ) );
+-            // TODO: use maven root POM?
+-            remoteRepositories.add( new Repository( "apache.snapshots", "http://people.apache.org/repo/m2-snapshot-repository/",
+-                                                    Repository.LAYOUT_DEFAULT, true, false ) );
++            remoteRepositories.add( new Repository( "internal", INTERNAL_REPO_URL, Repository.LAYOUT_JPP, true, true ) );
++            remoteRepositories.add( new Repository( "external", EXTERNAL_REPO_URL, Repository.LAYOUT_JPP, true, true ) );
+         }
+ 
+         return remoteRepositories;
+diff -up ./maven2/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/model/Repository.java.sav ./maven2/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/model/Repository.java
+--- ./maven2/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/model/Repository.java.sav	2006-07-08 11:46:08.000000000 -0400
++++ ./maven2/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/model/Repository.java	2009-05-05 15:28:37.000000000 -0400
+@@ -18,6 +18,8 @@ package org.apache.maven.bootstrap.model
+ 
+ import java.io.File;
+ import java.util.Collections;
++import java.util.Hashtable;
++import org.apache.maven.artifact.repository.layout.MavenJPackageDepmap;
+ 
+ /**
+  * Repository path management.
+@@ -35,6 +37,12 @@ public class Repository
+ 
+     private String layout = LAYOUT_DEFAULT;
+ 
++    public static final String LAYOUT_JPP = "jpp";
++
++    private static final char GROUP_SEPARATOR = '.';
++
++    private static final char PATH_SEPARATOR = '/';
++
+     private String id;
+ 
+     private boolean releases = true;
+@@ -64,7 +72,25 @@ public class Repository
+     public String getArtifactPath( Dependency dependency )
+     {
+         String repositoryPath;
+-        if ( LAYOUT_LEGACY.equals( layout ) )
++        if ( LAYOUT_JPP.equals( layout ) )
++        {
++
++           String groupId, artifactId;
++
++           MavenJPackageDepmap map = MavenJPackageDepmap.getInstance();
++           Hashtable newInfo = map.getMappedInfo(dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion());
++
++           groupId = (String) newInfo.get("group");
++           artifactId = (String) newInfo.get("artifact");
++           
++           if (dependency.getType().equals("pom")) {
++               return getMetadataPath(groupId, artifactId, dependency.getVersion(), dependency.getType(), dependency.getArtifact());
++           }
++
++            // Same as legacy layout
++            repositoryPath = groupId + "/" + artifactId + ".jar";
++        }
++        else if ( LAYOUT_LEGACY.equals( layout ) )
+         {
+             repositoryPath = dependency.getArtifactDirectory() + "/" + dependency.getType() + "s/" +
+                 dependency.getArtifact();
+@@ -94,7 +120,30 @@ public class Repository
+         Dependency dependency = new Dependency( groupId, artifactId, version, type, Collections.EMPTY_LIST );
+ 
+         String repositoryPath;
+-        if ( LAYOUT_LEGACY.equals( layout ) )
++        if ( LAYOUT_JPP.equals( layout ) ) 
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list