[Jpackage-commits] dist/gsbase/devel .cvsignore, 1.1, 1.2 gsbase-2.0.1-jpp-depmap.xml, NONE, 1.1 gsbase-2.0.1.pom, NONE, 1.1 gsbase-build.xml, NONE, 1.1 gsbase-maven.patch, NONE, 1.1 gsbase-site-jsl.patch, NONE, 1.1 gsbase.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
Wed May 28 20:17:32 CEST 2008


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

Modified Files:
	.cvsignore sources 
Added Files:
	gsbase-2.0.1-jpp-depmap.xml gsbase-2.0.1.pom gsbase-build.xml 
	gsbase-maven.patch gsbase-site-jsl.patch gsbase.spec 
	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/gsbase/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	28 May 2008 18:17:11 -0000	1.1
--- .cvsignore	28 May 2008 18:17:30 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ gsbase-2.0.1.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: gsbase-site-jsl.patch ---
--- xdocs/site.jsl.sav1	2007-12-19 12:45:35.000000000 +0100
+++ xdocs/site.jsl	2007-12-19 12:46:17.000000000 +0100
@@ -156,7 +156,7 @@
               <div id="lastPublished">Last published: ${build.date}</div>
             </j:if>
             <x:if select="$nav">
-              <jsl:applyTemplates select="$nav/body/menu[not(@type) | @type='header'] | $nav/body/search"/>
+              <jsl:applyTemplates select="$nav/body/menu[not(@type)] | $nav/body/menu[@type='header'] | $nav/body/search"/>
             </x:if>
             <jsl:applyTemplates select="$projectNav/body/menu"/>
             <!-- allows user to put menu items after standard reports -->
@@ -514,4 +514,4 @@
   <!-- CDATA and text nodes pass-thru -->
   <jsl:template match="text()"><x:expr select="."/></jsl:template>
 
-</jsl:stylesheet>
\ No newline at end of file
+</jsl:stylesheet>

--- NEW FILE: gsbase.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:           gsbase
Version:        2.0.1
Release:        1jpp
Epoch:          0
Summary:        GSBase
License:        Apache-style Software License
Group:          Development/Java
Vendor:         JPackage Project
Distribution:   JPackage
URL:            http://gsbase.sourceforge.net/
Source0:        %{name}-%{version}.tar.gz
# cvs -d:pserver:anonymous at gsbase.cvs.sourceforge.net:/cvsroot/gsbase login
# cvs -z3 -d:pserver:anonymous at gsbase.cvs.sourceforge.net:/cvsroot/gsbase export -r HEAD gsbase2
Source1:        pom-maven2jpp-depcat.xsl
Source2:        pom-maven2jpp-newdepmap.xsl
Source3:        pom-maven2jpp-mapdeps.xsl
Source4:        %{name}-%{version}-jpp-depmap.xml
Source5:        %{name}-%{version}.pom
Source6:        %{name}-build.xml

Patch0:         %{name}-maven.patch
Patch1:         %{name}-site-jsl.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot

%if ! %{gcj_support}
BuildArch:      noarch
%endif

BuildRequires:  jpackage-utils >= 0:1.7.3
BuildRequires:  ant >= 0:1.6.5
BuildRequires:  junit
BuildRequires:  junitperf
%if %{with_maven}
BuildRequires:  maven >= 0:1.1
BuildRequires:  maven-plugins-base
BuildRequires:  maven-plugin-changelog
BuildRequires:  maven-plugin-changes
BuildRequires:  maven-plugin-checkstyle
BuildRequires:  maven-plugin-developer-activity
BuildRequires:  maven-plugin-file-activity
BuildRequires:  maven-plugin-jdepend
BuildRequires:  maven-plugin-jxr
BuildRequires:  maven-plugin-license
BuildRequires:  maven-plugin-linkcheck
BuildRequires:  maven-plugin-pmd
BuildRequires:  maven-plugin-tasklist
BuildRequires:  maven-plugin-test
BuildRequires:  maven-plugin-xdoc
BuildRequires:  saxon
BuildRequires:  saxon-scripts
%endif
%if %{gcj_support}
BuildRequires:    gnu-crypto
BuildRequires:    java-gcj-compat-devel
Requires(post):   java-gcj-compat
Requires(postun): java-gcj-compat
%endif
Requires:  junit
Requires:  junitperf
Requires(post):    jpackage-utils >= 0:1.7.3
Requires(postun):  jpackage-utils >= 0:1.7.3

%description
A collection of classes that are helpful 
when writing JUnit test cases. 


%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 
#find . -name "*.jar" -exec rm -f {} \;
for j in $(find . -name "*.jar" ); do
        mv $j $j.no
done
%patch0 -b .sav0
%patch1 -b .sav1
cp %{SOURCE6} build.xml

%build
%if %{with_maven}
export DEPCAT=$(pwd)/%{name}-%{version}-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} > %{name}-%{version}-depmap.new.xml

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  -e \
        -Dmaven.repo.remote=file:/usr/share/maven/repository \
        -Dmaven.home.local=${MAVEN_HOME_LOCAL} \
        -Dmaven.test.error.ignore=true \
        -Dmaven.test.failure.ignore=true \
        -Dmaven.xdoc.jsl=file://$(pwd)/xdocs/site.jsl \
        jar:jar javadoc:generate xdoc:transform
%else
export CLASSPATH=$(build-classpath \
junit \
junitperf \
)
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
ant -Dbuild.sysclasspath=only jar javadoc
%endif

%install
rm -rf $RPM_BUILD_ROOT
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -pm 644 target/%{name}-%{version}.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
%add_to_maven_depmap %{name} %{name} %{namedversion} JPP %{name}

(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

# poms
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -pm 644 %{SOURCE5} \
    $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom

# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr target/docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

# manual
install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%if %{with_maven}
rm -rf target/docs/apidocs
cp -pr target/docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%endif

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

%clean
rm -rf $RPM_BUILD_ROOT

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

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

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

%changelog
* Fri Dec 21 2007 Ralph Apel <r.apel at r-apel.de> - 0:2.0.1-1jpp
- First JPackage build


--- NEW FILE: gsbase-maven.patch ---
--- maven.xml.sav	2007-12-19 12:25:02.000000000 +0100
+++ maven.xml	2007-12-19 12:25:16.000000000 +0100
@@ -49,9 +49,7 @@
     
     <postGoal name="xdoc:register-reports">
 	    	<attainGoal name="maven-linkcheck-plugin:deregister"/>
-	    	<attainGoal name="maven-simian-plugin:register"/>
 	    	<attainGoal name="maven-pmd-plugin:register"/>
-	    	<attainGoal name="maven-clover-plugin:register"/>
     </postGoal>
 
     <goal

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

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/gsbase/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	28 May 2008 18:17:11 -0000	1.1
--- sources	28 May 2008 18:17:30 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ 8dea413feba4586cb681789d3ed6967b  gsbase-2.0.1.tar.gz

--- NEW FILE: gsbase-build.xml ---
<?xml version="1.0" encoding="UTF-8"?>

<!--build.xml generated by maven from project.xml version 2.0.1
  on date December 19 2007, time 1301-->
<project default="jar" name="gsbase" basedir=".">
  <!--Load local and user build preferences-->
  <property file="build.properties"></property>
  <property file="${user.home}/build.properties"></property>
  <!--Build properties-->
  <property name="defaulttargetdir" value="${basedir}/target"></property>
  <property name="libdir" value="${user.home}/.maven/repository"></property>
  <property name="classesdir" value="${basedir}/target/classes"></property>
  <property name="testclassesdir" value="${basedir}/target/test-classes"></property>
  <property name="testreportdir" value="${basedir}/target/test-reports"></property>
  <property name="distdir" value="${basedir}/dist"></property>
  <property name="javadocdir" value="${basedir}/target/docs/apidocs"></property>
  <property name="final.name" value="gsbase-2.0.1"></property>
  <property name="proxy.host" value=""></property>
  <property name="proxy.port" value=""></property>
  <property name="proxy.username" value=""></property>
  <property name="proxy.password" value=""></property>
  <path id="build.classpath">
    <pathelement location="${libdir}/JPP/jars/junit.jar"></pathelement>
    <pathelement location="${libdir}/JPP/jars/junitperf.jar"></pathelement>
  </path>
  <target name="init" description="o Initializes some properties">
    <mkdir dir="${libdir}"></mkdir>
    <condition property="noget">
      <equals arg2="only" arg1="${build.sysclasspath}"></equals>
    </condition>
    <!--Test if JUNIT is present in ANT classpath-->
    <available property="Junit.present" classname="junit.framework.Test"></available>
    <!--Test if user defined a proxy-->
    <condition property="useProxy">
      <and>
        <isset property="proxy.host"></isset>
        <not>
          <equals trim="true" arg2="" arg1="${proxy.host}"></equals>
        </not>
      </and>
    </condition>
  </target>
  <target name="compile" description="o Compile the code" depends="get-deps">
    <mkdir dir="${classesdir}"></mkdir>
    <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
      <src>
        <pathelement location="${basedir}/src/java"></pathelement>
      </src>
      <classpath refid="build.classpath"></classpath>
    </javac>
    <copy todir="${classesdir}/META-INF" file="${basedir}/LICENSE.txt"></copy>
  </target>
  <target name="jar" description="o Create the jar" depends="compile,test">
    <jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}"></jar>
  </target>
  <target name="clean" description="o Clean up the generated directories">
    <delete dir="${defaulttargetdir}"></delete>
    <delete dir="${distdir}"></delete>
  </target>
  <target name="dist" description="o Create a distribution" depends="jar, javadoc">
    <mkdir dir="dist"></mkdir>
    <copy todir="dist">
      <fileset dir="${defaulttargetdir}" includes="*.jar"></fileset>
      <fileset dir="${basedir}" includes="LICENSE*, README*"></fileset>
    </copy>
  </target>
  <target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
    <echo message="There were test failures."></echo>
  </target>
  <target name="internal-test" if="Junit.present" depends="junit-present,compile-tests">
    <mkdir dir="${testreportdir}"></mkdir>
    <junit dir="${basedir}" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="false">
      <sysproperty key="basedir" value="."></sysproperty>
      <formatter type="xml"></formatter>
      <formatter usefile="false" type="plain"></formatter>
      <classpath>
        <path refid="build.classpath"></path>
        <pathelement path="${testclassesdir}"></pathelement>
        <pathelement path="${classesdir}"></pathelement>
      </classpath>
      <batchtest todir="${testreportdir}">
        <fileset dir="${basedir}/src/test">
          <include name="**/*Test.java"></include>
        </fileset>
      </batchtest>
    </junit>
  </target>
  <target name="junit-present" unless="Junit.present" depends="init">
    <echo>================================= WARNING ================================</echo>
    <echo>Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.</echo>
    <echo>==========================================================================</echo>
  </target>
  <target name="compile-tests" if="Junit.present" depends="junit-present,compile">
    <mkdir dir="${testclassesdir}"></mkdir>
    <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
      <src>
        <pathelement location="${basedir}/src/test"></pathelement>
      </src>
      <classpath>
        <path refid="build.classpath"></path>
        <pathelement path="${classesdir}"></pathelement>
      </classpath>
    </javac>
  </target>
  <target name="javadoc" description="o Generate javadoc" depends="get-deps">
    <mkdir dir="${javadocdir}"></mkdir>
    <tstamp>
      <format pattern="1998-yyyy" property="year"></format>
    </tstamp>
    <property name="copyright" value="Copyright &copy;  Gargoyle Software Inc.. All Rights Reserved."></property>
    <property name="title" value="gsbase 2.0.1 API"></property>
    <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="${basedir}/src/java" packagenames="com.gargoylesoftware.base.*">
      <classpath>
        <path refid="build.classpath"></path>
      </classpath>
    </javadoc>
  </target>
  <target name="get-dep-junit.jar" description="o Download the dependency : junit.jar" unless="junit.jar" depends="init,setProxy,noProxy,get-custom-dep-junit.jar">
    <mkdir dir="${libdir}/JPP/jars/"></mkdir>
    <get dest="${libdir}/JPP/jars/junit.jar" usetimestamp="true" ignoreerrors="true" src="file:/usr/share/maven/repository/JPP/jars/junit.jar"></get>
  </target>
  <target name="get-custom-dep-junit.jar" if="junit.jar" depends="init,setProxy,noProxy">
    <mkdir dir="${libdir}/JPP/jars/"></mkdir>
    <get dest="${libdir}/JPP/jars/junit.jar" usetimestamp="true" ignoreerrors="true" src="${junit.jar}"></get>
  </target>
  <target name="get-dep-junitperf.jar" description="o Download the dependency : junitperf.jar" unless="junitperf.jar" depends="init,setProxy,noProxy,get-custom-dep-junitperf.jar">
    <mkdir dir="${libdir}/JPP/jars/"></mkdir>
    <get dest="${libdir}/JPP/jars/junitperf.jar" usetimestamp="true" ignoreerrors="true" src="file:/usr/share/maven/repository/JPP/jars/junitperf.jar"></get>
  </target>
  <target name="get-custom-dep-junitperf.jar" if="junitperf.jar" depends="init,setProxy,noProxy">
    <mkdir dir="${libdir}/JPP/jars/"></mkdir>
    <get dest="${libdir}/JPP/jars/junitperf.jar" usetimestamp="true" ignoreerrors="true" src="${junitperf.jar}"></get>
  </target>
  <target name="get-deps" unless="noget" depends="get-dep-junit.jar,get-dep-junitperf.jar"></target>
  <target name="setProxy" if="useProxy" depends="init">
    <!--Proxy settings works only with a JDK 1.2 and higher.-->
    <echo>Proxy used :</echo>
    <echo>Proxy host [${proxy.host}]</echo>
    <echo>Proxy port [${proxy.port}]</echo>
    <echo>Proxy user [${proxy.username}]</echo>
    <setproxy proxyuser="${proxy.username}" proxyport="${proxy.port}" proxypassword="${proxy.password}" proxyhost="${proxy.host}"></setproxy>
  </target>
  <target name="noProxy" unless="useProxy" depends="init">
    <echo>Proxy not used.</echo>
  </target>
  <target name="install-maven">
    <get dest="${user.home}/maven-install-latest.jar" usetimestamp="true" src="${repo}/maven/maven-install-latest.jar"></get>
    <unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar"></unjar>
  </target>
</project>

--- NEW FILE: gsbase-2.0.1-jpp-depmap.xml ---
<?xml version="1.0" encoding="utf-8"?>
<depset>
   <dependency>
      <maven>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>3.8.1</version>
         <url>http://www.junit.org/</url>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>junit</artifactId>
         <jar>junit.jar</jar>
         <version>3.8.1</version>
         <url>http://www.junit.org/</url>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>junitperf</groupId>
         <artifactId>junitperf</artifactId>
         <version>1.8</version>
         <url>http://www.clarkware.com</url>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>junitperf</artifactId>
         <jar>junitperf.jar</jar>
         <version>1.8</version>
         <url>http://www.clarkware.com</url>
      </jpp>
   </dependency>
</depset>
--- NEW FILE: gsbase-2.0.1.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>gsbase</groupId>
  <artifactId>gsbase</artifactId>
  <name>gsbase</name>
  <version>2.0.1</version>
  <description>A collection of java utility classes</description>
  <url>http://gsbase.sourceforge.net</url>
  <issueManagement>
    <url>http://sourceforge.net/tracker/?group_id=13111</url>
  </issueManagement>
  <ciManagement>
    <notifiers>
      <notifier>
        <address>gsbase at GargoyleSoftware.com</address>
      </notifier>
    </notifiers>
  </ciManagement>
  <inceptionYear>1998</inceptionYear>
  <developers>
    <developer>
      <id>mbowler</id>
      <name>Mike Bowler</name>
      <email>mbowler at GargoyleSoftware.com</email>
      <organization>Gargoyle Software Inc.</organization>
      <roles>
        <role>Release Manager</role>
        <role>Java Developer</role>
      </roles>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>The GSBase Software License</name>
      <url>http://gsbase.sourceforge.net/license.html</url>
    </license>
  </licenses>
  <scm>
    <connection>scm:cvs:ext:mbowler at cvs.gsbase.sourceforge.net:/cvsroot/gsbase:gsbase2</connection>
    <developerConnection></developerConnection>
    <url>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/gsbase</url>
  </scm>
  <organization>
    <name>Gargoyle Software Inc.</name>
    <url>http://www.GargoyleSoftware.com/</url>
  </organization>
  <build>
    <sourceDirectory>src/java</sourceDirectory>
    <testSourceDirectory>src/test</testSourceDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <includes>
            <include>**/*Test.java</include>
          </includes>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
    </dependency>
    <dependency>
      <groupId>junitperf</groupId>
      <artifactId>junitperf</artifactId>
      <version>1.8</version>
    </dependency>
  </dependencies>
  <distributionManagement>
    <site>
      <id>default</id>
      <name>Default Site</name>
      <url>scp://gsbase.sourceforge.net//home/groups/g/gs/gsbase/htdocs</url>
    </site>
  </distributionManagement>
</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:choose>
    <xsl:when test="document($map)//dependency/maven[./artifactId/text() = $artifact]">
     <xsl:for-each select="document($map)//dependency/maven[./artifactId/text() = $artifact][1]">
      <xsl:if test="../jpp">
       <xsl:element name="dependency">
        <xsl:copy-of select="../jpp/*"/>
        <xsl:copy-of select="$this/properties"/>
       </xsl:element>
      </xsl:if>
     </xsl:for-each>
    </xsl:when>
    <xsl:otherwise>
     <xsl:element name="dependency">
      <xsl:copy-of select="./*"/>
     </xsl:element>
    </xsl:otherwise>
   </xsl:choose>
  <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