[Jpackage-commits] dist/jakarta-commons-beanutils/devel .cvsignore, 1.1, 1.2 commons-beanutils-1.7.0-BeanificationTestCase.patch, NONE, 1.1 commons-beanutils-1.7.0-LocaleBeanificationTestCase.patch, NONE, 1.1 commons-beanutils-1.7.0-jpp-depmap.xml, NONE, 1.1 commons-beanutils-1.7.0-navigation_xml.patch, NONE, 1.1 commons-beanutils-1.7.0-project_properties.patch, NONE, 1.1 commons-beanutils-1.7.0-project_xml.patch, NONE, 1.1 commons-beanutils-1.7.0.pom, NONE, 1.1 commons-beanutils-bean-collections-1.7.0.pom, NONE, 1.1 commons-beanutils-build-other-jars.xml, NONE, 1.1 commons-beanutils-core-1.7.0.pom, NONE, 1.1 commons-beanutils-maven.xml, NONE, 1.1 jakarta-commons-beanutils-component-info.xml, NONE, 1.1 jakarta-commons-beanutils.spec, NONE, 1.1 pom-maven2jpp-depcat.xsl, NONE, 1.1 pom-maven2jpp-mapdeps.xsl, NONE, 1.1 pom-maven2jpp-newdepmap.xsl, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Fri May 30 22:27:08 CEST 2008


Update of /home/projects/jpackage/cvs/dist/jakarta-commons-beanutils/devel
In directory ryu.zarb.org:/tmp/cvs-serv7786/devel

Modified Files:
	.cvsignore sources 
Added Files:
	commons-beanutils-1.7.0-BeanificationTestCase.patch 
	commons-beanutils-1.7.0-LocaleBeanificationTestCase.patch 
	commons-beanutils-1.7.0-jpp-depmap.xml 
	commons-beanutils-1.7.0-navigation_xml.patch 
	commons-beanutils-1.7.0-project_properties.patch 
	commons-beanutils-1.7.0-project_xml.patch 
	commons-beanutils-1.7.0.pom 
	commons-beanutils-bean-collections-1.7.0.pom 
	commons-beanutils-build-other-jars.xml 
	commons-beanutils-core-1.7.0.pom commons-beanutils-maven.xml 
	jakarta-commons-beanutils-component-info.xml 
	jakarta-commons-beanutils.spec pom-maven2jpp-depcat.xsl 
	pom-maven2jpp-mapdeps.xsl pom-maven2jpp-newdepmap.xsl 
Log Message:
Import merged version from Permaine

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/jakarta-commons-beanutils/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	30 May 2008 20:22:26 -0000	1.1
--- .cvsignore	30 May 2008 20:26:51 -0000	1.2
***************
*** 0 ****
--- 1,2 ----
+ commons-beanutils-1.7.0-src.tar.gz
+ commons-build.tar.gz

--- NEW FILE: pom-maven2jpp-depcat.xsl ---
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/> 
 <xsl:strip-space elements="*"/> 
 <xsl:template match="*[name() != 'dependencies']|*/text()">
     <xsl:apply-templates/>
 </xsl:template>
 <xsl:template match="//dependencies">
  <xsl:for-each select="./dependency">
   <xsl:element name="dependency">
    <xsl:element name="maven">
     <xsl:choose>
      <xsl:when test="./groupId">
       <xsl:copy-of select="./groupId"/>
       <xsl:copy-of select="./artifactId"/>
      </xsl:when>
      <xsl:when test="./id">
       <xsl:choose>
        <xsl:when test="substring-before(./id/text(),':') != ''">
         <xsl:element name="groupId">
          <xsl:value-of select="substring-before(./id/text(),':')"/>
         </xsl:element>
         <xsl:element name="artifactId">
          <xsl:value-of select="substring-after(./id/text(),':')"/>
         </xsl:element>
        </xsl:when>
        <xsl:otherwise>
         <xsl:element name="groupId">
          <xsl:value-of select="./id/text()"/>
         </xsl:element>
         <xsl:element name="artifactId">
          <xsl:value-of select="./id/text()"/>
         </xsl:element>
        </xsl:otherwise>
       </xsl:choose>
      </xsl:when>
      <xsl:otherwise>
ERROR
      </xsl:otherwise>
     </xsl:choose>
     <xsl:for-each select="./*">
      <xsl:if test="(name() != 'groupId') and (name() != 'artifactId') and (name() != 'id')">
       <xsl:copy-of select="."/>
      </xsl:if>
     </xsl:for-each>
    </xsl:element>
    <xsl:element name="jpp">
     <xsl:element name="groupId">JPP</xsl:element>
     <xsl:choose>
      <xsl:when test="./artifactId">
       <xsl:copy-of select="./artifactId"/>
      </xsl:when>
      <xsl:when test="./id">
       <xsl:choose>
        <xsl:when test="substring-after(./id/text(),':') != ''">
         <xsl:element name="artifactId">
          <xsl:value-of select="substring-after(./id/text(),':')"/>
         </xsl:element>
        </xsl:when>
        <xsl:otherwise>
         <xsl:element name="artifactId">
          <xsl:value-of select="./id/text()"/>
         </xsl:element>
        </xsl:otherwise>
       </xsl:choose>
      </xsl:when>
      <xsl:otherwise>
ERROR
      </xsl:otherwise>
     </xsl:choose>
     <xsl:element name="jar">
      <xsl:choose>
       <xsl:when test="./artifactId">
        <xsl:value-of select="./artifactId/text()"/>
       </xsl:when>
       <xsl:when test="./id">
        <xsl:choose>
         <xsl:when test="substring-after(./id/text(),':') != ''">
          <xsl:value-of select="substring-after(./id/text(),':')"/>
         </xsl:when>
         <xsl:otherwise>
          <xsl:value-of select="./id/text()"/>
         </xsl:otherwise>
        </xsl:choose>
       </xsl:when>
       <xsl:otherwise>
ERROR
       </xsl:otherwise>
      </xsl:choose>
      <xsl:choose>
       <xsl:when test="./type">
        <xsl:choose>
         <xsl:when test="./type/text() = 'plugin'">.jar</xsl:when>
         <xsl:otherwise>.<xsl:value-of select="./type/text()"/></xsl:otherwise>
        </xsl:choose>
       </xsl:when>
       <xsl:otherwise>.jar</xsl:otherwise>
      </xsl:choose>
     </xsl:element>
     <xsl:for-each select="./*">
      <xsl:if test="(name() != 'groupId') and (name() != 'artifactId') and (name() != 'id')">
       <xsl:copy-of select="."/>
      </xsl:if>
     </xsl:for-each>
    </xsl:element>
   </xsl:element>
  </xsl:for-each>
 </xsl:template>
</xsl:stylesheet>

--- NEW FILE: commons-beanutils-1.7.0-project_properties.patch ---
--- project.properties.sav	2007-07-24 15:16:30.000000000 +0200
+++ project.properties	2007-07-24 15:16:51.000000000 +0200
@@ -13,11 +13,11 @@
 #   limitations under the License.
 
 # documentation properties
-maven.xdoc.jsl=../commons-build/commons-site.jsl
+maven.xdoc.jsl=file://${basedir}/commons-build/commons-site.jsl
 maven.xdoc.date=left
 maven.xdoc.version=${pom.currentVersion}
 maven.xdoc.developmentProcessUrl=http://jakarta.apache.org/commons/charter.html
 maven.xdoc.poweredby.image=maven-feather.png
 
 
-beanutils.cvs=pserver:anoncvs at cvs.apache.org:/home/cvspublic
\ No newline at end of file
+beanutils.cvs=pserver:anoncvs at cvs.apache.org:/home/cvspublic

--- NEW FILE: commons-beanutils-1.7.0-BeanificationTestCase.patch ---
--- ./src/test/org/apache/commons/beanutils/BeanificationTestCase.java.sav	2007-07-24 13:45:25.000000000 +0200
+++ ./src/test/org/apache/commons/beanutils/BeanificationTestCase.java	2007-07-24 13:46:18.000000000 +0200
@@ -96,7 +96,7 @@
     public void testMemoryTestMethodology() throws Exception {
         // test methodology
         // many thanks to Juozas Baliuka for suggesting this method
-        ClassLoader loader = new ClassLoader() {};
+        ClassLoader loader = new ClassLoader(this.getClass().getClassLoader()) {};
         WeakReference reference = new  WeakReference(loader);
         Class myClass = loader.loadClass("org.apache.commons.beanutils.BetaBean");
         

--- NEW FILE: commons-beanutils-1.7.0-navigation_xml.patch ---
--- xdocs/navigation.xml.sav	2007-07-24 14:08:57.000000000 +0200
+++ xdocs/navigation.xml	2007-07-24 14:09:17.000000000 +0200
@@ -14,7 +14,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<!DOCTYPE org.apache.commons.menus SYSTEM '../../commons-build/menus/menus.dtd'>
+<!DOCTYPE org.apache.commons.menus SYSTEM '../commons-build/menus/menus.dtd'>
 <project name="BeanUtils">
 
   <title>BeanUtils</title>

--- NEW FILE: commons-beanutils-1.7.0-jpp-depmap.xml ---
<?xml version="1.0" encoding="utf-8"?>
<depset>
<!--
   <dependency>
      <maven>
         <groupId>commons-beanutils</groupId>
         <artifactId>commons-beanutils</artifactId>
         <version>1.6</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>commons-beanutils</artifactId>
         <jar>commons-beanutils.jar</jar>
         <version>1.6</version>
      </jpp>
   </dependency>
-->
   <dependency>
      <maven>
         <groupId>commons-collections</groupId>
         <artifactId>commons-collections</artifactId>
         <version>3.0</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>commons-collections</artifactId>
         <jar>commons-collections.jar</jar>
         <version>3.0</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>commons-collections</groupId>
         <artifactId>commons-collections-testframework</artifactId>
         <version>SNAPSHOT</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>commons-collections-testframework</artifactId>
         <jar>commons-collections-testframework.jar</jar>
         <version>SNAPSHOT</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>commons-logging</groupId>
         <artifactId>commons-logging</artifactId>
         <version>1.0.3</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>commons-logging</artifactId>
         <jar>commons-logging.jar</jar>
         <version>1.0.3</version>
      </jpp>
   </dependency>
</depset>

--- NEW FILE: commons-beanutils-bean-collections-1.7.0.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>commons-beanutils</groupId>
  <artifactId>commons-beanutils-bean-collections</artifactId>
  <version>1.7.0</version>
</project>
--- NEW FILE: pom-maven2jpp-newdepmap.xsl ---
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:saxon="http://icl.com/saxon"
	extension-element-prefixes="saxon">
 <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> 
 <xsl:strip-space elements="*"/> 
 <xsl:template match="/" >
  <xsl:element name="depset">
   <saxon:group select="//dependency" group-by="./maven/artifactId">
    <xsl:sort select="./maven/artifactId"/>
    <xsl:element name="dependency">
     <xsl:element name="maven">
      <xsl:copy-of select="./maven/*[name() != 'properties']"/>
     </xsl:element>
     <xsl:element name="jpp">
      <xsl:copy-of select="./jpp/*[name() != 'properties']"/>
     </xsl:element>
    </xsl:element>
    <saxon:item/>
   </saxon:group>
  </xsl:element>
 </xsl:template>
</xsl:stylesheet>

--- NEW FILE: commons-beanutils-build-other-jars.xml ---
<!--
   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 name="Bean Utilities (Other jars)" default="other-jars" basedir=".">


<!--
        $Id$
-->


<!-- ========== Component Declarations ==================================== -->


  <!-- The current version number of this component -->
  <property name="component.version"       value=""/>

  <!-- The base directory for compilation targets -->
  <property name="build.home"              value="target"/>

  <!-- The base directory for distribution targets -->
  <property name="dist.home"               value="dist"/>

  <!-- JDK versions -->
  <property name="maven.compile.source"    value=""/>
  <property name="maven.compile.target"    value=""/>


<!-- ========== Executable Targets ======================================== -->

  <target name="other-jars" depends="core-jar,bean-collections-jar">
  </target>

  <target name="core-jar" description="Create BeanUtils Core jar">
    <mkdir      dir="${dist.home}"/>
    <mkdir      dir="${build.home}/classes/META-INF"/>
    <copy      file="LICENSE.txt" tofile="${build.home}/classes/META-INF/LICENSE.txt"/>
    <copy      file="NOTICE.txt"  tofile="${build.home}/classes/META-INF/NOTICE.txt"/>
    <jar    jarfile="${dist.home}/commons-beanutils-core-${component.version}.jar">
        <manifest>
            <attribute name="Specification-Title" value="Commons BeanUtils Core"/>
            <attribute name="Specification-Version" value="${component.version}"/>
            <attribute name="Specification-Vendor" value="The Apache Software Foundation"/>
            <attribute name="Implementation-Title" value="Commons BeanUtils Core"/>
            <attribute name="Implementation-Version" value="${component.version}"/> 
            <attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
            <attribute name="Implementation-Vendor-Id" value="org.apache"/>
            <attribute name="X-Compile-Source-JDK" value="${maven.compile.source}"/>
            <attribute name="X-Compile-Target-JDK" value="${maven.compile.target}"/>
        </manifest>
        <fileset dir="${build.home}/classes">
            <include name="**/*.class"/>
            <include name="**/LICENSE.txt"/>
            <include name="**/NOTICE.txt"/>
            <exclude name="**/BeanComparator*.class"/>
            <exclude name="**/BeanMap*.class"/>
            <exclude name="**/BeanPredicate*.class"/>
            <exclude name="**/BeanPropertyValueChangeClosure*.class"/>
            <exclude name="**/BeanPropertyValueEqualsPredicate*.class"/>
            <exclude name="**/BeanToPropertyValueTransformer*.class"/>
        </fileset>
    </jar>
  </target>

  <target name="bean-collections-jar" description="Create Bean Collections jar">
    <mkdir      dir="${dist.home}"/>
    <mkdir      dir="${build.home}/classes/META-INF"/>
    <copy      file="LICENSE.txt" tofile="${build.home}/classes/META-INF/LICENSE.txt"/>
    <copy      file="NOTICE.txt"  tofile="${build.home}/classes/META-INF/NOTICE.txt"/>
    <jar    jarfile="${dist.home}/commons-beanutils-bean-collections-${component.version}.jar">
        <manifest>
            <attribute name="Specification-Title" value="Commons BeanUtils Bean Collections"/>
            <attribute name="Specification-Version" value="${component.version}"/>
            <attribute name="Specification-Vendor" value="The Apache Software Foundation"/>
            <attribute name="Implementation-Title" value="Commons BeanUtils Bean Collections"/>
            <attribute name="Implementation-Version" value="${component.version}"/> 
            <attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
            <attribute name="Implementation-Vendor-Id" value="org.apache"/>
            <attribute name="X-Compile-Source-JDK" value="${maven.compile.source}"/>
            <attribute name="X-Compile-Target-JDK" value="${maven.compile.target}"/>
        </manifest>
        <fileset dir="${build.home}/classes">
            <include name="**/LICENSE.txt"/>
            <include name="**/NOTICE.txt"/>
            <include name="**/BeanComparator*.class"/>
            <include name="**/BeanMap*.class"/>
            <include name="**/BeanPredicate*.class"/>
            <include name="**/BeanPropertyValueChangeClosure*.class"/>
            <include name="**/BeanPropertyValueEqualsPredicate*.class"/>
            <include name="**/BeanToPropertyValueTransformer*.class"/>
        </fileset>
    </jar>
  </target>

</project>

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/jakarta-commons-beanutils/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	30 May 2008 20:22:26 -0000	1.1
--- sources	30 May 2008 20:26:51 -0000	1.2
***************
*** 0 ****
--- 1,2 ----
+ 3fd5cbdf70363b151de5cd538f726e67  commons-beanutils-1.7.0-src.tar.gz
+ a9522fe95e0fe85857174b3c19763c97  commons-build.tar.gz

--- NEW FILE: commons-beanutils-1.7.0-LocaleBeanificationTestCase.patch ---
--- ./src/test/org/apache/commons/beanutils/locale/LocaleBeanificationTestCase.java.sav	2007-07-24 13:50:13.000000000 +0200
+++ ./src/test/org/apache/commons/beanutils/locale/LocaleBeanificationTestCase.java	2007-07-24 13:50:50.000000000 +0200
@@ -100,7 +100,7 @@
     public void testMemoryTestMethodology() throws Exception {
         // test methodology
         // many thanks to Juozas Baliuka for suggesting this method
-        ClassLoader loader = new ClassLoader() {};
+        ClassLoader loader = new ClassLoader(this.getClass().getClassLoader()) {};
         WeakReference reference = new  WeakReference(loader);
         Class myClass = loader.loadClass("org.apache.commons.beanutils.BetaBean");
         

--- NEW FILE: jakarta-commons-beanutils-component-info.xml ---
<project name="apache-commons-beanutils">
   <component id="apache-beanutils"
              licenseType="apache-2.0"
              version="1.7.0-brew"
              projectHome="http://jakarta.apache.org/commons/beanutils/"
              description="Jakarta Commons BeanUtils Package"
              scm=":ext:cvs.devel.redhat.com:/cvs/dist/jakarta-commons-beanutils"
              tag="@TAG@">
      <!-- Built using JDK 1.4 -->
      <artifact id="commons-beanutils.jar"/>
      <export>
         <include input="commons-beanutils.jar"/>
      </export>
   </component>
</project>

--- NEW FILE: commons-beanutils-1.7.0-project_xml.patch ---
--- project.xml.sav	2004-07-27 23:40:14.000000000 +0200
+++ project.xml	2007-07-24 13:52:05.000000000 +0200
@@ -155,7 +155,7 @@
 
     	<!-- Unit test classes -->
     	<unitTest>
-	      	<includes>
+	    <includes>
 	        	<include>**/*TestCase.java</include>
             </includes>
             <resources>
@@ -168,15 +168,13 @@
             </resources>
    		</unitTest>
 
-    	<!-- Integration unit test classes -->
-    	<integrationUnitTestPatterns></integrationUnitTestPatterns>
-    
     	<resources>
+    	    <resource>
       		<includes>
        			<include>**/*.properties</include>
       		</includes>
+    	    </resource>
     	</resources>
-    	<jars/>
   	</build>
 
   <reports>

--- NEW FILE: commons-beanutils-1.7.0.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>commons-beanutils</groupId>
  <artifactId>commons-beanutils</artifactId>
  <version>1.7.0</version>
  <dependencies>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.0.3</version>
    </dependency>
  </dependencies>
</project>
--- NEW FILE: jakarta-commons-beanutils.spec ---
# Copyright (c) 2000-2007, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}

# If you don't want to build with maven, and use straight ant instead,
# give rpmbuild option '--without maven'
%define _without_maven 1

%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
%define without_maven %{?_without_maven:1}%{!?_without_maven:0}

# If you want repolib package to be built,
# issue the following: 'rpmbuild --with repolib'

%define _with_repolib 1

%define with_repolib %{?_with_repolib:1}%{!?_with_repolib:0}
%define without_repolib %{!?_with_repolib:1}%{?_with_repolib:0}

%define repodir %{_javadir}/repository.jboss.com/apache-beanutils/1.7.0-brew
%define repodirlib %{repodir}/lib
%define repodirsrc %{repodir}/src
%define base_name	beanutils
%define short_name	commons-beanutils

%define	section		free

Name:		jakarta-commons-beanutils
Version:	1.7.0
Release:	7%{?dist}
Epoch:		0
Summary:	Jakarta Commons BeanUtils Package
License:	Apache Software License
Group:		Development/Libraries/Java
Source0:        http://www.apache.org/dist/jakarta/commons/beanutils/source/commons-beanutils-1.7.0-src.tar.gz
Source1:        pom-maven2jpp-depcat.xsl
Source2:        pom-maven2jpp-newdepmap.xsl
Source3:        pom-maven2jpp-mapdeps.xsl
Source4:        commons-beanutils-1.7.0-jpp-depmap.xml
Source5:        commons-beanutils-1.7.0.pom
Source6:        commons-beanutils-bean-collections-1.7.0.pom
Source7:        commons-beanutils-core-1.7.0.pom
Source8:        commons-build.tar.gz
Source9:        commons-beanutils-maven.xml
Source10:       commons-beanutils-build-other-jars.xml
Source11:	jakarta-commons-beanutils-component-info.xml

Patch0:         commons-beanutils-1.7.0-project_xml.patch
Patch1:         commons-beanutils-1.7.0-BeanificationTestCase.patch
Patch2:         commons-beanutils-1.7.0-LocaleBeanificationTestCase.patch
Patch3:         commons-beanutils-1.7.0-navigation_xml.patch
Patch4:         commons-beanutils-1.7.0-project_properties.patch

Url:		http://jakarta.apache.org/commons/%{base_name}/
BuildRequires:	ant
BuildRequires:	ant-junit, junit
%if %{with_maven}
BuildRequires:  maven >= 0:1.1
BuildRequires:  maven-plugin-xdoc
BuildRequires:  saxon
BuildRequires:  saxon-scripts
%endif
BuildRequires:	jakarta-commons-collections >= 0:2.0
BuildRequires:	jakarta-commons-logging >= 0:1.0
BuildRequires:	jpackage-utils > 0:1.7.2
BuildRequires:  coreutils
Requires:	jakarta-commons-collections >= 0:2.0
Requires:	jakarta-commons-logging >= 0:1.0
%if ! %{gcj_support}
BuildArch:      noarch
%endif
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot
Provides:	%{short_name}
Obsoletes:	%{short_name}

Requires(post):    jpackage-utils >= 0:1.7.2
Requires(postun):  jpackage-utils >= 0:1.7.2
%if %{gcj_support}
BuildRequires:    gnu-crypto
BuildRequires:    java-gcj-compat-devel
Requires(post):   java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%description
The scope of this package is to create a package of Java utility methods
for accessing and modifying the properties of arbitrary JavaBeans.  No
dependencies outside of the JDK are required, so the use of this package
is very lightweight.

%if %{with_repolib}
%package	 repolib
Summary:	 Artifacts to be uploaded to a repository library
Group:	Development/Libraries/Java

%description	 repolib
Artifacts to be uploaded to a repository library.
This package is not meant to be installed but so its contents
can be extracted through rpm2cpio
%endif

%package javadoc
Summary:	Javadoc for %{name}
Group:		Development/Documentation
Requires(post): /bin/rm /bin/ln
Requires(postun): /bin/rm

%description javadoc
%{summary}.

%if %{with_maven}
%package manual
Summary:        Documents for %{name}
Group:          Development/Documentation

%description manual
%{summary}.
%endif

%prep
%setup -q -n %{short_name}-%{version}-src
gzip -dc %{SOURCE8} | tar xf -
cp %{SOURCE9} maven.xml
cp %{SOURCE10} build-other-jars.xml
#cp LICENSE.txt LICENSE
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
%patch0 -b .sav
%patch1 -b .sav
%patch2 -b .sav
%patch3 -b .sav
%patch4 -b .sav

tag=`echo %{name}-%{version}-%{release} | sed 's|\.|_|g'`
sed -i "s/@TAG@/$tag/g" %{SOURCE1}

%build
%if %{with_maven}
if [ ! -f %{SOURCE4} ]; then
export DEPCAT=$(pwd)/commons-beanutils-1.7.0-depcat.new.xml
echo '<?xml version="1.0" standalone="yes"?>' > $DEPCAT
echo '<depset>' >> $DEPCAT
for p in $(find . -name project.xml); do
    pushd $(dirname $p)
    /usr/bin/saxon project.xml %{SOURCE1} >> $DEPCAT
    popd
done
echo >> $DEPCAT
echo '</depset>' >> $DEPCAT
/usr/bin/saxon $DEPCAT %{SOURCE2} > commons-beanutils-1.7.0-depmap.new.xml
fi

for p in $(find . -name project.xml); do
    pushd $(dirname $p)
    cp project.xml project.xml.orig
    /usr/bin/saxon -o project.xml project.xml.orig %{SOURCE3} map=%{SOURCE4}
    popd
done
mkdir -p .maven/repository/JPP/jars
mkdir -p .maven/plugins

export MAVEN_HOME_LOCAL=$(pwd)/.maven

maven -e \
        -Dmaven.repo.remote=file:/usr/share/maven/repository \
        -Dmaven.home.local=${MAVEN_HOME_LOCAL} \
        jar:jar site

%else
export CLASSPATH=%(build-classpath commons-collections commons-logging)
ant -Dbuild.sysclasspath=first test dist
%endif

%install
rm -rf $RPM_BUILD_ROOT
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
%if %{with_maven}
install -m 644 target/%{short_name}-1.7.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
install -m 644 target/%{short_name}-bean-collections-1.7.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-bean-collections-%{version}.jar
install -m 644 target/%{short_name}-core-1.7.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-core-%{version}.jar
%else
install -m 644 dist/%{short_name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
install -m 644 dist/%{short_name}-core.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-core-%{version}.jar
install -m 644 dist/%{short_name}-bean-collections.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-bean-collections-%{version}.jar
%endif
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|jakarta-||g"`; done)
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

%add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{short_name}
%add_to_maven_depmap %{short_name} %{short_name}-core %{version} JPP %{short_name}-core
%add_to_maven_depmap %{short_name} %{short_name}-bean-collections %{version} JPP %{short_name}-bean-collections

install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -pm 644 %{SOURCE5} \
    $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{short_name}.pom
install -pm 644 %{SOURCE6} \
    $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{short_name}-bean-collections.pom
install -pm 644 %{SOURCE7} \
    $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{short_name}-core.pom

# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
%if %{with_maven}
cp -pr target/docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
rm -rf target/docs/apidocs
%else
cp -pr dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
%endif
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

# manual
install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/site
cp PROPOSAL.html STATUS.html RELEASE-NOTES.txt LICENSE.txt \
                 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%if %{with_maven}
cp -pr target/docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/site
%endif

%if %{gcj_support}
export CLASSPATH=$(build-classpath gnu-crypto)
%{_bindir}/aot-compile-rpm
%endif


%if %{with_repolib}
	install -d -m 755 $RPM_BUILD_ROOT%{repodir}
	install -d -m 755 $RPM_BUILD_ROOT%{repodirlib}
	install -m 755 %{SOURCE11} $RPM_BUILD_ROOT%{repodir}/component-info.xml
	install -d -m 755 $RPM_BUILD_ROOT%{repodirsrc}
	install -m 755 %{SOURCE0} $RPM_BUILD_ROOT%{repodirsrc}
	cp $RPM_BUILD_ROOT%{_javadir}/commons-beanutils.jar $RPM_BUILD_ROOT%{repodirlib}
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%triggerpostun -- commons-beanutils < 1.7
pushd %{_javadir} &> /dev/null
    ln -sf %{name}-%{version}.jar %{short_name}-%{version}.jar
    ln -sf %{short_name}-%{version}.jar %{short_name}.jar
popd &> /dev/null

%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ "$1" = "0" ]; then
    rm -f %{_javadocdir}/%{name}
fi

%post
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%postun
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%files
%defattr(0644,root,root,0755)
%{_docdir}/%{name}-%{version}/*.html
%{_docdir}/%{name}-%{version}/*.txt
%{_javadir}/*
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}
%if %{gcj_support}
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/jakarta-commons-beanutils-1.7.0.jar.*
# Not created by aot-compile for being subsets of the full JAR
#%attr(-,root,root) %{_libdir}/gcj/%{name}/jakarta-commons-beanutils-bean-collections-1.7.0.jar.*
#%attr(-,root,root) %{_libdir}/gcj/%{name}/jakarta-commons-beanutils-core-1.7.0.jar.*
%endif

%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%ghost %{_javadocdir}/%{name}

%if %{with_maven}
%files manual
%defattr(0644,root,root,0755)
%{_docdir}/%{name}-%{version}/site
%endif

%if %{with_repolib}
%files repolib
%defattr(0644,root,root,0755)
%{repodir}
%endif

%changelog
* Fri May 30 2008 Permaine Cheung <pcheung at redhat.com> - 0:1.7.0-7
- First JPP5 build

* Tue Jul 24 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.7.0-6jpp
- Make Vendor, Distribution based on macro
- Fix aot build
- Add poms and depmap frags
- Build with maven1 by default
- Add manual subpackage when built with maven

* Tue Mar 13 2007 Vivek Lakshmanan <vivekl at redhat.com> - 0:1.7.0-2jpp.ep1.2
- Fix repolib location

* Tue Mar 13 2007 Fernando Nasser <fnasser at redhat.com> - 0:1.7.0-2jpp.ep1.1
- New repolib location

* Mon Mar 05 2007 Fernando Nasser <fnasser at redhat.com> - 0:1.7.0-2jpp.el4ep1.3
- Remove pre section used for RHUG cleanup

* Tue Feb 20 2007 Vivek Lakshmanan <vivekl at redhat.com> - 0:1.7.0-2jpp.el4ep1.2
- Add -brew suffix

* Fri Feb 17 2007 Vivek Lakshmanan <vivekl at redhat.com> - 0:1.7.0-2jpp.el4ep1.1
- Add repolib support

* Thu Aug 17 2006 Fernando Nasser <fnasser at redhat.com> - 0:1.7.0-5jpp
- Require what is used in post/postun for javadoc

* Fri Jul 14 2006 Fernando Nasser <fnasser at redhat.com> - 0:1.7.0-4jpp
- Add AOT bits

* Thu May 11 2006 Fernando Nasser <fnasser at redhat.com> - 0:1.7.0-3jpp
- Add header
- Remove unecessary macro definitions

* Wed Feb 22 2006 Fernando Nasser <fnasser at redhat.com> - 0:1.7.0-2jpp_1rh
- Merge with upstream

* Wed Apr 27 2005 Fernando Nasser <fnasser at redhat.com> - 0:1.7.0-1jpp_3rh
- Fix build so that collections jar is created

* Sat Jan 29 2005 Ralph Apel <r.apel at r-apel.de> - 0:1.7.0-2jpp
- Use the "dist" target to get a full build, including bean-collections

* Thu Oct 21 2004 Fernando Nasser <fnasser at redhat.com> - 0:1.7.0-1jpp_1rh
- Import from upstream

* Thu Oct 21 2004 Fernando Nasser <fnasser at redhat.com> - 0:1.7.0-1jpp
- Upgrade to 1.7.0

* Fri Oct 1 2004 Andrew Overholt <overholt at redhat.com> 0:1.6.1-4jpp_6rh
- add coreutils BuildRequires

* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:1.6.1-5jpp
- Rebuild with ant-1.6.2

* Fri Jul 2 2004 Aizaz Ahmed <aahmed at redhat.com> 0:1.6.1-4jpp_5rh
- Added trigger to restore symlinks that are removed if ugrading
  from a commons-beanutils rhug package

* Fri Apr  2 2004 Frank Ch. Eigler <fche at redhat.com> 0:1.6.1-4jpp_4rh
- more of the same, for version-suffixed .jar files

* Fri Mar 26 2004 Frank Ch. Eigler <fche at redhat.com> 0:1.6.1-4jpp_3rh
- add RHUG upgrade cleanup

* Fri Mar  5 2004 Frank Ch. Eigler <fche at redhat.com> 0:1.6.1-4jpp_2rh
- RH vacuuming part II

* Thu Mar  4 2004 Frank Ch. Eigler <fche at redhat.com> 0:1.6.1-4jpp_1rh
- RH vacuuming

* Fri May 09 2003 David Walluck <david at anti-microsoft.org> 0:1.6.1-4jpp
- update for JPackage 1.5

* Thu Feb 27 2003 Henri Gomez <hgomez at users.sourceforge.net> 1.6.1-2jpp
- fix ASF license and add packager name

* Wed Feb 19 2003 Henri Gomez <hgomez at users.sourceforge.net> 1.6.1-1jpp
- 1.6.1

* Thu Feb 13 2003 Henri Gomez <hgomez at users.sourceforge.net> 1.6-1jpp
- 1.6

* Thu Oct 24 2002 Henri Gomez <hgomez at users.sourceforge.net> 1.5-1jpp
- 1.5

* Fri Aug 23 2002 Henri Gomez <hgomez at users.sourceforge.net> 1.4.1-1jpp
- 1.4.1

* Tue Aug 20 2002 Henri Gomez <hgomez at users.sourceforge.net> 1.4-1jpp
- 1.4

* Fri Jul 12 2002 Henri Gomez <hgomez at users.sourceforge.net> 1.3-3jpp
- change to commons-xxx.jar instead of commons-xxx.home in ant parameters

* Mon Jun 10 2002 Henri Gomez <hgomez at users.sourceforge.net> 1.3-2jpp
- use sed instead of bash 2.x extension in link area to make spec compatible
  with distro using bash 1.1x

* Fri Jun 07 2002 Henri Gomez <hgomez at users.sourceforge.net> 1.3-1jpp 
- 1.3
- added short names in %{_javadir}, as does jakarta developpers
- first jPackage release

--- NEW FILE: commons-beanutils-core-1.7.0.pom ---
<?xml version="1.0" encoding="UTF-8"?>

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>commons-beanutils</groupId>
  <artifactId>commons-beanutils-core</artifactId>
  <version>1.7.0</version>
  <dependencies>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.7</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>

--- NEW FILE: commons-beanutils-maven.xml ---
<!--
   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 default="java:jar"
  xmlns:ant="jelly:ant"
  xmlns:j="jelly:core"
  xmlns:util="jelly:util">

<!--
    <preGoal name="site">
        <copy todir="${maven.build.dir}/docs/images">
            <fileset dir="${basedir}/src/site/resources/images"/>
        </copy>
    </preGoal>
-->

    <postGoal name="jar:jar">
        <ant:ant antfile="build-other-jars.xml" target="other-jars">
            <property name="component.version" value="${pom.currentVersion}"/>
            <property name="build.home"        value="${maven.build.dir}"/>
            <property name="dist.home"         value="${maven.build.dir}"/>
        </ant:ant>
    </postGoal>
  
    <!-- ================================================================== -->
    <!-- Copy into the binary distribution                                  -->
    <!-- ================================================================== -->
    <postGoal name="dist:prepare-bin-filesystem">

        <!-- Create a jar file containing the sources -->
        <jar destfile="${maven.dist.bin.assembly.dir}/${maven.final.name}-sources.jar">
            <zipfileset prefix="META-INF" dir="${basedir}"
                includes="LICENSE*, NOTICE*"/>
            <fileset dir="${basedir}/src/java" includes="**/*.java"/>
        </jar>

        <!-- Create a jar file containing the Javadocs -->
        <jar destfile="${maven.dist.bin.assembly.dir}/${maven.final.name}-javadoc.jar">
            <zipfileset prefix="META-INF" dir="${basedir}"
                includes="LICENSE*, NOTICE*"/>
            <fileset dir="${basedir}/target/docs/apidocs"/>
        </jar>

         <!-- Copy the NOTICE -->
         <copy todir="${maven.dist.bin.assembly.dir}">
             <fileset file="${basedir}/NOTICE.txt"/>
             <fileset file="${basedir}/RELEASE-NOTES.txt"/>
             <fileset file="${maven.build.dir}/commons-beanutils-core*.jar"/>
             <fileset file="${maven.build.dir}/commons-beanutils-bean-collections*.jar"/>
         </copy>

    </postGoal>

    <!-- ================================================================== -->
    <!-- Copy into the source distribution                                  -->
    <!-- ================================================================== -->
    <postGoal name="dist:prepare-src-filesystem">

         <!-- Copy the NOTICE -->
         <copy todir="${maven.dist.src.assembly.dir}">
             <fileset file="${basedir}/build-other-jars.xml"/>
             <fileset file="${basedir}/checkstyle.xml"/>
             <fileset file="${basedir}/license-header.txt"/>
             <fileset file="${basedir}/pom.xml"/>
             <fileset file="${basedir}/NOTICE.txt"/>
             <fileset file="${basedir}/RELEASE-NOTES.txt"/>
             <fileset file="${basedir}/build.properties.sample"/>
         </copy>

         <!-- Copy xdoc files -->
         <copy todir="${maven.dist.src.assembly.dir}/xdocs">
             <fileset dir="xdocs"/>
         </copy>

    </postGoal>

    <!-- ================================================================== -->
    <!-- Create MD5 Check Sums                                              -->
    <!-- ================================================================== -->
    <postGoal name="dist">

         <!-- Create a versioned pom -->
         <copy file="${basedir}/project.xml" tofile="${maven.dist.dir}/${maven.final.name}.pom"/>

         <!-- create checksum for pom -->
         <ant:checksum file="${maven.dist.dir}/${maven.final.name}.pom" property="pom.md5"/>
         <ant:echo message="${pom.md5} *${maven.final.name}.pom" 
                   file="${maven.dist.dir}/${maven.final.name}.pom.md5" />

         <copy todir="${maven.dist.dir}">
             <fileset file="${maven.dist.bin.assembly.dir}/commons-beanutils*.jar"/>
         </copy>

         <!-- create checksum for jar -->
         <ant:checksum file="${maven.dist.dir}/${maven.final.name}.jar" property="jar.md5"/>
         <ant:echo message="${jar.md5} *${maven.final.name}.jar" 
                   file="${maven.dist.dir}/${maven.final.name}.jar.md5" />

         <!-- create checksum for core jar -->
         <ant:checksum file="${maven.dist.dir}/commons-beanutils-core-${pom.currentVersion}.jar"
                    property="core.jar.md5"/>
         <ant:echo message="${core.jar.md5} *commons-beanutils-core-${pom.currentVersion}.jar" 
                   file="${maven.dist.dir}/commons-beanutils-core-${pom.currentVersion}.jar.md5" />

         <!-- create checksum for bean-collections jar -->
         <ant:checksum file="${maven.dist.dir}/commons-beanutils-bean-collections-${pom.currentVersion}.jar"
                    property="bean.collections.jar.md5"/>
         <ant:echo message="${bean.collections.jar.md5} *commons-beanutils-bean-collections-${pom.currentVersion}.jar" 
                   file="${maven.dist.dir}/commons-beanutils-bean-collections-${pom.currentVersion}.jar.md5" />

         <!-- create checksum for sources jar -->
         <ant:checksum file="${maven.dist.dir}/${maven.final.name}-sources.jar" property="sources.jar.md5"/>
         <ant:echo message="${sources.jar.md5} *${maven.final.name}-sources.jar" 
                   file="${maven.dist.dir}/${maven.final.name}-sources.jar.md5" />

         <!-- create checksum for javadoc jar -->
         <ant:checksum file="${maven.dist.dir}/${maven.final.name}-javadoc.jar" property="javadoc.jar.md5"/>
         <ant:echo message="${javadoc.jar.md5} *${maven.final.name}-javadoc.jar" 
                   file="${maven.dist.dir}/${maven.final.name}-javadoc.jar.md5" />

         <!-- create checksum for binary zip -->
         <ant:checksum file="${maven.dist.dir}/${maven.final.name}.zip" property="zip.md5"/>
         <ant:echo message="${zip.md5} *${maven.final.name}.zip" 
                   file="${maven.dist.dir}/${maven.final.name}.zip.md5" />

         <!-- create checksum for binary tar.gz -->
         <ant:checksum file="${maven.dist.dir}/${maven.final.name}.tar.gz" property="tar.gz.md5"/>
         <ant:echo message="${tar.gz.md5} *${maven.final.name}.tar.gz" 
                   file="${maven.dist.dir}/${maven.final.name}.tar.gz.md5" />

         <!-- create checksum for source zip -->
         <ant:checksum file="${maven.dist.dir}/${maven.final.name}-src.zip" property="src.zip.md5"/>
         <ant:echo message="${src.zip.md5} *${maven.final.name}-src.zip" 
                   file="${maven.dist.dir}/${maven.final.name}-src.zip.md5" />

         <!-- create checksum for source tar.gz -->
         <ant:checksum file="${maven.dist.dir}/${maven.final.name}-src.tar.gz" property="src.tar.gz.md5"/>
         <ant:echo message="${src.tar.gz.md5} *${maven.final.name}-src.tar.gz" 
                   file="${maven.dist.dir}/${maven.final.name}-src.tar.gz.md5" />

    </postGoal>

</project>

--- NEW FILE: pom-maven2jpp-mapdeps.xsl ---
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:param name="map" /> 
 <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> 
 <xsl:strip-space elements="*"/> 
 <xsl:template match="/project" >
  <xsl:element name="project">
   <xsl:copy-of select="child::*[not(self::dependencies)]"/>
   <xsl:if test="not(./dependencies)">
    <xsl:element name="dependencies">
     <xsl:for-each select="document($map)//add/dependency">
       <xsl:copy-of select="."/>
     </xsl:for-each>
    </xsl:element>
   </xsl:if>
   <xsl:apply-templates select="dependencies"/>
  </xsl:element>
 </xsl:template>
 <xsl:template match="dependencies" >
  <xsl:element name="dependencies">
   <xsl:for-each select="dependency">
    <xsl:if test="./artifactId">
     <xsl:call-template name="replace">
      <xsl:with-param name="artifact" select="./artifactId/text()"/>
     </xsl:call-template>
    </xsl:if>
    <xsl:if test="./id">
     <xsl:choose>
      <xsl:when test="substring-after(./id/text(),':') != ''">
       <xsl:call-template name="replace">
        <xsl:with-param name="artifact" select="substring-after(./id/text(),':')"/>
       </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
       <xsl:call-template name="replace">
        <xsl:with-param name="artifact" select="./id/text()"/>
       </xsl:call-template>
      </xsl:otherwise>
     </xsl:choose>
    </xsl:if>
   </xsl:for-each>
   <xsl:for-each select="document($map)//add/dependency">
    <xsl:copy-of select="."/>
   </xsl:for-each>
  </xsl:element>
 </xsl:template>
 <xsl:template name="replace">
  <xsl:param name="artifact"/>
  <xsl:variable name="this" select="."/>
  <xsl:element name="dependency">
   <xsl:choose>
    <xsl:when test="document($map)//dependency/maven[./artifactId/text() = $artifact]">
     <xsl:for-each select="document($map)//dependency/maven[./artifactId/text() = $artifact][1]">
      <xsl:copy-of select="../jpp/*"/>
      <xsl:copy-of select="$this/properties"/>
     </xsl:for-each>
    </xsl:when>
    <xsl:otherwise>
     <xsl:copy-of select="./*"/>
    </xsl:otherwise>
   </xsl:choose>
  </xsl:element>
  <xsl:if test="document($map)//dependency/maven[./artifactId/text() = $artifact]">
   <xsl:for-each select="document($map)//dependency/maven[./artifactId/text() = $artifact][1]">
    <xsl:for-each select="../add/dependency">
     <xsl:element name="dependency">
      <xsl:copy-of select="./*"/>
      <xsl:copy-of select="$this/properties"/>
     </xsl:element>
    </xsl:for-each>
   </xsl:for-each>
  </xsl:if>
 </xsl:template>
</xsl:stylesheet>




More information about the JPackage-commits mailing list