Andrew Overholt f2b6b10
# Copyright (c) 2000-2007, JPackage Project
Andrew Overholt f2b6b10
# All rights reserved.
Andrew Overholt f2b6b10
#
Andrew Overholt f2b6b10
# Redistribution and use in source and binary forms, with or without
Andrew Overholt f2b6b10
# modification, are permitted provided that the following conditions
Andrew Overholt f2b6b10
# are met:
Andrew Overholt f2b6b10
#
Andrew Overholt f2b6b10
# 1. Redistributions of source code must retain the above copyright
Andrew Overholt f2b6b10
#    notice, this list of conditions and the following disclaimer.
Andrew Overholt f2b6b10
# 2. Redistributions in binary form must reproduce the above copyright
Andrew Overholt f2b6b10
#    notice, this list of conditions and the following disclaimer in the
Andrew Overholt f2b6b10
#    documentation and/or other materials provided with the
Andrew Overholt f2b6b10
#    distribution.
Andrew Overholt f2b6b10
# 3. Neither the name of the JPackage Project nor the names of its
Andrew Overholt f2b6b10
#    contributors may be used to endorse or promote products derived
Andrew Overholt f2b6b10
#    from this software without specific prior written permission.
Andrew Overholt f2b6b10
#
Andrew Overholt f2b6b10
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Andrew Overholt f2b6b10
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Andrew Overholt f2b6b10
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Andrew Overholt f2b6b10
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Andrew Overholt f2b6b10
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Andrew Overholt f2b6b10
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Andrew Overholt f2b6b10
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Andrew Overholt f2b6b10
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Andrew Overholt f2b6b10
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Andrew Overholt f2b6b10
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Andrew Overholt f2b6b10
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Andrew Overholt f2b6b10
#
Andrew Overholt f2b6b10
5cbb2a5
%global with_maven 1
Andrew Overholt f2b6b10
5cbb2a5
%global parent plexus
5cbb2a5
%global subname classworlds
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
Name:           %{parent}-%{subname}
5cbb2a5
Version:        2.2.3
c5f7fd7
Release:        2%{?dist}
Andrew Overholt f2b6b10
Summary:        Plexus Classworlds Classloader Framework
Andrew Overholt f2b6b10
License:        ASL 2.0 and Plexus
Andrew Overholt 51b12a3
Group:          Development/Libraries
Andrew Overholt f2b6b10
URL:            http://plexus.codehaus.org/
5cbb2a5
# svn export http://svn.codehaus.org/plexus/plexus-classworlds/tags/plexus-classworlds-2.2.3 plexus-classworlds-2.2.3
5cbb2a5
# tar caf plexus-classworlds-2.2.3.tar.xz plexus-classworlds-2.2.3
5cbb2a5
Source0:        %{name}-%{version}.tar.xz
Andrew Overholt f2b6b10
Andrew Overholt 51b12a3
# Generated with mvn ant:ant
Andrew Overholt f2b6b10
Source1:        plexus-classworlds-1.2-build.xml
Andrew Overholt 51b12a3
# Fedora-specific maven bits
Andrew Overholt f2b6b10
Source3:        plexus-classworlds-settings.xml
Andrew Overholt f2b6b10
5cbb2a5
# workaround objectweb-asm depmap
5cbb2a5
Source5:        %{name}.depmap
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Andrew Overholt f2b6b10
BuildArch:      noarch
Andrew Overholt f2b6b10
5cbb2a5
BuildRequires:  jpackage-utils
5cbb2a5
BuildRequires:  ant
5cbb2a5
BuildRequires:  apache-commons-logging
Andrew Overholt f2b6b10
BuildRequires:  xml-commons-jaxp-1.3-apis
Andrew Overholt f2b6b10
%if %{with_maven}
5cbb2a5
BuildRequires:  maven2
5cbb2a5
BuildRequires:  maven-compiler-plugin
5cbb2a5
BuildRequires:  maven-install-plugin
5cbb2a5
BuildRequires:  maven-jar-plugin
5cbb2a5
BuildRequires:  maven-javadoc-plugin
5cbb2a5
BuildRequires:  maven-resources-plugin
Andrew Overholt 51b12a3
BuildRequires:  maven-doxia
Andrew Overholt f2b6b10
BuildRequires:  maven-doxia-sitetools
5cbb2a5
BuildRequires:  maven-release-plugin
5cbb2a5
BuildRequires:  maven-shared-invoker
5cbb2a5
BuildRequires:  maven-shared-reporting-impl
5cbb2a5
BuildRequires:  maven-dependency-plugin
5cbb2a5
BuildRequires:  maven-surefire-maven-plugin
5cbb2a5
BuildRequires:  maven-surefire-provider-junit
Andrew Overholt f2b6b10
%endif
Andrew Overholt 51b12a3
BuildRequires:  plexus-utils
Andrew Overholt f2b6b10
5cbb2a5
Requires(post):    jpackage-utils
5cbb2a5
Requires(postun):  jpackage-utils
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
%description
Andrew Overholt f2b6b10
Classworlds is a framework for container developers
Andrew Overholt f2b6b10
who require complex manipulation of Java's ClassLoaders.
5cbb2a5
Java's native ClassLoader mechanisms and classes can cause
Andrew Overholt f2b6b10
much headache and confusion for certain types of
Andrew Overholt f2b6b10
application developers. Projects which involve dynamic
Andrew Overholt f2b6b10
loading of components or otherwise represent a 'container'
Andrew Overholt f2b6b10
can benefit from the classloading control provided by
Andrew Overholt f2b6b10
classworlds.
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
%package javadoc
Andrew Overholt f2b6b10
Summary:        Javadoc for %{name}
Andrew Overholt 51b12a3
Group:          Documentation
5cbb2a5
Requires:       jpackage-utils
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
%description javadoc
5cbb2a5
API documentation for %{name}.
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
%prep
5cbb2a5
%setup -q -n %{name}-%{version}
Andrew Overholt f2b6b10
for j in $(find . -name "*.jar" | grep -v /test-data/ | grep -v /test-jars/); do
Andrew Overholt 51b12a3
  mv $j $j.no
Andrew Overholt f2b6b10
done
Andrew Overholt f2b6b10
cp %{SOURCE1} build.xml
Andrew Overholt f2b6b10
cp %{SOURCE3} settings.xml
5cbb2a5
5cbb2a5
mkdir -p lib
Andrew Overholt f2b6b10
ln -sf $(build-classpath xml-commons-jaxp-1.3-apis) lib/xml-apis-1.3.02.jar
Andrew Overholt f2b6b10
ln -sf $(build-classpath ant) lib/ant-1.6.5.jar
Andrew Overholt f2b6b10
ln -sf $(build-classpath commons-logging) lib/commons-logging-1.0.3.jar
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
%build
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
Andrew Overholt f2b6b10
mkdir -p $MAVEN_REPO_LOCAL
Andrew Overholt f2b6b10
5cbb2a5
# tests skipped because of old commons-cli package these fail
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
%if %{with_maven}
Andrew Overholt f2b6b10
mvn-jpp \
Andrew Overholt 51b12a3
  -e \
5cbb2a5
  -Dmaven.test.skip=true \
Andrew Overholt 51b12a3
  -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
5cbb2a5
  -Dmaven2.jpp.depmap.file=%{SOURCE5} \
Andrew Overholt 51b12a3
  install javadoc:javadoc
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
%else
Andrew Overholt f2b6b10
export CLASSPATH=
Andrew Overholt f2b6b10
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
ant -Dbuild.sysclasspath=only jar javadoc
Andrew Overholt f2b6b10
%endif
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
%install
Andrew Overholt f2b6b10
rm -rf $RPM_BUILD_ROOT
Andrew Overholt f2b6b10
# jars
5cbb2a5
install -Dpm 644 target/%{name}-%{version}.jar \
Andrew Overholt f2b6b10
  $RPM_BUILD_ROOT%{_javadir}/plexus/%{subname}-%{version}.jar
5cbb2a5
%add_to_maven_depmap org.codehaus.plexus %{name} %{version} JPP/%{parent} %{subname}
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
(cd $RPM_BUILD_ROOT%{_javadir}/%{parent} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
# pom
5cbb2a5
install -Dpm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{parent}-%{subname}.pom
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
# javadoc
Andrew Overholt f2b6b10
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
Andrew Overholt f2b6b10
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
Andrew Overholt 51b12a3
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
%clean
Andrew Overholt f2b6b10
rm -rf $RPM_BUILD_ROOT
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
%post
Andrew Overholt f2b6b10
%update_maven_depmap
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
%postun
Andrew Overholt f2b6b10
%update_maven_depmap
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
%files
Andrew Overholt f2b6b10
%defattr(-,root,root,-)
5cbb2a5
%{_javadir}/%{parent}/*
5cbb2a5
%{_mavenpomdir}/*
5cbb2a5
%{_mavendepmapfragdir}/*
Andrew Overholt 51b12a3
%doc LICENSE.txt
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
%files javadoc
Andrew Overholt f2b6b10
%defattr(-,root,root,-)
Andrew Overholt f2b6b10
%doc %{_javadocdir}/*
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
%changelog
c5f7fd7
* Tue Dec 21 2010 Alexander Kurtakov <akurtako@redhat.com> 2.2.3-2
c5f7fd7
- Fix FTBFS.
c5f7fd7
5cbb2a5
* Tue Jul 13 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.2.3-1
5cbb2a5
- Version bump
5cbb2a5
- Fix few small packaging guidelines violations
5cbb2a5
Andrew Overholt 2c83735
* Thu Aug 20 2009 Andrew Overholt <overholt@redhat.com> 0:1.2-0.a9.8
Andrew Overholt 2c83735
- Bump release.
Andrew Overholt 2c83735
Andrew Overholt 51b12a3
* Wed Aug 19 2009 Andrew Overholt <overholt@redhat.com> 0:1.2-0.a9.7
Andrew Overholt 51b12a3
- Document sources and patches
Andrew Overholt 51b12a3
Andrew Overholt 51b12a3
* Wed Aug 19 2009 Andrew Overholt <overholt@redhat.com> 0:1.2-0.a9.6
Andrew Overholt 51b12a3
- Update tarball-building instructions
Andrew Overholt 51b12a3
- Remove gcj support
Andrew Overholt 51b12a3
- Remove unnecessary post requirements
Andrew Overholt 51b12a3
Andrew Overholt f2b6b10
* Thu May 14 2009 Fernando Nasser <fnasser@redhat.com> 0:1.2-0.a9.6
Andrew Overholt f2b6b10
- Fix license specification
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
* Tue Apr 28 2009 Yong Yang <yyang@redhat.com> 0:1.2-0.a9.5
Andrew Overholt f2b6b10
- Add BRs maven2-plugin-surfire*, maven-doxia*
Andrew Overholt f2b6b10
- Rebuild with maven2-2.0.8 built in non-bootstrap mode
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
* Mon Mar 16 2009 Yong Yang <yyang@redhat.com> 0:1.2-0.a9.4
Andrew Overholt f2b6b10
- rebuild with new maven2 2.0.8 built in bootstrap mode
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
* Tue Jan 13 2009 Yong Yang <yyang@redhat.com> 0:1.2-0.a9.3jpp.1
Andrew Overholt 51b12a3
- re-build with maven
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
* Tue Jan 06 2009 Yong Yang <yyang@redhat.com> 0:1.2-0.a9.2jpp.1
Andrew Overholt f2b6b10
- Imported into devel from dbhole's maven 2.0.8 packages
Andrew Overholt f2b6b10
Andrew Overholt f2b6b10
* Wed Jan 30 2008 Deepak Bhole <dbhole@redhat.com> 0:1.2-0.a9.1jpp.1
Andrew Overholt f2b6b10
- Initial build -- merged from JPackage