[Jpackage-commits] dist/ws-commons-util/JPP-6 Makefile, NONE, 1.1 sources, NONE, 1.1 ws-commons-util-build.xml, NONE, 1.1 ws-commons-util-jpp-depmap.xml, NONE, 1.1 ws-commons-util-settings.xml, NONE, 1.1 ws-commons-util-site_xml.patch, NONE, 1.1 ws-commons-util.spec, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Fri Dec 10 22:18:03 CET 2010


Update of /home/projects/jpackage/cvs/dist/ws-commons-util/JPP-6
In directory ryu.zarb.org:/tmp/cvs-serv17151/JPP-6

Added Files:
	Makefile sources ws-commons-util-build.xml 
	ws-commons-util-jpp-depmap.xml ws-commons-util-settings.xml 
	ws-commons-util-site_xml.patch ws-commons-util.spec 
Log Message:
Import ws-commons-util into JPP-6

--- NEW FILE: Makefile ---
# Makefile for source rpm: ws-commons-util
# $Id: Makefile,v 1.1 2010/12/10 21:18:01 jpackage Exp $
NAME := ws-commons-util
SPECFILE = $(firstword $(wildcard *.spec))

define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef

MAKEFILE_COMMON := $(shell $(find-makefile-common))

ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef

MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif

include $(MAKEFILE_COMMON)

--- NEW FILE: ws-commons-util-build.xml ---
<project name="ws-commons-util" default="jar" basedir=".">
  <property file="${user.home}/.m2/maven.properties"/>
  <property name="maven.build.output" value="target/classes"/>
  <property name="maven.build.directory" value="target"/>
  <property name="maven.build.final.name" value="ws-commons-util-1.0.1"/>
  <property name="maven.test.reports" value="${maven.build.directory}/test-reports"/>
  <property name="maven.test.output" value="target/test-classes"/>
  <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
  <property name="javadocdir" value="target/site/apidocs"></property>
  <path id="build.classpath">
    <fileset dir="${maven.repo.local}">
      <include name="junit/junit/3.8.1/junit-3.8.1.jar"/>
      <include name="xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.jar"/>
      <include name="org/apache/ws/commons/ws-commons-java5/1.0.1/ws-commons-java5-1.0.1.jar"/>
    </fileset>
  </path>
  <target name="clean" description="Clean the output directory">
    <delete dir="${maven.build.directory}"/>
  </target>
  <target name="compile" depends="get-deps" description="Compile the code">
    <mkdir dir="${maven.build.output}"/>
    <javac destdir="${maven.build.output}" excludes="**/package.html" debug="true" deprecation="true" optimize="false">
      <src>
        <pathelement location="src/main/java"/>
      </src>
      <classpath refid="build.classpath"/>
    </javac>
  </target>
  <target name="jar" depends="compile,test" description="Clean the JAR">
    <jar jarfile="${maven.build.directory}/${maven.build.final.name}.jar" basedir="${maven.build.output}" excludes="**/package.html"/>
  </target>
  <target name="compile-tests" depends="junit-present, compile" description="Compile the test code" if="junit.present">
    <mkdir dir="${maven.test.output}"/>
    <javac destdir="${maven.test.output}" excludes="**/package.html" debug="true" deprecation="true" optimize="false">
      <src>
        <pathelement location="src/test/java"/>
      </src>
      <classpath>
        <path refid="build.classpath"/>
        <pathelement location="${maven.build.output}"/>
      </classpath>
    </javac>
  </target>
  <target name="test" depends="junit-present, compile-tests" if="junit.present" description="Run the test cases">
    <mkdir dir="${maven.test.reports}"/>
    <junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
      <sysproperty key="basedir" value="."/>
      <formatter type="xml"/>
      <formatter type="plain" usefile="false"/>
      <classpath>
        <path refid="build.classpath"/>
        <pathelement location="${maven.build.output}"/>
        <pathelement location="${maven.test.output}"/>
      </classpath>
      <batchtest todir="${maven.test.reports}">
        <fileset dir="src/test/java">
          <include name="**/*Test.java"/>
          <exclude name="**/*Abstract*Test.java"/>
        </fileset>
      </batchtest>
    </junit>
  </target>
  <target name="test-junit-present">
    <available classname="junit.framework.Test" property="junit.present"/>
  </target>
  <target name="junit-present" depends="test-junit-present" unless="junit.present">
    <echo>================================= WARNING ================================</echo>
    <echo> Junit isn't present in your $ANT_HOME/lib directory. Tests not executed. </echo>
    <echo>==========================================================================</echo>
  </target>
  <target name="test-offline">
    <condition property="maven.mode.offline">
      <equals arg1="${build.sysclasspath}" arg2="only"/>
    </condition>
  </target>
  <target name="get-deps" depends="test-offline" description="Download all dependencies" unless="maven.mode.offline">
    <mkdir dir="${maven.repo.local}"/>
    <mkdir dir="/var/home/jpp/rebuild/free/BUILD/ws-commons-util-1.0.1/junit/junit/3.8.1"/>
    <get src="__JPP_URL_PLACEHOLDER__/junit/junit/3.8.1/junit-3.8.1.jar" dest="${maven.repo.local}/junit/junit/3.8.1/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="__JAVADIR_PLACEHOLDER__/junit/junit/3.8.1/junit-3.8.1.jar" dest="${maven.repo.local}/junit/junit/3.8.1/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="__MAVENREPO_DIR_PLACEHOLDER__/junit/junit/3.8.1/junit-3.8.1.jar" dest="${maven.repo.local}/junit/junit/3.8.1/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="file:///usr/share/maven2/repository/junit/junit/3.8.1/junit-3.8.1.jar" dest="${maven.repo.local}/junit/junit/3.8.1/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar" dest="${maven.repo.local}/junit/junit/3.8.1/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <mkdir dir="/var/home/jpp/rebuild/free/BUILD/ws-commons-util-1.0.1/xml-apis/xml-apis/2.0.2"/>
    <get src="__JPP_URL_PLACEHOLDER__/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.jar" dest="${maven.repo.local}/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="__JAVADIR_PLACEHOLDER__/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.jar" dest="${maven.repo.local}/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="__MAVENREPO_DIR_PLACEHOLDER__/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.jar" dest="${maven.repo.local}/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="file:///usr/share/maven2/repository/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.jar" dest="${maven.repo.local}/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.jar" dest="${maven.repo.local}/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.jar" usetimestamp="true" ignoreerrors="true"/>
    <mkdir dir="/var/home/jpp/rebuild/free/BUILD/ws-commons-util-1.0.1/org/apache/ws/commons/ws-commons-java5/1.0.1"/>
    <get src="__JPP_URL_PLACEHOLDER__/org/apache/ws/commons/ws-commons-java5/1.0.1/ws-commons-java5-1.0.1.jar" dest="${maven.repo.local}/org/apache/ws/commons/ws-commons-java5/1.0.1/ws-commons-java5-1.0.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="__JAVADIR_PLACEHOLDER__/org/apache/ws/commons/ws-commons-java5/1.0.1/ws-commons-java5-1.0.1.jar" dest="${maven.repo.local}/org/apache/ws/commons/ws-commons-java5/1.0.1/ws-commons-java5-1.0.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="__MAVENREPO_DIR_PLACEHOLDER__/org/apache/ws/commons/ws-commons-java5/1.0.1/ws-commons-java5-1.0.1.jar" dest="${maven.repo.local}/org/apache/ws/commons/ws-commons-java5/1.0.1/ws-commons-java5-1.0.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="file:///usr/share/maven2/repository/org/apache/ws/commons/ws-commons-java5/1.0.1/ws-commons-java5-1.0.1.jar" dest="${maven.repo.local}/org/apache/ws/commons/ws-commons-java5/1.0.1/ws-commons-java5-1.0.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/org/apache/ws/commons/ws-commons-java5/1.0.1/ws-commons-java5-1.0.1.jar" dest="${maven.repo.local}/org/apache/ws/commons/ws-commons-java5/1.0.1/ws-commons-java5-1.0.1.jar" usetimestamp="true" ignoreerrors="true"/>
  </target>
  <target name="javadoc" description="o Generate javadoc" depends="get-deps">
    <mkdir dir="${javadocdir}"></mkdir>
    <tstamp>
      <format pattern="-yyyy" property="year"></format>
    </tstamp>
    <property name="copyright" value="Copyright &copy;  . All Rights Reserved."></property>
    <property name="title" value="Apache WS-Commons Util 1.0.1 API"></property>    <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/main/java" packagenames="org.apache.ws.commons.*">
      <classpath>
        <path refid="build.classpath"></path>
      </classpath>
    </javadoc>
  </target>
</project>

--- NEW FILE: ws-commons-util-site_xml.patch ---
--- src/site/site.xml.sav	2007-08-03 11:21:51.000000000 +0200
+++ src/site/site.xml	2007-08-03 11:23:34.000000000 +0200
@@ -1,4 +1,9 @@
 <project name="ws-commons-util">
+  <skin>
+    <groupId>org.apache.maven</groupId>
+    <artifactId>maven-default-skin</artifactId>
+    <version>1.0</version>
+  </skin>
   <bannerLeft>
     <name>Apache Webservices Common Utilities</name>
     <src>http://ws.apache.org/images/project-logo.jpg</src>

--- NEW FILE: ws-commons-util.spec ---
# Copyright (c) 2000-2010, 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 with()          %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without()       %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
%define bcond_with()    %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}

%bcond_without          maven

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

%define section         free

Name:           ws-commons-util
Version:        1.0.2
Release:        3%{?dist}
Epoch:          0
Summary:        WS Common Utilities
License:        ASL 2.0
Url:            http://ws.apache.org/commons/util/
Group:          Development/Libraries/Java
# svn export http://svn.apache.org/repos/asf/webservices/commons/tags/util/1.0.2/ ws-commons-util-1.0.2
Source0:        ws-commons-util-1.0.2.tar.bz2
Source1:        %{name}-settings.xml
Source2:        %{name}-jpp-depmap.xml
Source3:        %{name}-build.xml
Patch0:         %{name}-site_xml.patch

BuildRequires:  jpackage-utils >= 0:1.7.5
BuildRequires:  java-devel >= 0:1.6.0
BuildRequires:  ant >= 0:1.7.1
BuildRequires:  junit >= 0:3.8.2
%if %with maven
BuildRequires:  maven2 >= 2.0.8
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-project-info-reports
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-site
BuildRequires:  maven2-plugin-surefire
BuildRequires:  maven2-default-skin
%endif
#BuildRequires:  ws-commons-java5
#BuildRequires:  xml-commons-jaxp-1.3-apis
#Requires:  xml-commons-jaxp-1.3-apis
Requires:  java >= 0:1.6.0
#Requires:  ws-commons-java5

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

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

%description
This is a small collection of utility classes, that allow 
high performance XML processing based on SAX. Basically, 
it is assumed, that you are using an JAXP 1.1 compliant 
XML parser and nothing else. In particular, no dependency 
on the javax.xml.transform package is introduced.

%package javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation

%description javadoc
%{summary}.

%prep
%setup -q 
cp -p %{SOURCE1} settings.xml
cp -p %{SOURCE3} build.xml
%patch0 -p0

%build
%if %with maven
sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml
sed -i -e "s|<url>__JAVADIR_PLACEHOLDER__</url>|<url>file://`pwd`/external_repo</url>|g" settings.xml
sed -i -e "s|<url>__MAVENREPO_DIR_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml
sed -i -e "s|<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/maven2/plugins</url>|g" settings.xml
sed -i -e "s|<url>__ECLIPSEDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/eclipse/plugins</url>|g" settings.xml

export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL

mkdir external_repo
ln -s %{_javadir} external_repo/JPP

mvn-jpp \
        -e \
        -s $(pwd)/settings.xml \
        -Dmaven2.jpp.mode=true \
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        install javadoc:javadoc site
%else
export OPT_JAR_LIST=:
export CLASSPATH=$(build-classpath \
ws-commons-java5 \
xml-commons-jaxp-1.3-apis \
)
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
ant -Dbuild.sysclasspath=only jar javadoc
%endif


%install
rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 target/%{name}-%{version}.jar \
               $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
%add_to_maven_depmap org.apache.ws.commons %{name} %{version} JPP %{name}

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

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

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

install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
install -m 644 LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%if %{with_maven}
# FIXME: (dwalluck): breaks -bi --short-circuit
rm -rf target/site/apidocs
cp -pr target/site/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%endif

%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif

%clean
rm -rf $RPM_BUILD_ROOT

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

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

%changelog
* Fri Dec 10 2010 Ralph Apel <r.apel at r-apel.de> 0:1.0.2-3
- Adapt to JPP-6

* Thu Dec 11 2008 David Walluck <dwalluck at redhat.com> 0:1.0.2-2
- fix depmap

* Tue Nov 11 2008 David Walluck <dwalluck at redhat.com> 0:1.0.2-1
- 1.0.2

* Mon Aug 06 2007 Ralph Apel <r.apel at r-apel.de> 0:1.0.1-1jpp
- Initial build.


--- NEW FILE: sources ---
8ebe2c2160bdbcc03329e3b9f3b2e1dd  ws-commons-util-1.0.2.tar.bz2

--- NEW FILE: ws-commons-util-jpp-depmap.xml ---
<dependencies>
        <dependency>
                <maven>
                        <groupId>org.apache.maven</groupId>
                        <artifactId>maven-default-skin</artifactId>
                        <version>1.0</version>
                </maven>
                <jpp>
                        <groupId>JPP/maven2</groupId>
                        <artifactId>default-skin</artifactId>
                        <version>1.0</version>
                </jpp>
        </dependency>
        <dependency>
                <maven>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-project-info-reports-plugin</artifactId>
                        <version>2.0.7</version>
                </maven>
                <jpp>
                        <groupId>JPP/maven2/plugins</groupId>
                        <artifactId>project-info-reports-plugin</artifactId>
                        <version>2.0.7</version>
                </jpp>
        </dependency>
</dependencies>

--- NEW FILE: ws-commons-util-settings.xml ---
<settings>
	<profiles>
		<profile>
			<id>JPP</id>
			<repositories>
				<repository>
					<id>internal</id>
					<layout>jpp</layout>
					<url>__JPP_URL_PLACEHOLDER__</url>
				</repository>
				<repository>
					<id>external</id>
					<layout>jpp</layout>
					<url>__JAVADIR_PLACEHOLDER__</url>
				</repository>
				<repository>
					<id>local</id>
					<layout>jpp</layout>
					<url>__MAVENREPO_DIR_PLACEHOLDER__</url>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
					<id>plugins-internal</id>
					<name>plugins-internal</name>
					<layout>jpp</layout>
					<url>__JPP_URL_PLACEHOLDER__</url>
				</pluginRepository>
				<pluginRepository>
					<id>plugins-external</id>
					<name>plugins-external</name>
					<layout>jpp</layout>
					<url>__JAVADIR_PLACEHOLDER__</url>
				</pluginRepository>
				<pluginRepository>
					<id>plugins-maven</id>
					<name>plugins-maven</name>
					<layout>jpp</layout>
					<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>
				</pluginRepository>
			</pluginRepositories>
		</profile>
	</profiles>
	<activeProfiles>
		<activeProfile>JPP</activeProfile>
	</activeProfiles>
</settings>




More information about the JPackage-commits mailing list