[pkg-java] r8159 - in trunk: . maven-repo-helper maven-repo-helper/debian maven-repo-helper/src maven-repo-helper/src/main maven-repo-helper/src/main/bin maven-repo-helper/src/main/java maven-repo-helper/src/main/java/org maven-repo-helper/src/main/java/org/debian maven-repo-helper/src/main/java/org/debian/maven maven-repo-helper/src/main/java/org/debian/maven/repo maven-repo-helper/src/main/share maven-repo-helper/src/test maven-repo-helper/src/test/java maven-repo-helper/src/test/java/org maven-repo-helper/src/test/java/org/debian maven-repo-helper/src/test/java/org/debian/maven maven-repo-helper/src/test/java/org/debian/maven/repo maven-repo-helper/src/test/resources
ludovicc-guest at alioth.debian.org
ludovicc-guest at alioth.debian.org
Tue Mar 31 10:40:10 UTC 2009
Author: ludovicc-guest
Date: 2009-03-31 10:40:09 +0000 (Tue, 31 Mar 2009)
New Revision: 8159
Added:
trunk/maven-repo-helper/
trunk/maven-repo-helper/debian/
trunk/maven-repo-helper/debian/build.properties
trunk/maven-repo-helper/debian/build.xml
trunk/maven-repo-helper/debian/changelog
trunk/maven-repo-helper/debian/compat
trunk/maven-repo-helper/debian/control
trunk/maven-repo-helper/debian/copyright
trunk/maven-repo-helper/debian/rules
trunk/maven-repo-helper/pom.xml
trunk/maven-repo-helper/src/
trunk/maven-repo-helper/src/main/
trunk/maven-repo-helper/src/main/bin/
trunk/maven-repo-helper/src/main/bin/dh_mavenrepo
trunk/maven-repo-helper/src/main/bin/mh_cleanpom
trunk/maven-repo-helper/src/main/bin/mh_generate_scripts
trunk/maven-repo-helper/src/main/bin/mh_installjar
trunk/maven-repo-helper/src/main/bin/mh_installpom
trunk/maven-repo-helper/src/main/bin/mvn-repo
trunk/maven-repo-helper/src/main/java/
trunk/maven-repo-helper/src/main/java/org/
trunk/maven-repo-helper/src/main/java/org/debian/
trunk/maven-repo-helper/src/main/java/org/debian/maven/
trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/
trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DebianPOM.java
trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Dependency.java
trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMCleaner.java
trunk/maven-repo-helper/src/main/resources/
trunk/maven-repo-helper/src/main/share/
trunk/maven-repo-helper/src/main/share/postinst.tmpl
trunk/maven-repo-helper/src/main/share/postrm.tmpl
trunk/maven-repo-helper/src/test/
trunk/maven-repo-helper/src/test/java/
trunk/maven-repo-helper/src/test/java/org/
trunk/maven-repo-helper/src/test/java/org/debian/
trunk/maven-repo-helper/src/test/java/org/debian/maven/
trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/
trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/BaseTest.java
trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/DebianPOMTest.java
trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMCleanerTest.java
trunk/maven-repo-helper/src/test/resources/
trunk/maven-repo-helper/src/test/resources/empty.pom
trunk/maven-repo-helper/src/test/resources/maven.cleaned
trunk/maven-repo-helper/src/test/resources/maven.spec
trunk/maven-repo-helper/src/test/resources/maven.xml
trunk/maven-repo-helper/src/test/resources/modello-core.cleaned
trunk/maven-repo-helper/src/test/resources/modello-core.xml
trunk/maven-repo-helper/src/test/resources/new.pom
trunk/maven-repo-helper/src/test/resources/new2.pom
trunk/maven-repo-helper/src/test/resources/updated.pom
Log:
Added: trunk/maven-repo-helper/debian/build.properties
===================================================================
--- trunk/maven-repo-helper/debian/build.properties (rev 0)
+++ trunk/maven-repo-helper/debian/build.properties 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,2 @@
+build.directory=build
+build.outputDirectory=build/classes
Added: trunk/maven-repo-helper/debian/build.xml
===================================================================
--- trunk/maven-repo-helper/debian/build.xml (rev 0)
+++ trunk/maven-repo-helper/debian/build.xml 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,19 @@
+<project name="pkg-java" default="package" basedir="..">
+
+ <property file="debian/build.properties"/>
+ <property name="maven.test.skip" value="true"/>
+ <property name="maven.build.xml" value="/usr/share/maven-ant-helper/maven-build.xml"/>
+ <property file="/usr/share/maven-ant-helper/maven-defaults.properties"/>
+
+ <target name="clean">
+ <ant target="clean" antfile="${maven.build.xml}" dir="."/>
+ </target>
+
+ <target name="package">
+ <ant target="package" antfile="${maven.build.xml}" dir=".">
+ <property name="artifactId" value="${package}"/>
+ </ant>
+ </target>
+
+</project>
+
Added: trunk/maven-repo-helper/debian/changelog
===================================================================
--- trunk/maven-repo-helper/debian/changelog (rev 0)
+++ trunk/maven-repo-helper/debian/changelog 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,5 @@
+maven-repo-helper (0.1-0ubuntu1~ppa9) jaunty; urgency=low
+
+ * Initial release. (Closes: #521947)
+
+ -- Ludovic Claude <ludovic.claude at laposte.net> Thu, 12 Mar 2009 20:46:36 +0000
Added: trunk/maven-repo-helper/debian/compat
===================================================================
--- trunk/maven-repo-helper/debian/compat (rev 0)
+++ trunk/maven-repo-helper/debian/compat 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1 @@
+5
Added: trunk/maven-repo-helper/debian/control
===================================================================
--- trunk/maven-repo-helper/debian/control (rev 0)
+++ trunk/maven-repo-helper/debian/control 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,16 @@
+Source: maven-repo-helper
+Section: java
+Priority: optional
+Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
+Uploaders: Ludovic Claude <ludovic.claude at laposte.net>
+Build-Depends: debhelper (>= 5), cdbs, default-jdk, ant, maven-ant-helper
+Standards-Version: 3.8.1
+Vcs-Bzr: lp:~ludovicc/maven-packaging-support/maven-repo-helper
+Vcs-Browser: http://bazaar.launchpad.net/~ludovicc/maven-packaging-support/maven-repo-helper/files
+Homepage: https://code.launchpad.net/maven-packaging-support/
+
+Package: maven-repo-helper
+Architecture: all
+Depends: ${misc:Depends}, default-jre-headless | java2-runtime-headless
+Description: Provides support for managing the Maven repository in a Debian distribution.
+ .
Added: trunk/maven-repo-helper/debian/copyright
===================================================================
--- trunk/maven-repo-helper/debian/copyright (rev 0)
+++ trunk/maven-repo-helper/debian/copyright 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,16 @@
+Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=437
+Upstream-Name: Maven Repo support
+Upstream-Maintainer: Ludovic Claude
+Upstream-Source: https://launchpad.net/maven-packaging-support/
+
+Files: *
+Copyright: Copyright 2009, Ludovic Claude <ludovic.claude at laposte.net>
+License: BSD
+ On Debian GNU/Linux system you can find the complete text of the
+ BSD license in '/usr/share/common-licenses/BSD'
+
+Files: debian/*
+Copyright: Copyright (C) 2009, Ludovic Claude <ludovic.claude at laposte.net>
+License: BSD
+ On Debian GNU/Linux system you can find the complete text of the
+ BSD license in '/usr/share/common-licenses/BSD'
Added: trunk/maven-repo-helper/debian/rules
===================================================================
--- trunk/maven-repo-helper/debian/rules (rev 0)
+++ trunk/maven-repo-helper/debian/rules 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,19 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/ant.mk
+
+PACKAGE := $(DEB_SOURCE_PACKAGE)
+VERSION := $(DEB_UPSTREAM_VERSION)
+JAVA_HOME := /usr/lib/jvm/default-java
+DEB_JARS :=
+DEB_ANT_BUILD_TARGET := package
+DEB_ANT_BUILDFILE := ./debian/build.xml
+DEB_ANT_ARGS := -Dpackage=$(PACKAGE) -Dversion=$(VERSION)
+
+binary-post-install/$(PACKAGE)::
+ dh_install -p$(PACKAGE) build/$(PACKAGE)-$(VERSION).jar /usr/share/java
+ dh_install -p$(PACKAGE) src/main/bin /usr
+ dh_install -p$(PACKAGE) src/main/share/* /usr/share/$(PACKAGE)
+ dh_link -p$(PACKAGE) /usr/share/java/$(PACKAGE)-$(VERSION).jar /usr/share/java/$(PACKAGE).jar
+
Property changes on: trunk/maven-repo-helper/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/maven-repo-helper/pom.xml
===================================================================
--- trunk/maven-repo-helper/pom.xml (rev 0)
+++ trunk/maven-repo-helper/pom.xml 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>org.debian</groupId>
+ <artifactId>maven-repo-helper</artifactId>
+ <name>Maven Repo helper</name>
+ <packaging>jar</packaging>
+ <version>0.1</version>
+ <description>
+ Provides support for managing the Maven repository in a Debian distribution.
+ </description>
+
+ <inceptionYear>2001</inceptionYear>
+ <url>https://code.launchpad.net/maven-packaging-support/</url>
+ <licenses>
+ <license>
+ <name>BSD</name>
+ <url>http://opensource.org/licenses/bsd-license.php</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <developers>
+ <developer>
+ <name>Ludovic Claude</name>
+ <email>ludovic.claude at laposte.net</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ <timezone>+0</timezone>
+ </developer>
+ </developers>
+
+ <issueManagement>
+ <system>launchpad</system>
+ <url>https://bugs.launchpad.net/maven-packaging-support</url>
+ </issueManagement>
+ <scm>
+ <connection>scm:bzr:lp:~ludovicc/maven-packaging-support/maven-repo-helper</connection>
+ <developerConnection>scm:bzr:lp:~ludovicc/maven-packaging-support/maven-repo-helper</developerConnection>
+ <url>http://bazaar.launchpad.net/~ludovicc/maven-packaging-support/maven-repo-helper/files</url>
+ </scm>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ <version>1.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.4</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Added: trunk/maven-repo-helper/src/main/bin/dh_mavenrepo
===================================================================
--- trunk/maven-repo-helper/src/main/bin/dh_mavenrepo (rev 0)
+++ trunk/maven-repo-helper/src/main/bin/dh_mavenrepo 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,75 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_mavenrepo - manage the Maven repository when installing Java libraries
+
+=cut
+
+use strict;
+use File::Find;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_mavenrepo> [S<I<debhelper options>>] [B<-n>] [B<-X>I<item>] [B<-V> I<version>] [S<I<module dirs ...>>]
+
+=head1 DESCRIPTION
+
+dh_mavenrepo is a debhelper program that will scan your package for Maven
+POM files and generate installation scripts to keep the Debian parent POM
+in the Maven repository updated with the current list of libraries and their
+versions.
+
+dh_pycentral will also generate substitution variables: the
+${python:Provides} variable will contain versioned provides of the package
+(if the package's name starts with "python-"). A python-foo package could
+provide "python2.3-foo" and "python2.4-foo" at the same time. Python
+extensions have to provide those whereas it's only option for pure python
+modules.
+
+The ${python:Versions} variable should be used to provide the required
+XB-Python-Version field listing the python versions supported by the
+package.
+
+=head1 OPTIONS
+
+=over 4
+
+=item I<module dirs>
+
+If your package installs python modules in non-standard directories, you
+can make dh_pycentral check those directories by passing their names on the
+command line. By default, it will check /usr/lib/$PACKAGE, /usr/share/$PACKAGE, /usr/lib/games/$PACKAGE,
+/usr/share/games/$PACKAGE and /usr/lib/python?.?/site-packages.
+
+Note: only /usr/lib/python?.?/site-packages and the
+extra names on the command line are searched for binary (.so) modules.
+
+=item B<-V> I<version>
+
+If the .py files your package ships are meant to be used by a specific
+pythonX.Y version, you can use this option to specify the desired version,
+such as 2.3. Do not use if you ship modules in /usr/lib/site-python.
+
+With the new policy, this option is mostly deprecated. Use the
+XS-Python-Field to indicate that you're using a specific python version.
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postinst/postrm scripts.
+
+=item B<-X>I<item>, B<--exclude=>I<item>
+
+Exclude files that contain "item" anywhere in their filename from being
+taken into account to generate the python dependency. You may use this
+option multiple times to build up a list of things to exclude.
+
+=back
+
+=head1 CONFORMS TO
+
+Python policy, version 0.4.1 (2006-06-20)
+
+=cut
+
Added: trunk/maven-repo-helper/src/main/bin/mh_cleanpom
===================================================================
--- trunk/maven-repo-helper/src/main/bin/mh_cleanpom (rev 0)
+++ trunk/maven-repo-helper/src/main/bin/mh_cleanpom 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+CLEAN_ARGS=''
+if [ "$1" = "-d" ]; then
+ CLEAN_ARGS=$1
+ shift
+fi
+if [ "$1" = "--debian-parent" ]; then
+ CLEAN_ARGS=$1
+ shift
+fi
+POM=$1
+TARGET=$2
+POM_PROPS=$3
+VERSIONS_PROPS=$4
+SPEC=$5
+if [ -z "$POM" ]; then
+ if [ -f debian/pom.xml ]; then
+ POM="debian/pom.xml"
+ else
+ POM="pom.xml"
+ fi
+fi
+if [ -z "$TARGET" ]; then
+ TARGET="debian/tmp/pom.xml"
+fi
+if [ -z "$POM_PROPS" ]; then
+ POM_PROPS="debian/tmp/pom.properties"
+fi
+if [ -z "$VERSIONS_PROPS" ]; then
+ VERSIONS_PROPS="debian/tmp/versions.properties"
+fi
+if [ -z "$SPEC" ]; then
+ if [ -f debian/maven.spec ]; then
+ SPEC="debian/maven.spec"
+ fi
+fi
+
+java -cp /usr/share/java/maven-repo-helper.jar org.debian.maven.repo.POMCleaner $CLEAN_ARGS $POM $TARGET $POM_PROPS $VERSIONS_PROPS $SPEC
Added: trunk/maven-repo-helper/src/main/bin/mh_generate_scripts
===================================================================
--- trunk/maven-repo-helper/src/main/bin/mh_generate_scripts (rev 0)
+++ trunk/maven-repo-helper/src/main/bin/mh_generate_scripts 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,77 @@
+#!/bin/bash
+# Generate some of the build and installation scripts
+
+find_poms() {
+ if [ ! -f debian/$PACKAGE.poms ]; then
+ find . -path '*/.*' -prune -o -type f -print | grep -e /pom\.xml$ | grep -v "debian/tmp" | sed s,./,, > debian/$PACKAGE.poms
+ fi
+ cat debian/$PACKAGE.poms
+}
+
+PACKAGE=$1
+VERSION_PROPERTIES_FILE=$2
+
+if [ -z "$PACKAGE" ]; then
+ echo "Syntax:"
+ echo "mh_generate_scripts <binary package> [versions properties file]"
+ exit 1
+fi
+if [ -z "$VERSION_PROPERTIES_FILE" ]; then
+ VERSION_PROPERTIES_FILE="debian/tmp/versions.properties"
+fi
+
+# Automatic execution of mh_cleanpom to fill versions.properties
+if [ ! -f "$VERSION_PROPERTIES_FILE" ]; then
+ echo "$VERSION_PROPERTIES_FILE not found, trying to generate it by executing"
+ echo "mh_cleanpom on all pom.xml files"
+ find_poms | while read POM; do
+ echo "mh_cleanpom $POM"
+ mh_cleanpom $POM
+ done
+fi
+
+echo_script() {
+ echo "#!/bin/sh"
+ echo "set -e"
+ echo "LIBRARIES=\"$(cat $VERSION_PROPERTIES_FILE | grep -v ^#.* | sed s/\.version=/' '/ | tr '\n' ',')\""
+ echo "PACKAGE=\"$PACKAGE\""
+ cat /usr/share/maven-repo-helper/post$DO.tmpl
+}
+
+DO="inst"
+echo_script > debian/$PACKAGE.post$DO
+echo "debian/$PACKAGE.post$DO generated"
+DO="rm"
+echo_script > debian/$PACKAGE.post$DO
+echo "debian/$PACKAGE.post$DO generated"
+
+BIN_PACKAGE="\$(PACKAGE)"
+SOURCE=$(dpkg-parsechangelog | egrep '^Source:' | cut -f2 -d' ')
+if [ "lib$SOURCE-java" = "$PACKAGE" ]; then
+ BIN_PACKAGE="lib\$(PACKAGE)-java"
+elif [ "$SOURCE-java" = "$PACKAGE" ]; then
+ BIN_PACKAGE="\$(PACKAGE)-java"
+fi
+
+echo ""
+echo "Add the following lines to debian/rules"
+echo "You may need to correct manually some details"
+echo ""
+echo "PACKAGE := \$(DEB_SOURCE_PACKAGE)"
+echo "VERSION := \$(DEB_UPSTREAM_VERSION)"
+echo ""
+echo "binary-post-install/$BIN_PACKAGE::"
+
+if [ -f debian/tmp/pom.properties ]; then
+ source debian/tmp/pom.properties
+fi
+find_poms | while read POM; do
+ if [[ "$POM" = "pom.xml" || "$POM" = "debian/pom.xml" ]]; then
+ echo " mh_installpom --debian-parent -p$BIN_PACKAGE $POM"
+ echo " mh_installjar -p$BIN_PACKAGE $POM build/\$(PACKAGE)-\$(VERSION).jar usr/share/java/\$(PACKAGE)-\$(VERSION).jar usr/share/java/\$(PACKAGE).jar"
+ elif [ ! -z "$POM" ]; then
+ BASENAME=$(basename $(dirname $POM))
+ echo " mh_installpom -p$BIN_PACKAGE $POM"
+ echo " mh_installjar -p$BIN_PACKAGE $POM build/\$(PACKAGE)-\$(VERSION).jar usr/share/java/$BASENAME-\$(VERSION).jar usr/share/java/\$(PACKAGE).jar"
+ fi
+done
\ No newline at end of file
Added: trunk/maven-repo-helper/src/main/bin/mh_installjar
===================================================================
--- trunk/maven-repo-helper/src/main/bin/mh_installjar (rev 0)
+++ trunk/maven-repo-helper/src/main/bin/mh_installjar 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+set -e
+
+CLEAN_ARGS=''
+SPEC=''
+
+if [ "$1" = "-d" ]; then
+ CLEAN_ARGS=$1
+ shift
+fi
+if [ "$1" = "--debian-parent" ]; then
+ CLEAN_ARGS=$1
+ shift
+fi
+if [ "$1" = "-s" ]; then
+ shift
+ SPEC=$1
+ shift
+fi
+if [ "$1" = "--spec" ]; then
+ shift
+ SPEC=$1
+ shift
+fi
+
+PACKAGE=$1
+
+if [ ! -z "${PACKAGE##-p}" ]; then
+ PACKAGE=${PACKAGE##-p}
+fi
+
+POM=$2
+JAR=$3
+
+if [ -z "$SPEC" ]; then
+ if [ -f debian/maven.spec ]; then
+ SPEC="debian/maven.spec"
+ fi
+fi
+
+mkdir -p debian/tmp 2> /dev/null
+mh_cleanpom $CLEAN_ARGS $POM debian/tmp/pom.xml debian/tmp/pom.properties debian/tmp/notused.properties $SPEC
+source debian/tmp/pom.properties
+
+GROUP_PATH=$(echo $GROUP_ID | tr . / )
+cp $JAR debian/tmp/${ARTIFACT_ID}-${VERSION}.jar
+dh_install -p${PACKAGE} --sourcedir=debian/tmp ${ARTIFACT_ID}-${VERSION}.jar \
+ usr/share/maven-repo/${GROUP_PATH}/${ARTIFACT_ID}/${VERSION}
+
+while [ ! -z "$4" ]; do
+ LINK_JAR=$4
+ shift
+ dh_link -p${PACKAGE} usr/share/maven-repo/${GROUP_PATH}/${ARTIFACT_ID}/${VERSION}/${ARTIFACT_ID}-${VERSION}.jar \
+ $LINK_JAR;
+done
Added: trunk/maven-repo-helper/src/main/bin/mh_installpom
===================================================================
--- trunk/maven-repo-helper/src/main/bin/mh_installpom (rev 0)
+++ trunk/maven-repo-helper/src/main/bin/mh_installpom 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+set -e
+
+CLEAN_ARGS=''
+SPEC=''
+
+if [ "$1" = "-d" ]; then
+ CLEAN_ARGS=$1
+ shift
+fi
+if [ "$1" = "--debian-parent" ]; then
+ CLEAN_ARGS=$1
+ shift
+fi
+if [ "$1" = "-s" ]; then
+ shift
+ SPEC=$1
+ shift
+fi
+if [ "$1" = "--spec" ]; then
+ shift
+ SPEC=$1
+ shift
+fi
+
+PACKAGE=$1
+
+if [ ! -z "${PACKAGE##-p}" ]; then
+ PACKAGE=${PACKAGE##-p}
+fi
+
+POM=$2
+INSTALLED_JAR=$3
+
+if [ -z "$SPEC" ]; then
+ if [ -f debian/maven.spec ]; then
+ SPEC="debian/maven.spec"
+ fi
+fi
+
+mkdir -p debian/tmp 2> /dev/null
+mh_cleanpom $CLEAN_ARGS $POM debian/tmp/pom.xml debian/tmp/pom.properties debian/tmp/versions.properties $SPEC
+source debian/tmp/pom.properties
+
+GROUP_PATH=$(echo $GROUP_ID | tr . / )
+mv debian/tmp/pom.xml debian/tmp/${ARTIFACT_ID}-${VERSION}.pom
+dh_install -p${PACKAGE} --sourcedir=debian/tmp ${ARTIFACT_ID}-${VERSION}.pom \
+ usr/share/maven-repo/${GROUP_PATH}/${ARTIFACT_ID}/${VERSION}
+
+if [ ! -z "$INSTALLED_JAR" ]; then
+ dh_link -p${PACKAGE} $INSTALLED_JAR \
+ usr/share/maven-repo/${GROUP_PATH}/${ARTIFACT_ID}/${VERSION}/${ARTIFACT_ID}-${VERSION}.jar;
+fi
Added: trunk/maven-repo-helper/src/main/bin/mvn-repo
===================================================================
--- trunk/maven-repo-helper/src/main/bin/mvn-repo (rev 0)
+++ trunk/maven-repo-helper/src/main/bin/mvn-repo 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,2 @@
+#!/bin/sh
+java -cp /usr/share/java/maven-repo-helper.jar org.debian.maven.repo.DebianPOM "$@"
Added: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DebianPOM.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DebianPOM.java (rev 0)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DebianPOM.java 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,288 @@
+package org.debian.maven.repo;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Manages the Debian POM.
+ *
+ * Can add or remove library properties to that POM and create it if it did not
+ * exist before.
+ *
+ * @author Ludovic Claude
+ */
+public class DebianPOM {
+
+ private static final Logger log = Logger.getLogger(DebianPOM.class.getName());
+
+ public void addLibrary(File pom, File updatedPom, Map libraryProperties) {
+ Map remainingProperties = new TreeMap(libraryProperties);
+ final XMLInputFactory factory = XMLInputFactory.newInstance();
+ XMLOutputFactory outFactory = XMLOutputFactory.newInstance();
+ Writer out = null;
+ try {
+ out = new BufferedWriter(new FileWriter(updatedPom));
+ XMLStreamWriter writer = outFactory.createXMLStreamWriter(out);
+
+ if (!pom.exists()) {
+ pom.getParentFile().mkdirs();
+ writer.writeStartDocument("UTF-8", "1.0");
+ writer.writeCharacters("\n");
+ writer.writeStartElement("project");
+ writer.writeCharacters("\n\t");
+ writer.writeStartElement("groupId");
+ writer.writeCharacters("org.debian");
+ writer.writeEndElement();
+ writer.writeCharacters("\n\t");
+ writer.writeStartElement("artifactId");
+ writer.writeCharacters("debian-parent");
+ writer.writeEndElement();
+ writer.writeCharacters("\n\t");
+ writer.writeStartElement("version");
+ writer.writeCharacters("1.0-SNAPSHOT");
+ writer.writeEndElement();
+ writer.writeCharacters("\n\t");
+ writer.writeStartElement("properties");
+ } else {
+
+ final XMLStreamReader parser = factory.createXMLStreamReader(new BufferedReader(new FileReader(pom)));
+ int inProperties = 0;
+ String property = null;
+
+ writer.writeStartDocument("UTF-8", "1.0");
+
+ copy:
+ for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) {
+ switch (event) {
+ case XMLStreamConstants.START_ELEMENT: {
+ String element = parser.getLocalName();
+ if ("properties".equals(element)) {
+ inProperties++;
+ } else if (inProperties > 0) {
+ property = element;
+ }
+ writer.writeStartElement(element);
+ break;
+ }
+
+ case XMLStreamConstants.END_ELEMENT: {
+ String element = parser.getLocalName();
+ if (isDeclaration(element)) {
+ writer.writeEndElement();
+ } else if ("properties".equals(element)) {
+ inProperties--;
+ break copy;
+ } else if (inProperties > 0 && property != null) {
+ writer.writeEndElement();
+ property = null;
+ }
+ break;
+ }
+
+ case XMLStreamConstants.CHARACTERS: {
+ String value = parser.getText();
+ if (inProperties == 0) {
+ writer.writeCharacters(value);
+ } else if (property != null) {
+ if (remainingProperties.containsKey(property)) {
+ value = (String) remainingProperties.get(property);
+ remainingProperties.remove(property);
+ }
+ writer.writeCharacters(value);
+ } else if ("\n\t\t".equals(value)) {
+ // After end of a property, but not before end of
+ // <properties> tag.
+ writer.writeCharacters(value);
+ }
+ break;
+ }
+ } // end switch
+ } // end for
+ parser.close();
+ }
+
+ for (Iterator i = remainingProperties.entrySet().iterator(); i.hasNext(); ) {
+ Map.Entry entry = (Map.Entry)i.next();
+ writer.writeCharacters("\n\t\t");
+ writer.writeStartElement((String) entry.getKey());
+ writer.writeCharacters((String) entry.getValue());
+ writer.writeEndElement();
+ }
+
+ writer.writeCharacters("\n\t");
+ writer.writeEndElement();
+ writer.writeCharacters("\n");
+ writer.writeEndDocument();
+ writer.flush();
+ writer.close();
+ } catch (IOException ex) {
+ log.log(Level.SEVERE, "IO Error", ex);
+ return;
+ } catch (XMLStreamException ex) {
+ log.log(Level.SEVERE, "Error when reading the XML document", ex);
+ return;
+ } finally {
+ try {
+ if (out != null) {
+ out.close();
+ }
+ } catch (IOException ex) {
+ log.log(Level.SEVERE, null, ex);
+ return;
+ }
+ }
+
+ if (updatedPom.exists()) {
+ pom.delete();
+ if (!updatedPom.renameTo(pom)) {
+ System.err.println("Cannot update " + pom.getAbsolutePath());
+ }
+ }
+ }
+
+ public void removeLibrary(File pom, File updatedPom, String oldProperty1, String oldProperty2) {
+ if (!pom.exists()) {
+ return;
+ }
+
+ final XMLInputFactory factory = XMLInputFactory.newInstance();
+ XMLOutputFactory outFactory = XMLOutputFactory.newInstance();
+ Writer out = null;
+ try {
+ out = new BufferedWriter(new FileWriter(updatedPom));
+ XMLStreamWriter writer = outFactory.createXMLStreamWriter(out);
+
+ final XMLStreamReader parser = factory.createXMLStreamReader(new BufferedReader(new FileReader(pom)));
+ int inProperties = 0;
+ String property = null;
+
+ writer.writeStartDocument("UTF-8", "1.0");
+
+ for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) {
+ switch (event) {
+ case XMLStreamConstants.START_ELEMENT: {
+ String element = parser.getLocalName();
+ if ("properties".equals(element)) {
+ inProperties++;
+ writer.writeStartElement(element);
+ } else if (inProperties > 0) {
+ property = element;
+ if (!property.equals(oldProperty1) && !property.equals(oldProperty2)) {
+ writer.writeStartElement(element);
+ }
+ } else {
+ writer.writeStartElement(element);
+ }
+ break;
+ }
+
+ case XMLStreamConstants.END_ELEMENT: {
+ String element = parser.getLocalName();
+ if ("properties".equals(element)) {
+ writer.writeEndElement();
+ inProperties--;
+ } else if (inProperties > 0 && property != null) {
+ if (!property.equals(oldProperty1) && !property.equals(oldProperty2)) {
+ writer.writeEndElement();
+ }
+ property = null;
+ } else {
+ writer.writeEndElement();
+ }
+ break;
+ }
+
+ case XMLStreamConstants.CHARACTERS: {
+ String value = parser.getText();
+ if (property != null) {
+ if (!property.equals(oldProperty1) && !property.equals(oldProperty2)) {
+ writer.writeCharacters(value);
+ }
+ } else {
+ writer.writeCharacters(value);
+ }
+ break;
+ }
+ } // end switch
+ } // end for
+ parser.close();
+
+ writer.writeEndDocument();
+ writer.flush();
+ writer.close();
+ } catch (IOException ex) {
+ log.log(Level.SEVERE, "IO Error", ex);
+ return;
+ } catch (XMLStreamException ex) {
+ log.log(Level.SEVERE, "Error when reading the XML document", ex);
+ return;
+ } finally {
+ try {
+ if (out != null) {
+ out.close();
+ }
+ } catch (IOException ex) {
+ log.log(Level.SEVERE, null, ex);
+ return;
+ }
+ }
+
+ if (updatedPom.exists()) {
+ pom.delete();
+ if (!updatedPom.renameTo(pom)) {
+ System.err.println("Cannot update " + pom.getAbsolutePath());
+ }
+ }
+
+ }
+
+ private boolean isDeclaration(String element) {
+ return "groupId".equals(element) || "artifactId".equals(element) || "version".equals(element);
+ }
+
+ public static void main(String[] args) {
+ try {
+ DebianPOM dp = new DebianPOM();
+ File pom = new File(args[1]);
+ File updatedPom = File.createTempFile("pom", "tmp");
+
+ if (args[0].equals("add")) {
+ String property = args[2];
+ String version = args[3];
+ String pkg = args[4];
+
+ Map properties = new HashMap();
+ properties.put(property + ".version", version);
+ properties.put(property + ".package", pkg);
+ dp.addLibrary(pom, updatedPom, properties);
+
+ } else if (args[0].equals("remove")) {
+ String property = args[2];
+ dp.removeLibrary(pom, updatedPom, property + ".version", property + ".package");
+ } else {
+ System.err.println("Invalid arguments. Syntax is");
+ System.err.println("mvn-repo add <property> <version> <package>");
+ System.err.println("mvn-repo remove <property>");
+ }
+ } catch (IOException ex) {
+ log.log(Level.SEVERE, null, ex);
+ }
+ }
+}
Added: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Dependency.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Dependency.java (rev 0)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Dependency.java 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,79 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.debian.maven.repo;
+
+/**
+ *
+ * @author ludo
+ */
+public class Dependency {
+
+ private String groupId;
+ private String artifactId;
+ private String type;
+ private String version;
+
+ public Dependency() {
+ }
+
+ public Dependency(String groupId, String artifactId, String type, String version) {
+ this.groupId = groupId;
+ this.artifactId = artifactId;
+ this.type = type;
+ this.version = version;
+ }
+
+ public String getArtifactId() {
+ return artifactId;
+ }
+
+ public void setArtifactId(String artifactId) {
+ this.artifactId = artifactId;
+ }
+
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final Dependency other = (Dependency) obj;
+ return true;
+ }
+
+ public int hashCode() {
+ int hash = 7;
+ hash = 31 * hash + (this.groupId != null ? this.groupId.hashCode() : 0);
+ hash = 31 * hash + (this.artifactId != null ? this.artifactId.hashCode() : 0);
+ hash = 31 * hash + (this.type != null ? this.type.hashCode() : 0);
+ hash = 31 * hash + (this.version != null ? this.version.hashCode() : 0);
+ return hash;
+ }
+}
Added: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMCleaner.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMCleaner.java (rev 0)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMCleaner.java 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,488 @@
+package org.debian.maven.repo;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.LineNumberReader;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Cleans up a POM for inclusion in the /usr/share/maven-repo/ repository.
+ *
+ * All POMs should contain only
+ *
+ * @author Ludovic Claude
+ */
+public class POMCleaner {
+
+ private static final Logger log = Logger.getLogger(POMCleaner.class.getName());
+ private static final List IGNORED_ELEMENTS = Arrays.asList(new String[]{"build",
+ "distributionManagement", "profiles", "ciManagement", "prerequisites",
+ "repositories", "pluginRepositories", "reports", "reporting"});
+ private static final List INFO_ELEMENTS = Arrays.asList(new String[]{"groupId",
+ "artifactId", "packaging", "version"});
+ private final XMLInputFactory factory = XMLInputFactory.newInstance();
+
+ public void cleanPom(File originalPom, File targetPom, File pomProperties, File versionProperties,
+ boolean inheritFromDebian, Collection specialCases) {
+
+ targetPom.getParentFile().mkdirs();
+ pomProperties.getParentFile().mkdirs();
+ versionProperties.getParentFile().mkdirs();
+
+ XMLOutputFactory outFactory = XMLOutputFactory.newInstance();
+ Writer out = null;
+ try {
+ // First pass - read information for this POM
+ Dependency pomInfo = readPOMInfo(originalPom);
+ // Second pass - collect version and parent information
+ List dependencies = readDependencies(originalPom, inheritFromDebian);
+
+ // Third pass - create the new document
+ int inIgnoredElement = 0;
+ int inParent = 0;
+ int inDependency = 0;
+ int inLevel = 0;
+ int dependencyIndex = -1;
+ String element = null;
+ boolean afterText = false;
+ XMLStreamReader parser = factory.createXMLStreamReader(new BufferedReader(new FileReader(originalPom)));
+ out = new BufferedWriter(new FileWriter(targetPom));
+ XMLStreamWriter writer = outFactory.createXMLStreamWriter(out);
+
+ writer.writeStartDocument("UTF-8", "1.0");
+
+ for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) {
+ switch (event) {
+ case XMLStreamConstants.START_ELEMENT: {
+ element = parser.getLocalName();
+ if (isIgnoredElement(element, inheritFromDebian) || inIgnoredElement > 0 || "modelVersion".equals(element) || (inDependency == 0 && inParent == 0 && isInfoElement(element))) {
+ inIgnoredElement++;
+ } else {
+ indent(writer, inLevel);
+ writer.writeStartElement(element);
+ inLevel++;
+
+ if ("project".equals(element) && inLevel == 1) {
+ indent(writer, inLevel);
+ if (inheritFromDebian) {
+ writer.writeStartElement("parent");
+ indent(writer, inLevel + 1);
+ writer.writeStartElement("groupId");
+ writer.writeCharacters("org.debian");
+ writer.writeEndElement();
+ indent(writer, inLevel + 1);
+ writer.writeStartElement("artifactId");
+ writer.writeCharacters("debian-parent");
+ writer.writeEndElement();
+ indent(writer, inLevel + 1);
+ writer.writeStartElement("version");
+ writer.writeCharacters("1.0-SNAPSHOT");
+ writer.writeEndElement();
+ indent(writer, inLevel);
+ writer.writeEndElement();
+ indent(writer, inLevel);
+ }
+ writer.writeStartElement("modelVersion");
+ writer.writeCharacters("4.0.0");
+ writer.writeEndElement();
+ indent(writer, inLevel);
+ writer.writeStartElement("groupId");
+ writer.writeCharacters(pomInfo.getGroupId());
+ writer.writeEndElement();
+ indent(writer, inLevel);
+ writer.writeStartElement("artifactId");
+ writer.writeCharacters(pomInfo.getArtifactId());
+ writer.writeEndElement();
+ indent(writer, inLevel);
+ writer.writeStartElement("version");
+ writer.writeCharacters(pomInfo.getVersion());
+ writer.writeEndElement();
+ indent(writer, inLevel);
+ writer.writeStartElement("packaging");
+ writer.writeCharacters(pomInfo.getType());
+ writer.writeEndElement();
+ indent(writer, inLevel);
+ } else if ("parent".equals(element)) {
+ inParent++;
+ } else if (inParent > 0) {
+ inParent++;
+ } else if ("dependency".equals(element)) {
+ inDependency++;
+ dependencyIndex++;
+ } else if (inDependency > 0) {
+ inDependency++;
+ }
+ }
+ break;
+ }
+
+ case XMLStreamConstants.END_ELEMENT: {
+ if (inIgnoredElement > 0) {
+ inIgnoredElement--;
+ } else {
+ inLevel--;
+ if (inDependency > 0) {
+ inDependency--;
+ }
+ if (inParent > 0) {
+ inParent--;
+ }
+ if (!afterText) {
+ indent(writer, inLevel);
+ }
+ writer.writeEndElement();
+ afterText = false;
+ }
+ element = null;
+ break;
+ }
+
+ case XMLStreamConstants.CHARACTERS: {
+ if (inIgnoredElement == 0) {
+ String value = parser.getText().trim();
+ if (inDependency > 0 && "version".equals(element)) {
+ Dependency dependency = (Dependency) dependencies.get(dependencyIndex);
+ value = "${" + versionProperty(dependency, specialCases) + "}";
+ }
+ writer.writeCharacters(value);
+ afterText = !value.isEmpty();
+ }
+ break;
+ }
+
+ } // end switch
+ } // end for
+ parser.close();
+
+ writer.writeEndDocument();
+ writer.flush();
+ writer.close();
+
+ Properties pomProps = new Properties();
+ pomProps.put("GROUP_ID", pomInfo.getGroupId());
+ pomProps.put("ARTIFACT_ID", pomInfo.getArtifactId());
+ pomProps.put("TYPE", pomInfo.getType());
+ pomProps.put("VERSION", pomInfo.getVersion());
+ FileWriter pomWriter = new FileWriter(pomProperties);
+ pomProps.store(pomWriter, "POM properties");
+ pomWriter.close();
+
+ Properties versions = new Properties();
+ if (versionProperties.exists()) {
+ versions.load(new FileReader(versionProperties));
+ versionProperties.delete();
+ }
+ versions.put(versionProperty(pomInfo, specialCases), pomInfo.getVersion());
+ FileWriter versionsWriter = new FileWriter(versionProperties);
+ versions.store(versionsWriter, "Version properties");
+ versionsWriter.close();
+
+ } catch (IOException ex) {
+ log.log(Level.SEVERE, null, ex);
+ return;
+ } catch (XMLStreamException ex) {
+ log.log(Level.SEVERE, null, ex);
+ return;
+ } finally {
+ try {
+ if (out != null) {
+ out.close();
+ }
+ } catch (IOException ex) {
+ log.log(Level.SEVERE, null, ex);
+ return;
+ }
+ }
+ }
+
+ protected Dependency readPOMInfo(File pom) throws XMLStreamException, FileNotFoundException {
+ XMLStreamReader parser = factory.createXMLStreamReader(new BufferedReader(new FileReader(pom)));
+ Dependency dependency = new Dependency(null, null, "jar", null);
+ int inIgnoredElement = 0;
+ int inParent = 0;
+ String element = null;
+
+ // First pass - collect version and parent information
+ for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) {
+ switch (event) {
+ case XMLStreamConstants.START_ELEMENT: {
+ element = parser.getLocalName();
+ if (inIgnoredElement == 0 && "parent".equals(element)) {
+ inParent++;
+ } else if (inIgnoredElement == 0 && isInfoElement(element)) {
+ if (inParent > 0) {
+ inParent++;
+ }
+ } else if (!"project".equals(element)) {
+ inIgnoredElement++;
+ }
+ break;
+ }
+
+ case XMLStreamConstants.END_ELEMENT: {
+ if (inIgnoredElement > 0) {
+ inIgnoredElement--;
+ } else {
+ if (inParent > 0) {
+ inParent--;
+ }
+ }
+ element = null;
+ break;
+ }
+
+ case XMLStreamConstants.CHARACTERS: {
+ String value = parser.getText().trim();
+ if (inIgnoredElement == 0) {
+ if ("groupId".equals(element)) {
+ if (inParent == 0 || dependency.getGroupId() == null) {
+ dependency.setGroupId(value);
+ }
+ } else if ("artifactId".equals(element)) {
+ if (inParent == 0 || dependency.getArtifactId() == null) {
+ dependency.setArtifactId(value);
+ }
+ } else if ("version".equals(element)) {
+ if (inParent == 0 || dependency.getVersion() == null) {
+ dependency.setVersion(value);
+ }
+ } else if ("packaging".equals(element)) {
+ if (inParent == 0) {
+ dependency.setType(value);
+ }
+ }
+ }
+ break;
+ }
+
+ } // end switch
+ } // end for
+ parser.close();
+
+ return dependency;
+ }
+
+ protected List readDependencies(File originalPom, boolean inheritFromDebian) throws XMLStreamException, FileNotFoundException {
+ XMLStreamReader parser = factory.createXMLStreamReader(new BufferedReader(new FileReader(originalPom)));
+ List dependencies = new ArrayList();
+ int inIgnoredElement = 0;
+ int inDependency = 0;
+ String element = null;
+
+ // First pass - collect version and parent information
+ for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) {
+ switch (event) {
+ case XMLStreamConstants.START_ELEMENT: {
+ element = parser.getLocalName();
+ if (isIgnoredElement(element, inheritFromDebian) || inIgnoredElement > 0) {
+ inIgnoredElement++;
+ } else {
+ if ("dependency".equals(element)) {
+ inDependency++;
+ dependencies.add(new Dependency(null, null, "jar", null));
+ } else if (inDependency > 0) {
+ inDependency++;
+ }
+ }
+ break;
+ }
+
+ case XMLStreamConstants.END_ELEMENT: {
+ if (inIgnoredElement > 0) {
+ inIgnoredElement--;
+ } else {
+ if (inDependency > 0) {
+ inDependency--;
+ }
+ }
+ element = null;
+ break;
+ }
+
+ case XMLStreamConstants.CHARACTERS: {
+ String value = parser.getText().trim();
+ if (inDependency > 0) {
+ Dependency dependency = (Dependency) dependencies.get(dependencies.size() - 1);
+ if ("groupId".equals(element)) {
+ dependency.setGroupId(value);
+ } else if ("artifactId".equals(element)) {
+ dependency.setArtifactId(value);
+ } else if ("type".equals(element)) {
+ dependency.setType(value);
+ } else if ("version".equals(element)) {
+ dependency.setVersion(value);
+ }
+ }
+ break;
+ }
+
+ } // end switch
+ } // end for
+ parser.close();
+
+ return dependencies;
+ }
+
+ protected void indent(XMLStreamWriter writer, int inLevel) throws XMLStreamException {
+ writer.writeCharacters("\n");
+ for (int i = 0; i < inLevel; i++) {
+ writer.writeCharacters("\t");
+ }
+ }
+
+ protected boolean isIgnoredElement(String element, boolean inheritFromDebian) {
+ if (inheritFromDebian && "parent".equals(element)) {
+ return true;
+ }
+ return IGNORED_ELEMENTS.contains(element);
+ }
+
+ protected boolean isInfoElement(String element) {
+ return INFO_ELEMENTS.contains(element);
+ }
+
+ protected String versionProperty(Dependency dependency, Collection specialCases) {
+ for (Iterator i = specialCases.iterator(); i.hasNext();) {
+ Dependency specialCase = (Dependency) i.next();
+ if (matches(specialCase.getGroupId(), dependency.getGroupId()) &&
+ matches(specialCase.getArtifactId(), dependency.getArtifactId()) &&
+ matches(specialCase.getType(), dependency.getType())) {
+ String groupId = specialCase.getGroupId().replace("*", "__");
+ String artifactId = specialCase.getArtifactId().replace("*", "__");
+ String type = specialCase.getType().replace("*", "__");
+ String version = specialCase.getVersion().replace("*", "__");
+ return groupId + "." + artifactId + "." + type + "." + version + ".version";
+ }
+ }
+ String groupId = dependency.getGroupId();
+ String artifactId = dependency.getArtifactId();
+ String type = dependency.getType();
+ if (type == null) {
+ type = "jar";
+ }
+ return groupId + "." + artifactId + "." + type + ".debian.version";
+ }
+
+ private boolean matches(String reference, String test) {
+ String regex = reference.replace(".", "\\.").replace("*", "[\\w\\d-]*").replace("__", "[\\w\\d-]*");
+ return test.matches(regex);
+ }
+
+ public static void main(String[] args) {
+ if (args.length == 0 || "-h".equals(args[0]) || "--help".equals(args[0])) {
+ System.out.println("Purpose: cleans a Maven POM for inclusion in the Debian/Maven repository in /usr/share/maven-repo");
+ System.out.println("Usage: [option] original-pom target-file versions-properties [special-dependencies]");
+ System.out.println("");
+ System.out.println("Options:");
+ System.out.println(" -d, --debian-parent: target POM will inherit directly from the Debian parent POM");
+ System.out.println("");
+ System.out.println("Arguments:");
+ System.out.println(" original-pom: location of the original POM");
+ System.out.println(" target-file: where the cleaned POM will be written to");
+ System.out.println(" versions-properties: the version for this POM will be added to this properties file");
+ System.out.println(" special-dependencies: optional file containing the list of special cases");
+ System.out.println(" for transforming dependency versions into properties");
+ System.out.println("");
+ System.out.println("Description:");
+ System.out.println(" Cleans a Maven POM and prepare it for inclusion in the Debian");
+ System.out.println(" repository for Maven.");
+ System.out.println();
+ System.out.println(" POMs present in this repository should always inherit either");
+ System.out.println(" directly or indirectly from the parent POM");
+ System.out.println(" (org.debian:debian-parent:1.0-SNAPSHOT).");
+ System.out.println(" Build, profiles and other build time only sections of the POM");
+ System.out.println(" should be stripped.");
+ System.out.println();
+ System.out.println(" If versions are given for a dependency, this version will be");
+ System.out.println(" replaced by a property of the form");
+ System.out.println(" [groupId].[artifactId].[type].[debian version].version");
+ System.out.println(" By default, groupId is the current groupId, idem for");
+ System.out.println(" artifactId and type (jar/war/ear/ejb/pom...) and debian version");
+ System.out.println(" is 'debian'");
+ System.out.println();
+ System.out.println(" You can modify those defaults with the help of the");
+ System.out.println(" special-dependencies file. This file should contain the following lines:");
+ System.out.println(" [groupId].[artifactId].[type].[debian version]");
+ System.out.println(" where groupId, artifactId and type can be the explicit attribute to");
+ System.out.println(" match, or can contain a wildcard (either * or __ ) in order to use");
+ System.out.println(" one version property for several related dependencies.");
+ System.out.println();
+ System.out.println(" The dependency version is never matched.");
+ System.out.println(" The Debian version is usually 'debian', but can be anything else if");
+ System.out.println(" you need to have several versions of the same library in the Maven");
+ System.out.println(" repository.");
+ return;
+ }
+ POMCleaner cleaner = new POMCleaner();
+ Collection specialCases = new ArrayList();
+ int i = inc(-1, args);
+ boolean inheritFromDebian = false;
+ if ("--debian-parent".equals(args[0]) || "-d".equals(args[0])) {
+ inheritFromDebian = true;
+ i = inc(i, args);
+ }
+ File originalPom = new File(args[i++]);
+ File targetPom = new File(args[i++]);
+ File pomProperties = new File(args[i++]);
+ File versionProperties = new File(args[i++]);
+ if (i < args.length) {
+ String specialDependencies = args[i++];
+ File sdFile = new File(specialDependencies);
+ if (!sdFile.exists()) {
+ System.err.println("Cannot find file: " + sdFile);
+ } else {
+ try {
+ LineNumberReader lnr = new LineNumberReader(new FileReader(sdFile));
+ String line = null;
+ while ((line = lnr.readLine()) != null) {
+ line = line.trim();
+ if (line.isEmpty()) {
+ break;
+ }
+ int dot = line.lastIndexOf('.');
+ String version = line.substring(dot + 1);
+ line = line.substring(0, dot);
+ dot = line.lastIndexOf('.');
+ String type = line.substring(dot + 1);
+ line = line.substring(0, dot);
+ dot = line.lastIndexOf('.');
+ String artifactId = line.substring(dot + 1);
+ String groupId = line.substring(0, dot);
+ specialCases.add(new Dependency(groupId, artifactId, type, version));
+ }
+
+ } catch (IOException ex) {
+ log.log(Level.SEVERE, null, ex);
+ }
+ }
+ }
+
+ cleaner.cleanPom(originalPom, targetPom, pomProperties, versionProperties, inheritFromDebian, specialCases);
+ }
+
+ private static int inc(int i, String[] args) {
+ do {
+ i++;
+ } while (i < args.length && args[i].isEmpty());
+ return i;
+ }
+}
Added: trunk/maven-repo-helper/src/main/share/postinst.tmpl
===================================================================
--- trunk/maven-repo-helper/src/main/share/postinst.tmpl (rev 0)
+++ trunk/maven-repo-helper/src/main/share/postinst.tmpl 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,40 @@
+DEBIAN_POM="/usr/share/maven-repo/org/debian/debian-parent/1.0-SNAPSHOT/debian-parent-1.0-SNAPSHOT.pom"
+
+if [ ! -f $DEBIAN_POM ]; then
+ mkdir -p $(dirname $DEBIAN_POM)
+ echo "<?xml version="1.0" encoding="UTF-8"?>" > $DEBIAN_POM
+ echo "<project>" >> $DEBIAN_POM
+ echo " <groupId>org.debian</groupId>" >> $DEBIAN_POM
+ echo " <artifactId>debian-parent</artifactId>" >> $DEBIAN_POM
+ echo " <version>1.0-SNAPSHOT</version>" >> $DEBIAN_POM
+ echo " <properties>" >> $DEBIAN_POM
+ echo " </properties>" >> $DEBIAN_POM
+ echo "</project>" >> $DEBIAN_POM
+fi
+
+add_repo_property() {
+ VERSION_PROPERTY=$1
+ LIBVER=$2
+ if [ $(grep "<${VERSION_PROPERTY}\.version>" $DEBIAN_POM) ]; then
+ # Update version
+ cat $DEBIAN_POM | sed "s,<${VERSION_PROPERTY}\.version>.*</,<${VERSION_PROPERTY}.version>$LIBVER</," > pom.tmp
+ else
+ cat $DEBIAN_POM | grep -v "</properties>" | grep -v "</project>" > pom.tmp
+ echo " <${VERSION_PROPERTY}.package>$PACKAGE</${VERSION_PROPERTY}.package>" >> pom.tmp
+ echo " <${VERSION_PROPERTY}.version>$LIBVER</${VERSION_PROPERTY}.version>" >> pom.tmp
+ echo " </properties>" >> pom.tmp
+ echo "</project>" >> pom.tmp
+ fi
+ rm $DEBIAN_POM
+ mv pom.tmp $DEBIAN_POM
+}
+
+if [ "$1" = "configure" ]; then
+ echo $LIBRARIES | tr ',' '\n' | while read VERSION_PROPERTY LIBVER; do
+ if [ ! -z "$VERSION_PROPERTY" ]; then
+ add_repo_property $VERSION_PROPERTY $LIBVER
+ fi
+ done
+fi
+
+#DEBHELPER#
Added: trunk/maven-repo-helper/src/main/share/postrm.tmpl
===================================================================
--- trunk/maven-repo-helper/src/main/share/postrm.tmpl (rev 0)
+++ trunk/maven-repo-helper/src/main/share/postrm.tmpl 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,33 @@
+DEBIAN_POM="/usr/share/maven-repo/org/debian/debian-parent/1.0-SNAPSHOT/debian-parent-1.0-SNAPSHOT.pom"
+
+remove_repo_property() {
+ VERSION_PROPERTY=$1
+ cat $DEBIAN_POM | grep -v "<$VERSION_PROPERTY" > pom.tmp
+ rm $DEBIAN_POM
+ mv pom.tmp $DEBIAN_POM
+}
+
+properties_start_tag_line() {
+ grep -n "<properties>" $DEBIAN_POM | cut -d':' -f1
+}
+
+properties_end_tag_line() {
+ grep -n "</properties>" $DEBIAN_POM | cut -d':' -f1
+}
+
+if [ "$1" = "remove" ]; then
+ echo $LIBRARIES | tr ',' '\n' | while read VERSION_PROPERTY LIBVER; do
+ if [ ! -z "$VERSION_PROPERTY" ]; then
+ remove_repo_property $VERSION_PROPERTY
+ fi
+ done
+ # Detect if DEBIAN_POM is empty
+ TAG_START=$(properties_start_tag_line)
+ TAG_END=$(properties_end_tag_line)
+ if [ $(($TAG_START+1)) -eq $TAG_END ]; then
+ rm $DEBIAN_POM
+ rmdir --ignore-fail-on-non-empty -p $(dirname $DEBIAN_POM)
+ fi
+fi
+
+#DEBHELPER#
Added: trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/BaseTest.java
===================================================================
--- trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/BaseTest.java (rev 0)
+++ trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/BaseTest.java 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,95 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.debian.maven.repo;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.apache.commons.io.IOUtils;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+
+/**
+ *
+ * @author ludo
+ */
+public class BaseTest {
+
+ protected static File testDir = new File("tmp");
+ private List<Reader> openedReaders = new ArrayList();
+ protected File pom;
+ protected File updatedPom;
+
+ @BeforeClass
+ public static void setUpClass() throws Exception {
+ testDir.mkdir();
+ XMLUnit.setIgnoreWhitespace(true);
+ }
+
+ @AfterClass
+ public static void tearDownClass() throws Exception {
+ testDir.delete();
+ }
+
+ @Before
+ public void setUp() {
+ pom = new File(testDir, "original.pom");
+ updatedPom = new File(testDir, "updated.pom");
+ }
+
+ @After
+ public void tearDown() {
+ if (pom.exists()) {
+ pom.delete();
+ }
+ if (updatedPom.exists()) {
+ updatedPom.delete();
+ }
+ for (Reader reader : openedReaders) {
+ try {
+ reader.close();
+ } catch (IOException ex) {
+ Logger.getLogger(BaseTest.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ }
+ openedReaders.clear();
+ }
+
+ protected void useFile(String resource, File file) throws IOException {
+ final FileWriter out = new FileWriter(file);
+ final Reader in = read(resource);
+ IOUtils.copy( in,out);
+ in.close();
+ out.close();
+ }
+
+ protected void usePom(String resource) throws IOException {
+ useFile(resource, pom);
+ }
+
+ protected Reader read(String resource) {
+ Reader r = new InputStreamReader(this.getClass().getResourceAsStream("/" + resource));
+ openedReaders.add(r);
+ return r;
+ }
+
+ protected Reader read(File f) throws FileNotFoundException {
+ Reader r = new FileReader(f);
+ openedReaders.add(r);
+ return r;
+ }
+
+}
\ No newline at end of file
Added: trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/DebianPOMTest.java
===================================================================
--- trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/DebianPOMTest.java (rev 0)
+++ trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/DebianPOMTest.java 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,91 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.debian.maven.repo;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.junit.Before;
+import org.junit.Test;
+import static org.custommonkey.xmlunit.XMLAssert.*;
+
+/**
+ *
+ * @author ludo
+ */
+public class DebianPOMTest extends BaseTest {
+
+ Map<String, String> libraryProperties;
+
+ @Before
+ @Override
+ public void setUp() {
+ super.setUp();
+ libraryProperties = new HashMap<String, String>();
+ }
+
+ /**
+ * Test of addLibrary method, of class DebianPOM.
+ */
+ @Test
+ public void testAddLibrariesToNewDebianPOM() throws Exception {
+ DebianPOM instance = new DebianPOM();
+ libraryProperties.put("library.jar.debian.version", "1.0");
+ libraryProperties.put("library.jar.debian.package", "libtest-java");
+ instance.addLibrary(pom, updatedPom, libraryProperties);
+ assertXMLEqual(read("new.pom"), read(pom));
+
+ libraryProperties.put("library2.jar.debian.version", "3.0");
+ libraryProperties.put("library2.jar.debian.package", "libother-java");
+ instance.addLibrary(pom, updatedPom, libraryProperties);
+ assertXMLEqual(read("new2.pom"), read(pom));
+ }
+
+ /**
+ * Test of addLibrary method, of class DebianPOM.
+ */
+ @Test
+ public void testUpdateLibraries() throws Exception {
+ usePom("new.pom");
+ DebianPOM instance = new DebianPOM();
+
+ libraryProperties.put("library.jar.debian.version", "1.1");
+ instance.addLibrary(pom, updatedPom, libraryProperties);
+ assertXMLEqual(read("updated.pom"), read(pom));
+ }
+
+ /**
+ * Test of removeLibrary method, of class DebianPOM.
+ */
+ @Test
+ public void testRemoveLibrary() throws Exception {
+ usePom("new2.pom");
+ DebianPOM instance = new DebianPOM();
+
+ instance.removeLibrary(pom, updatedPom, "library2.jar.debian.version", "library2.jar.debian.package");
+ assertXMLEqual(read("new.pom"), read(pom));
+
+ instance.removeLibrary(pom, updatedPom, "library.jar.debian.version", "library.jar.debian.package");
+ assertXMLEqual(read("empty.pom"), read(pom));
+ }
+
+ /**
+ * Test of main method, of class DebianPOM.
+ */
+ @Test
+ public void testMain() throws Exception {
+ String[] args = {"add", "tmp/original.pom", "library.jar.debian", "1.0", "libtest-java"};
+ DebianPOM.main(args);
+ assertXMLEqual(read("new.pom"), read(pom));
+
+ args = new String[] {"add", "tmp/original.pom", "library2.jar.debian", "3.0", "libother-java"};
+ DebianPOM.main(args);
+ assertXMLEqual(read("new2.pom"), read(pom));
+
+ args = new String[] {"remove", "tmp/original.pom", "library2.jar.debian"};
+ DebianPOM.main(args);
+ assertXMLEqual(read("new.pom"), read(pom));
+ }
+
+}
\ No newline at end of file
Added: trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMCleanerTest.java
===================================================================
--- trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMCleanerTest.java (rev 0)
+++ trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMCleanerTest.java 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,105 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.debian.maven.repo;
+
+import java.io.File;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.Properties;
+import org.junit.Test;
+import static org.custommonkey.xmlunit.XMLAssert.*;
+
+/**
+ *
+ * @author ludo
+ */
+public class POMCleanerTest extends BaseTest {
+
+ private File pomProperties;
+ private File versionProperties;
+ private File specialDependencies;
+
+ @Override
+ public void tearDown() {
+ super.tearDown();
+ if (specialDependencies != null && specialDependencies.exists()) {
+ specialDependencies.delete();
+ specialDependencies = null;
+ }
+ if (versionProperties != null && versionProperties.exists()) {
+ versionProperties.delete();
+ versionProperties = null;
+ }
+ if (pomProperties != null && pomProperties.exists()) {
+ pomProperties.delete();
+ pomProperties = null;
+ }
+ }
+
+ /**
+ * Test of cleanPom method, of class POMCleaner.
+ */
+ @Test
+ public void testCleanMavenPom() throws Exception {
+ pomProperties = new File(testDir, "pom.properties");
+ versionProperties = new File(testDir, "versions.properties");
+ usePom("maven.xml");
+ boolean inheritFromDebian = true;
+ POMCleaner instance = new POMCleaner();
+ ArrayList<Dependency> specialCases = new ArrayList<Dependency>();
+ specialCases.add(new Dependency("org.apache.maven", "*", "*", "debian"));
+ specialCases.add(new Dependency("org.apache.maven.reporting", "*", "jar", "debian"));
+ specialCases.add(new Dependency("org.apache.maven.wagon", "*", "jar", "debian"));
+ instance.cleanPom(pom, updatedPom, pomProperties, versionProperties, inheritFromDebian, specialCases);
+ assertXMLEqual(read("maven.cleaned"), read(updatedPom));
+ Properties pomInfo = new Properties();
+ pomInfo.load(new FileReader(pomProperties));
+ assertEquals("org.apache.maven", pomInfo.get("GROUP_ID"));
+ assertEquals("maven", pomInfo.get("ARTIFACT_ID"));
+ assertEquals("pom", pomInfo.get("TYPE"));
+ assertEquals("2.1.0-SNAPSHOT", pomInfo.get("VERSION"));
+ Properties versions = new Properties();
+ versions.load(new FileReader(versionProperties));
+ assertEquals("2.1.0-SNAPSHOT", versions.get("org.apache.maven.__.__.debian.version"));
+ }
+
+ /**
+ * Test of cleanPom method, of class POMCleaner.
+ */
+ @Test
+ public void testCleanModelloPom() throws Exception {
+ pomProperties = new File(testDir, "pom.properties");
+ versionProperties = new File(testDir, "versions.properties");
+ usePom("modello-core.xml");
+ boolean inheritFromDebian = false;
+ POMCleaner instance = new POMCleaner();
+ ArrayList<Dependency> specialCases = new ArrayList<Dependency>();
+ specialCases.add(new Dependency("org.codehaus.modello", "*", "jar", "debian"));
+ instance.cleanPom(pom, updatedPom, pomProperties, versionProperties, inheritFromDebian, specialCases);
+ assertXMLEqual(read("modello-core.cleaned"), read(updatedPom));
+ Properties versions = new Properties();
+ versions.load(new FileReader(versionProperties));
+ assertEquals("1.0-alpha-22", versions.get("org.codehaus.modello.__.jar.debian.version"));
+ }
+
+ /**
+ * Test of main method, of class DebianPOM.
+ */
+ @Test
+ public void testMain() throws Exception {
+ specialDependencies = new File(testDir, "special-cases.txt");
+ pomProperties = new File(testDir, "pom.properties");
+ versionProperties = new File(testDir, "versions.properties");
+ usePom("maven.xml");
+ useFile("maven.spec", specialDependencies);
+ String[] args = {"--debian-parent", pom.getAbsolutePath(), updatedPom.getAbsolutePath(),
+ pomProperties.getAbsolutePath(), versionProperties.getAbsolutePath(), specialDependencies.getAbsolutePath()};
+ POMCleaner.main(args);
+ assertXMLEqual(read("maven.cleaned"), read(updatedPom));
+ Properties versions = new Properties();
+ versions.load(new FileReader(versionProperties));
+ assertEquals("2.1.0-SNAPSHOT", versions.get("org.apache.maven.__.__.debian.version"));
+ }
+}
\ No newline at end of file
Added: trunk/maven-repo-helper/src/test/resources/empty.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/empty.pom (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/empty.pom 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <groupId>org.debian</groupId>
+ <artifactId>debian-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <properties>
+ </properties>
+</project>
\ No newline at end of file
Added: trunk/maven-repo-helper/src/test/resources/maven.cleaned
===================================================================
--- trunk/maven-repo-helper/src/test/resources/maven.cleaned (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/maven.cleaned 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <parent>
+ <groupId>org.debian</groupId>
+ <artifactId>debian-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Maven</name>
+ <description>Maven is a project development management and comprehension tool. Based on the concept of a project object model: builds, dependency management, documentation creation, site publication, and distribution publication are all controlled from the declarative file. Maven can be extended by plugins to utilise a number of other development tools for reporting or the build process.</description>
+ <url>http://maven.apache.org</url>
+ <inceptionYear>2001</inceptionYear>
+ <issueManagement>
+ <system>jira</system>
+ <url>http://jira.codehaus.org/browse/MNG</url>
+ </issueManagement>
+ <mailingLists>
+ <mailingList>
+ <name>Maven User List</name>
+ <subscribe>users-subscribe at maven.apache.org</subscribe>
+ <unsubscribe>users-unsubscribe at maven.apache.org</unsubscribe>
+ <post>users at maven.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/maven-users</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/users@maven.apache.org/</otherArchive>
+ <otherArchive>http://www.nabble.com/Maven---Users-f178.html</otherArchive>
+ <otherArchive>http://maven.users.markmail.org/</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Maven Developer List</name>
+ <subscribe>dev-subscribe at maven.apache.org</subscribe>
+ <unsubscribe>dev-unsubscribe at maven.apache.org</unsubscribe>
+ <post>dev at maven.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/dev@maven.apache.org/</otherArchive>
+ <otherArchive>http://www.nabble.com/Maven-Developers-f179.html</otherArchive>
+ <otherArchive>http://maven.dev.markmail.org/</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Maven Issues List</name>
+ <subscribe>issues-subscribe at maven.apache.org</subscribe>
+ <unsubscribe>issues-unsubscribe at maven.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/maven-issues/</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/issues@maven.apache.org</otherArchive>
+ <otherArchive>http://www.nabble.com/Maven---Issues-f15573.html</otherArchive>
+ <otherArchive>http://maven.issues.markmail.org/</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Maven Commits List</name>
+ <subscribe>commits-subscribe at maven.apache.org</subscribe>
+ <unsubscribe>commits-unsubscribe at maven.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/maven-commits</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/commits@maven.apache.org</otherArchive>
+ <otherArchive>http://www.nabble.com/Maven---Commits-f15575.html</otherArchive>
+ <otherArchive>http://maven.commits.markmail.org/</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Maven Announcements List</name>
+ <post>announce at maven.apache.org</post>
+ <subscribe>announce-subscribe at maven.apache.org</subscribe>
+ <unsubscribe>announce-unsubscribe at maven.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/maven-announce/</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/announce@maven.apache.org</otherArchive>
+ <otherArchive>http://www.nabble.com/Maven-Announcements-f15617.html</otherArchive>
+ <otherArchive>http://maven.announce.markmail.org/</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Maven Notifications List</name>
+ <subscribe>notifications-subscribe at maven.apache.org</subscribe>
+ <unsubscribe>notifications-unsubscribe at maven.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/maven-notifications/</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/notifications@maven.apache.org</otherArchive>
+ <otherArchive>http://www.nabble.com/Maven---Notifications-f15574.html</otherArchive>
+ <otherArchive>http://maven.notifications.markmail.org/</otherArchive>
+ </otherArchives>
+ </mailingList>
+ </mailingLists>
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x</developerConnection>
+ <url>http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x</url>
+ </scm>
+ <modules>
+ <module>maven-artifact</module>
+ <module>maven-artifact-manager</module>
+ <module>maven-artifact-test</module>
+ <module>maven-core</module>
+ <module>maven-error-diagnostics</module>
+ <module>maven-model</module>
+ <module>maven-monitor</module>
+ <module>maven-plugin-api</module>
+ <module>maven-plugin-descriptor</module>
+ <module>maven-plugin-parameter-documenter</module>
+ <module>maven-plugin-registry</module>
+ <module>maven-profile</module>
+ <module>maven-project</module>
+ <module>maven-reporting</module>
+ <module>maven-repository-metadata</module>
+ <module>maven-script</module>
+ <module>maven-settings</module>
+ <module>maven-toolchain</module>
+ <module>apache-maven</module>
+ </modules>
+ <properties>
+ <mavenVersion>2.1.0-SNAPSHOT</mavenVersion>
+ <wagonVersion>1.0-beta-5</wagonVersion>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.junit.jar.debian.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-descriptor</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-error-diagnostics</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.reporting</groupId>
+ <artifactId>maven-reporting-api</artifactId>
+ <version>${org.apache.maven.reporting.__.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-test</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-settings</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-toolchain</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-parameter-documenter</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-toolchain</artifactId>
+ <version>${org.apache.maven.__.__.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ <version>${commons-cli.commons-cli.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-sink-api</artifactId>
+ <version>${org.apache.maven.doxia.doxia-sink-api.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-logging-api</artifactId>
+ <version>${org.apache.maven.doxia.doxia-logging-api.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>${org.codehaus.plexus.plexus-interpolation.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ <version>${org.codehaus.plexus.plexus-container-default.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>${org.codehaus.plexus.plexus-utils.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-sec-dispatcher</artifactId>
+ <version>${org.sonatype.plexus.plexus-sec-dispatcher.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-provider-api</artifactId>
+ <version>${org.apache.maven.wagon.__.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh</artifactId>
+ <version>${org.apache.maven.wagon.__.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh-external</artifactId>
+ <version>${org.apache.maven.wagon.__.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-file</artifactId>
+ <version>${org.apache.maven.wagon.__.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav-jackrabbit</artifactId>
+ <version>${org.apache.maven.wagon.__.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-http-lightweight</artifactId>
+ <version>${org.apache.maven.wagon.__.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>backport-util-concurrent</groupId>
+ <artifactId>backport-util-concurrent</artifactId>
+ <version>${backport-util-concurrent.backport-util-concurrent.jar.debian.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>${easymock.easymock.jar.debian.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>${classworlds.classworlds.jar.debian.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
\ No newline at end of file
Added: trunk/maven-repo-helper/src/test/resources/maven.spec
===================================================================
--- trunk/maven-repo-helper/src/test/resources/maven.spec (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/maven.spec 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,3 @@
+org.apache.maven.*.*.debian
+org.apache.maven.reporting.*.jar.debian
+org.apache.maven.wagon.*.jar.debian
Added: trunk/maven-repo-helper/src/test/resources/maven.xml
===================================================================
--- trunk/maven-repo-helper/src/test/resources/maven.xml (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/maven.xml 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,580 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-parent</artifactId>
+ <version>11</version>
+ <relativePath>../pom/maven/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>maven</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Maven</name>
+ <description>Maven is a project development management and comprehension tool. Based on the concept of a project object model: builds, dependency management, documentation creation, site publication, and distribution publication are all controlled from the declarative file. Maven can be extended by plugins to utilise a number of other development tools for reporting or the build process.</description>
+ <url>http://maven.apache.org</url>
+ <inceptionYear>2001</inceptionYear>
+
+ <issueManagement>
+ <system>jira</system>
+ <url>http://jira.codehaus.org/browse/MNG</url>
+ </issueManagement>
+
+ <mailingLists>
+ <mailingList>
+ <name>Maven User List</name>
+ <subscribe>users-subscribe at maven.apache.org</subscribe>
+ <unsubscribe>users-unsubscribe at maven.apache.org</unsubscribe>
+ <post>users at maven.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/maven-users</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/users@maven.apache.org/</otherArchive>
+ <otherArchive>http://www.nabble.com/Maven---Users-f178.html</otherArchive>
+ <otherArchive>http://maven.users.markmail.org/</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Maven Developer List</name>
+ <subscribe>dev-subscribe at maven.apache.org</subscribe>
+ <unsubscribe>dev-unsubscribe at maven.apache.org</unsubscribe>
+ <post>dev at maven.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/dev@maven.apache.org/</otherArchive>
+ <otherArchive>http://www.nabble.com/Maven-Developers-f179.html</otherArchive>
+ <otherArchive>http://maven.dev.markmail.org/</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Maven Issues List</name>
+ <subscribe>issues-subscribe at maven.apache.org</subscribe>
+ <unsubscribe>issues-unsubscribe at maven.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/maven-issues/</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/issues@maven.apache.org</otherArchive>
+ <otherArchive>http://www.nabble.com/Maven---Issues-f15573.html</otherArchive>
+ <otherArchive>http://maven.issues.markmail.org/</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Maven Commits List</name>
+ <subscribe>commits-subscribe at maven.apache.org</subscribe>
+ <unsubscribe>commits-unsubscribe at maven.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/maven-commits</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/commits@maven.apache.org</otherArchive>
+ <otherArchive>http://www.nabble.com/Maven---Commits-f15575.html</otherArchive>
+ <otherArchive>http://maven.commits.markmail.org/</otherArchive>
+ </otherArchives>
+ </mailingList>
+
+ <!-- duplication from parent pom - temporary until they inherit properly -->
+ <mailingList>
+ <name>Maven Announcements List</name>
+ <post>announce at maven.apache.org</post>
+ <subscribe>announce-subscribe at maven.apache.org</subscribe>
+ <unsubscribe>announce-unsubscribe at maven.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/maven-announce/</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/announce@maven.apache.org</otherArchive>
+ <otherArchive>http://www.nabble.com/Maven-Announcements-f15617.html</otherArchive>
+ <otherArchive>http://maven.announce.markmail.org/</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Maven Notifications List</name>
+ <subscribe>notifications-subscribe at maven.apache.org</subscribe>
+ <unsubscribe>notifications-unsubscribe at maven.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/maven-notifications/</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/notifications@maven.apache.org</otherArchive>
+ <otherArchive>http://www.nabble.com/Maven---Notifications-f15574.html</otherArchive>
+ <otherArchive>http://maven.notifications.markmail.org/</otherArchive>
+ </otherArchives>
+ </mailingList>
+ </mailingLists>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x</developerConnection>
+ <url>http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x</url>
+ </scm>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-1</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.0</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>2.0-beta-5</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <version>1.0-beta-2</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.1.1</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0-beta-7</version>
+ <configuration>
+ <tagBase>https://svn.apache.org/repos/asf/maven/components/tags</tagBase>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ <preparationGoals>install</preparationGoals>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-maven-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <id>site-docs</id>
+ <phase>pre-site</phase>
+ <goals>
+ <goal>xdoc</goal>
+ <goal>xsd</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>standard</id>
+ <goals>
+ <goal>java</goal>
+ <goal>xpp3-reader</goal>
+ <goal>xpp3-writer</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>clirr-maven-plugin</artifactId>
+ <version>2.2.1</version>
+ <configuration>
+ <!-- needed for release: default value "(,${project.version})" for 2.0.10 is 2.0.10-SNAPSHOT -->
+ <comparisonVersion>2.0.9</comparisonVersion>
+ <excludes>
+ <!-- TODO: These represent method ADDITIONS from 2.0.9, and should be removed after
+ 2.0.10 is released. -->
+ <exclude>org/apache/maven/lifecycle/LifecycleExecutor*</exclude>
+ <exclude>org/apache/maven/artifact/metadata/AbstractArtifactMetadata*</exclude>
+ <exclude>org/apache/maven/artifact/metadata/ArtifactMetadataSource*</exclude>
+ <exclude>org/apache/maven/project/MavenProjectBuilder*</exclude>
+ <exclude>org/apache/maven/project/ProjectBuilderConfiguration*</exclude>
+ <exclude>org/apache/maven/project/interpolation/ModelInterpolator*</exclude>
+ <exclude>org/apache/maven/project/inheritance/ModelInheritanceAssembler*</exclude>
+ <exclude>org/apache/maven/execution/MavenExecutionRequest*</exclude>
+ <exclude>org/apache/maven/plugin/DefaultPluginManager*</exclude>
+
+ <!-- these are differences in methods that SHOULD BE PRIVATE -->
+ <exclude>org/apache/maven/settings/io/xpp3/SettingsXpp3Reader*</exclude>
+ <exclude>org/apache/maven/artifact/repository/metadata/io/xpp3/MetadataXpp3Reader*</exclude>
+ <exclude>org/apache/maven/model/io/xpp3/MavenXpp3Reader*</exclude>
+ <exclude>org/apache/maven/usability/plugin/io/xpp3/ParamdocXpp3Reader*</exclude>
+ <exclude>org/apache/maven/profiles/io/xpp3/ProfilesXpp3Reader*</exclude>
+ <exclude>org/apache/maven/plugin/registry/io/xpp3/PluginRegistryXpp3Reader*</exclude>
+ <exclude>org/apache/maven/plugin/lifecycle/io/xpp3/LifecycleMappingsXpp3Reader*</exclude>
+ <exclude>org/apache/maven/toolchain/model/io/xpp3/MavenToolchainsXpp3Reader*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <modules>
+ <module>maven-artifact</module>
+ <module>maven-artifact-manager</module>
+ <module>maven-artifact-test</module>
+ <module>maven-core</module>
+ <module>maven-error-diagnostics</module>
+ <module>maven-model</module>
+ <module>maven-monitor</module>
+ <module>maven-plugin-api</module>
+ <module>maven-plugin-descriptor</module>
+ <module>maven-plugin-parameter-documenter</module>
+ <module>maven-plugin-registry</module>
+ <module>maven-profile</module>
+ <module>maven-project</module>
+ <module>maven-reporting</module>
+ <module>maven-repository-metadata</module>
+ <module>maven-script</module>
+ <module>maven-settings</module>
+ <module>maven-toolchain</module>
+ <module>apache-maven</module>
+ </modules>
+
+ <properties>
+ <mavenVersion>2.1.0-SNAPSHOT</mavenVersion>
+ <wagonVersion>1.0-beta-5</wagonVersion>
+ </properties>
+
+ <!--start-->
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <dependencyManagement>
+ <!--end-->
+ <dependencies>
+ <!-- Maven -->
+ <!--start-->
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-descriptor</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-error-diagnostics</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.reporting</groupId>
+ <artifactId>maven-reporting-api</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-test</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-settings</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-toolchain</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-parameter-documenter</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-toolchain</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <!--end-->
+ <dependency>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-sink-api</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-logging-api</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <!-- Plexus -->
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ <version>1.0-alpha-9-stable-1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.5.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-sec-dispatcher</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-provider-api</artifactId>
+ <version>${wagonVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh</artifactId>
+ <version>${wagonVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh-external</artifactId>
+ <version>${wagonVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-file</artifactId>
+ <version>${wagonVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav-jackrabbit</artifactId>
+ <version>${wagonVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-http-lightweight</artifactId>
+ <version>${wagonVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>backport-util-concurrent</groupId>
+ <artifactId>backport-util-concurrent</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>1.2_Java1.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ </dependencies>
+ <!--start-->
+ </dependencyManagement>
+ <!--end-->
+
+ <distributionManagement>
+ <site>
+ <id>apache.website</id>
+ <url>scp://people.apache.org/www/maven.apache.org/ref/${project.version}/</url>
+ </site>
+ </distributionManagement>
+
+ <profiles>
+ <profile>
+ <id>quality-checks</id>
+ <build>
+ <plugins>
+ <!-- This is here until it is enabled in the parent -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>clirr-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>clirr-check</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>release</id>
+ <build>
+ <plugins>
+ <!-- This is here until it is enabled in the parent -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>clirr-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>run-its</id>
+ <modules>
+ <module>maven-core-it-runner</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>reporting</id>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>clirr-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+ </profile>
+
+ <profile>
+ <id>reporting-aggregate</id>
+ <!-- To generate aggregate reports -->
+ <!-- To deploy both aggregate reports for top-level project and standalone reports for modules, call
+ mvn site -Preporting
+ mvn site:deploy
+ mvn site -Preporting-aggregate
+ mvn -N site:deploy
+ -->
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <aggregate>true</aggregate>
+ <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <links>
+ <link>http://java.sun.com/j2se/1.4.2/docs/api</link>
+ <link>http://java.sun.com/j2ee/1.4/docs/api</link>
+ <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
+ <link>http://commons.apache.org/collections/apidocs-COLLECTIONS_3_0/</link>
+ <link>http://commons.apache.org/dbcp/apidocs/</link>
+ <link>http://commons.apache.org/fileupload/apidocs/</link>
+ <link>http://commons.apache.org/httpclient/apidocs/</link>
+ <link>http://commons.apache.org/logging/apidocs/</link>
+ <link>http://commons.apache.org/pool/apidocs/</link>
+ <link>http://junit.sourceforge.net/javadoc/</link>
+ <link>http://logging.apache.org/log4j/1.2/apidocs/</link>
+ <link>http://jakarta.apache.org/regexp/apidocs/</link>
+ <link>http://velocity.apache.org/engine/releases/velocity-1.5/apidocs/</link>
+ </links>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ </profile>
+ </profiles>
+</project>
Added: trunk/maven-repo-helper/src/test/resources/modello-core.cleaned
===================================================================
--- trunk/maven-repo-helper/src/test/resources/modello-core.cleaned (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/modello-core.cleaned 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <parent>
+ <artifactId>modello</artifactId>
+ <groupId>org.codehaus.modello</groupId>
+ <version>1.0-alpha-22</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-core</artifactId>
+ <version>1.0-alpha-22</version>
+ <packaging>jar</packaging>
+ <name>Modello Core</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: trunk/maven-repo-helper/src/test/resources/modello-core.xml
===================================================================
--- trunk/maven-repo-helper/src/test/resources/modello-core.xml (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/modello-core.xml 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+ <artifactId>modello</artifactId>
+ <groupId>org.codehaus.modello</groupId>
+ <version>1.0-alpha-22</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>modello-core</artifactId>
+ <name>Modello Core</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ <archive>
+ <manifest>
+ <mainClass>org.codehaus.modello.ModelloCli</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/maven-repo-helper/src/test/resources/new.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/new.pom (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/new.pom 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <groupId>org.debian</groupId>
+ <artifactId>debian-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <properties>
+ <library.jar.debian.package>libtest-java</library.jar.debian.package>
+ <library.jar.debian.version>1.0</library.jar.debian.version>
+ </properties>
+</project>
\ No newline at end of file
Added: trunk/maven-repo-helper/src/test/resources/new2.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/new2.pom (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/new2.pom 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,12 @@
+
+<project>
+ <groupId>org.debian</groupId>
+ <artifactId>debian-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <properties>
+ <library.jar.debian.package>libtest-java</library.jar.debian.package>
+ <library.jar.debian.version>1.0</library.jar.debian.version>
+ <library2.jar.debian.package>libother-java</library2.jar.debian.package>
+ <library2.jar.debian.version>3.0</library2.jar.debian.version>
+ </properties>
+</project>
\ No newline at end of file
Added: trunk/maven-repo-helper/src/test/resources/updated.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/updated.pom (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/updated.pom 2009-03-31 10:40:09 UTC (rev 8159)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <groupId>org.debian</groupId>
+ <artifactId>debian-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <properties>
+ <library.jar.debian.package>libtest-java</library.jar.debian.package>
+ <library.jar.debian.version>1.1</library.jar.debian.version>
+ </properties>
+</project>
\ No newline at end of file
More information about the pkg-java-commits
mailing list