[Jpackage-commits] dist/directory-naming/devel .cvsignore, 1.1, 1.2 directory-naming-0.8-jpp-depmap.xml, NONE, 1.1 directory-naming-0.8-project.patch, NONE, 1.1 directory-naming.spec, NONE, 1.1 naming-config-0.8.pom, NONE, 1.1 naming-core-0.8.pom, NONE, 1.1 naming-factory-0.8.pom, NONE, 1.1 naming-java-0.8.pom, NONE, 1.1 naming-management-0.8.pom, NONE, 1.1 naming-resources-0.8.pom, 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
Wed May 28 20:03:32 CEST 2008


Update of /home/projects/jpackage/cvs/dist/directory-naming/devel
In directory ryu.zarb.org:/tmp/cvs-serv18835/devel

Modified Files:
	.cvsignore sources 
Added Files:
	directory-naming-0.8-jpp-depmap.xml 
	directory-naming-0.8-project.patch directory-naming.spec 
	naming-config-0.8.pom naming-core-0.8.pom 
	naming-factory-0.8.pom naming-java-0.8.pom 
	naming-management-0.8.pom naming-resources-0.8.pom 
	pom-maven2jpp-depcat.xsl pom-maven2jpp-mapdeps.xsl 
	pom-maven2jpp-newdepmap.xsl 
Log Message:
Import from JPP 5.0

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/directory-naming/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	28 May 2008 18:01:54 -0000	1.1
--- .cvsignore	28 May 2008 18:03:29 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ directory-naming-0.8.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: naming-management-0.8.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>directory-naming</groupId>
  <artifactId>naming-management</artifactId>
  <name>Naming Management</name>
  <version>0.8</version>
  <dependencies>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>naming-core</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>mx4j</groupId>
      <artifactId>mx4j-jmx</artifactId>
      <version>1.1.1</version>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>naming-java</artifactId>
      <version>${pom.version}</version>
    </dependency>
  </dependencies>
</project>
--- NEW FILE: directory-naming-0.8-jpp-depmap.xml ---
<?xml version="1.0" encoding="utf-8"?>
<depset>
   <dependency>
      <maven>
         <groupId>commons-beanutils</groupId>
         <artifactId>commons-beanutils</artifactId>
         <version>1.6.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>commons-beanutils</artifactId>
         <jar>commons-beanutils16.jar</jar>
         <version>1.6.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>commons-collections</groupId>
         <artifactId>commons-collections</artifactId>
         <version>3.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>commons-collections</artifactId>
         <jar>commons-collections.jar</jar>
         <version>3.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>commons-dbcp</groupId>
         <artifactId>commons-dbcp</artifactId>
         <version>1.0</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>commons-dbcp</artifactId>
         <jar>commons-dbcp.jar</jar>
         <version>1.0</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>commons-digester</groupId>
         <artifactId>commons-digester</artifactId>
         <version>1.4.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>commons-digester</artifactId>
         <jar>commons-digester.jar</jar>
         <version>1.4.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>commons-lang</groupId>
         <artifactId>commons-lang</artifactId>
         <version>1.0.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>commons-lang</artifactId>
         <jar>commons-lang.jar</jar>
         <version>1.0.1</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>
   <dependency>
      <maven>
         <groupId>commons-pool</groupId>
         <artifactId>commons-pool</artifactId>
         <version>1.0.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>commons-pool</artifactId>
         <jar>commons-pool.jar</jar>
         <version>1.0.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>geronimo-spec</groupId>
         <artifactId>geronimo-spec-javamail</artifactId>
         <version>1.3.1-rc1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>geronimo-spec-javamail</artifactId>
         <jar>geronimo-javamail-1.3.1-api.jar</jar>
         <version>1.3.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>hsqldb</groupId>
         <artifactId>hsqldb</artifactId>
         <version>1.7.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>hsqldb</artifactId>
         <jar>hsqldb.jar</jar>
         <version>1.7.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>3.8.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>junit</artifactId>
         <jar>junit.jar</jar>
         <version>3.8.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>mx4j</groupId>
         <artifactId>mx4j-jmx</artifactId>
         <version>1.1.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>mx4j-jmx</artifactId>
         <jar>mx4j/mx4j-jmx.jar</jar>
         <version>1.1.1</version>
      </jpp>
   </dependency>
<!--
   <dependency>
      <maven>
         <groupId>${pom.groupId}</groupId>
         <artifactId>naming-core</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>naming-core</artifactId>
         <jar>naming-core.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>${pom.groupId}</groupId>
         <artifactId>naming-factory</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>naming-factory</artifactId>
         <jar>naming-factory.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>${pom.groupId}</groupId>
         <artifactId>naming-java</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>naming-java</artifactId>
         <jar>naming-java.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
-->
</depset>

--- NEW FILE: naming-config-0.8.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>directory-naming</groupId>
  <artifactId>naming-config</artifactId>
  <name>Naming Config</name>
  <version>0.8</version>
  <dependencies>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>naming-core</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>naming-factory</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.0.3</version>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>1.0.1</version>
    </dependency>
    <dependency>
      <groupId>commons-digester</groupId>
      <artifactId>commons-digester</artifactId>
      <version>1.4.1</version>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>naming-java</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>1.6.1</version>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.1</version>
    </dependency>
    <dependency>
      <groupId>commons-dbcp</groupId>
      <artifactId>commons-dbcp</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>commons-pool</groupId>
      <artifactId>commons-pool</artifactId>
      <version>1.0.1</version>
    </dependency>
    <dependency>
      <groupId>hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <version>1.7.1</version>
    </dependency>
  </dependencies>
</project>
--- NEW FILE: naming-core-0.8.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>directory-naming</groupId>
  <artifactId>naming-core</artifactId>
  <name>Naming Core</name>
  <version>0.8</version>
  <dependencies>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.0.3</version>
    </dependency>
  </dependencies>
</project>
--- NEW FILE: naming-factory-0.8.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>directory-naming</groupId>
  <artifactId>naming-factory</artifactId>
  <name>Naming Factories</name>
  <version>0.8</version>
  <dependencies>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.0.3</version>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>naming-core</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>geronimo-spec</groupId>
      <artifactId>geronimo-spec-javamail</artifactId>
      <version>1.3.1-rc1</version>
    </dependency>
  </dependencies>
</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: naming-resources-0.8.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>directory-naming</groupId>
  <artifactId>naming-resources</artifactId>
  <name>Naming Resources</name>
  <version>0.8</version>
  <dependencies>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>naming-core</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.0.3</version>
    </dependency>
  </dependencies>
</project>
Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/directory-naming/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	28 May 2008 18:01:54 -0000	1.1
--- sources	28 May 2008 18:03:29 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ 28d16d012ced076f84c986fed13b87ef  directory-naming-0.8.tar.gz

--- NEW FILE: naming-java-0.8.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>directory-naming</groupId>
  <artifactId>naming-java</artifactId>
  <name>Naming Java</name>
  <version>0.8</version>
  <dependencies>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>naming-core</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.0.3</version>
    </dependency>
  </dependencies>
</project>
--- NEW FILE: directory-naming.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 with_maven %{!?_without_maven:1}%{?_without_maven:0}
%define without_maven %{?_without_maven:1}%{!?_without_maven:0}

%define section free

Name:           directory-naming
Version:        0.8
Release:        1jpp
Epoch:          0
Summary:        Directory Naming
License:        Apache Software License 2.0
Source0:        directory-naming-0.8.tar.gz
# svn export -r 124846 http://svn.apache.org/repos/asf/directory/sandbox/dormant-subprojects/naming/ directory-naming-0.8

Source1:        pom-maven2jpp-depcat.xsl
Source2:        pom-maven2jpp-newdepmap.xsl
Source3:        pom-maven2jpp-mapdeps.xsl
Source4:        directory-naming-0.8-jpp-depmap.xml
Source5:        http://repo1.maven.org/maven2/directory-naming/naming-core/0.8/naming-core-0.8.pom
Source6:        http://repo1.maven.org/maven2/directory-naming/naming-config/0.8/naming-config-0.8.pom
Source7:        http://repo1.maven.org/maven2/directory-naming/naming-factory/0.8/naming-factory-0.8.pom
Source8:        http://repo1.maven.org/maven2/directory-naming/naming-java/0.8/naming-java-0.8.pom
Source9:        http://repo1.maven.org/maven2/directory-naming/naming-management/0.8/naming-management-0.8.pom
Source10:       http://repo1.maven.org/maven2/directory-naming/naming-resources/0.8/naming-resources-0.8.pom

Patch0:         directory-naming-0.8-project.patch

URL:            http://directory.apache.org
Group:          Development/Libraries/Java
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:%{_vendor}}
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
BuildRequires:  jpackage-utils >= 0:1.7.3
BuildRequires:  java-devel >= 0:1.4.2
BuildRequires:  ant >= 0:1.6.5
BuildRequires:  hsqldb
BuildRequires:  junit
%if %{with_maven}
BuildRequires:  maven >= 0:1.1
BuildRequires:  maven-plugins-base
BuildRequires:  maven-plugin-license
BuildRequires:  maven-plugin-multiproject
BuildRequires:  maven-plugin-test
BuildRequires:  maven-plugin-site
BuildRequires:  maven-plugin-xdoc
BuildRequires:  saxon
BuildRequires:  saxon-scripts
%endif
BuildRequires:  jakarta-commons-beanutils
BuildRequires:  jakarta-commons-collections
BuildRequires:  jakarta-commons-dbcp
BuildRequires:  jakarta-commons-digester
BuildRequires:  jakarta-commons-lang
BuildRequires:  jakarta-commons-logging
BuildRequires:  jakarta-commons-pool
BuildRequires:  geronimo-javamail-1.3.1-api
BuildRequires:  mx4j

Requires:  jakarta-commons-beanutils
Requires:  jakarta-commons-collections
Requires:  jakarta-commons-dbcp
Requires:  jakarta-commons-digester
Requires:  jakarta-commons-lang
Requires:  jakarta-commons-logging
Requires:  jakarta-commons-pool
Requires:  geronimo-javamail-1.3.1-api
Requires:  mx4j
Requires(post):    jpackage-utils >= 0:1.7.3
Requires(postun):  jpackage-utils >= 0:1.7.3

%if ! %{gcj_support}
BuildArch:      noarch
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot

%if %{gcj_support}
BuildRequires:    gnu-crypto
BuildRequires:    java-gcj-compat-devel
Requires(post):   java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%description
Old directory/naming module.

%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:        Manual for %{name}
Group:          Development/Libraries/Java

%description manual
%{summary}.
%endif

%prep
%setup -q 
# remove all binary libs
#find . -name "*.jar" -exec rm -f {} \;
for j in $(find . -name "*.jar"); do
    mv $j $j.no
done
%patch0 -b .sav0

%build
%if %{with_maven}
if [ ! -f %{SOURCE4} ]; then
export DEPCAT=$(pwd)/directory-naming-0.8-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} > directory-naming-0.8-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

export MAVEN_HOME_LOCAL=$(pwd)/.maven

maven \
        -Dmaven.repo.remote=file:/usr/share/maven/repository \
        -Dmaven.home.local=${MAVEN_HOME_LOCAL} \
        -Dgoal=jar:jar,javadoc:generate,xdoc:transform \
        multiproject:install multiproject:site
%else
export CLASSPATH=$(build-classpath \
commons-beanutils \
commons-collections \
commons-dbcp \
commons-digester \
commons-lang \
commons-logging \
commons-pool \
geronimo-javamail-1.3.1-api \
hsqldb \
junit \
mx4j/mx4j-jmx \
)
CLASSPATH=$CLASSPATH:$(pwd)/naming-core/target/naming-core-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/naming-java/target/naming-java-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/naming-resources/target/naming-resources-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/naming-management/target/naming-management-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/naming-factory/target/naming-factory-%{version}.jar
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
ant -Dbuild.sysclasspath=only jar javadoc
%endif

%install
rm -rf %{buildroot}
# jars
%__mkdir_p %{buildroot}%{_javadir}/%{name}
for p in \
         naming-config \
         naming-core \
         naming-factory \
         naming-java \
         naming-management \
         naming-resources \
         ; do
%__install -m 644 $p/target/$p-%{version}.jar %{buildroot}%{_javadir}/%{name}/$p-%{version}.jar
done
(cd %{buildroot}%{_javadir}/%{name} && for jar in *-%{version}*; do %__ln_s ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

# poms
%__mkdir_p %{buildroot}%{_datadir}/maven2/poms
%__install -m 644 %{SOURCE5}  %{buildroot}%{_datadir}/maven2/poms/JPP.%{name}-naming-core.pom
%add_to_maven_depmap %{name} naming-core %{version} JPP/%{name} naming-core
%__install -m 644 %{SOURCE6}  %{buildroot}%{_datadir}/maven2/poms/JPP.%{name}-naming-config.pom
%add_to_maven_depmap %{name} naming-config %{version} JPP/%{name} naming-config
%__install -m 644 %{SOURCE7}  %{buildroot}%{_datadir}/maven2/poms/JPP.%{name}-naming-factory.pom
%add_to_maven_depmap %{name} naming-factory %{version} JPP/%{name} naming-factory
%__install -m 644 %{SOURCE8}  %{buildroot}%{_datadir}/maven2/poms/JPP.%{name}-naming-java.pom
%add_to_maven_depmap %{name} naming-java %{version} JPP/%{name} naming-java
%__install -m 644 %{SOURCE9}  %{buildroot}%{_datadir}/maven2/poms/JPP.%{name}-naming-management.pom
%add_to_maven_depmap %{name} naming-management %{version} JPP/%{name} naming-management
%__install -m 644 %{SOURCE10} %{buildroot}%{_datadir}/maven2/poms/JPP.%{name}-naming-resources.pom
%add_to_maven_depmap %{name} naming-resources %{version} JPP/%{name} naming-resources

# javadoc
%if %{with_maven}
%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}
%__cp -pr target/docs/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
%__rm -rf target/docs/apidocs

%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}/config
%__cp -pr target/docs/naming-config/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}/config
%__rm -rf target/docs/naming-config/apidocs

%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}/core
%__cp -pr target/docs/naming-core/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}/core
%__rm -rf target/docs/naming-core/apidocs

%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}/factory
%__cp -pr target/docs/naming-factory/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}/factory
%__rm -rf target/docs/naming-factory/apidocs

%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}/java
%__cp -pr target/docs/naming-java/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}/java
%__rm -rf target/docs/naming-java/apidocs

%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}/management
%__cp -pr target/docs/naming-management/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}/management
%__rm -rf target/docs/naming-management/apidocs

%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}/resources
%__cp -pr target/docs/naming-resources/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}/resources
%__rm -rf target/docs/naming-resources/apidocs
%else
%__cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name}-%{version}/
%endif

ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} # ghost symlink

# manual
%__mkdir_p %{buildroot}%{_docdir}/%{name}-%{version}
%__cp LICENSE.txt  %{buildroot}%{_docdir}/%{name}-%{version}
%if %{with_maven}
%__cp -pr target/docs/* %{buildroot}%{_docdir}/%{name}-%{version}
%endif

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

%clean
%__rm -rf %{buildroot}

%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}/LICENSE.txt 
%{_javadir}/%{name}
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}
%if %{gcj_support}
%attr(-,root,root) %{_libdir}/gcj/%{name}
%endif

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

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

%changelog
* Fri Nov 30 2007 Ralph Apel <r.apel at r-apel.de> 0:0.8-1jpp
- First release


--- NEW FILE: directory-naming-0.8-project.patch ---
--- project.xml.sav	2007-11-28 17:40:39.000000000 +0100
+++ project.xml	2007-11-28 17:44:26.000000000 +0100
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <project>
   
-  <version>3</version>
+  <pomVersion>3</pomVersion>
   <name>directory-naming</name>
   <artifactId>naming-parent</artifactId>
   <groupId>incubator-directory</groupId>

--- 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