Andrew Overholt e314446
# Copyright (c) 2000-2005, JPackage Project
Andrew Overholt e314446
# All rights reserved.
Andrew Overholt e314446
#
Andrew Overholt e314446
# Redistribution and use in source and binary forms, with or without
Andrew Overholt e314446
# modification, are permitted provided that the following conditions
Andrew Overholt e314446
# are met:
Andrew Overholt e314446
#
Andrew Overholt e314446
# 1. Redistributions of source code must retain the above copyright
Andrew Overholt e314446
#    notice, this list of conditions and the following disclaimer.
Andrew Overholt e314446
# 2. Redistributions in binary form must reproduce the above copyright
Andrew Overholt e314446
#    notice, this list of conditions and the following disclaimer in the
Andrew Overholt e314446
#    documentation and/or other materials provided with the
Andrew Overholt e314446
#    distribution.
Andrew Overholt e314446
# 3. Neither the name of the JPackage Project nor the names of its
Andrew Overholt e314446
#    contributors may be used to endorse or promote products derived
Andrew Overholt e314446
#    from this software without specific prior written permission.
Andrew Overholt e314446
#
Andrew Overholt e314446
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Andrew Overholt e314446
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Andrew Overholt e314446
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Andrew Overholt e314446
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Andrew Overholt e314446
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Andrew Overholt e314446
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Andrew Overholt e314446
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Andrew Overholt e314446
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Andrew Overholt e314446
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Andrew Overholt e314446
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Andrew Overholt e314446
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Andrew Overholt e314446
#
Andrew Overholt e314446
b634807
%global parent plexus
b634807
%global subname resources
b634807
%global namedversion 1.0-alpha-7
Andrew Overholt e314446
Andrew Overholt e314446
Name:           %{parent}-%{subname}
Andrew Overholt e314446
Version:        1.0
b634807
Release:        0.3.a7%{?dist}
Andrew Overholt e314446
Summary:        Plexus Resource Manager
Andrew Overholt e314446
License:        MIT
Andrew Overholt e314446
Group:          Development/Tools
Andrew Overholt e314446
URL:            http://plexus.codehaus.org/
b634807
# svn export http://svn.codehaus.org/plexus/plexus-components/tags/plexus-resources-1.0-alpha-7/
b634807
# tar caf plexus-resources-1.0-alpha-7-src.tar.xz plexus-resources-1.0-alpha-7
b634807
Source0:        %{name}-%{version}-alpha-7-src.tar.xz
Andrew Overholt e314446
Source3:        plexus-resources-settings.xml
Andrew Overholt e314446
Source4:        plexus-resources-1.0-jpp-depmap.xml
b634807
Patch0:         0001-Add-default-role-hint-to-DefaultResourceManager.patch
Andrew Overholt e314446
Requires:       classworlds >= 0:1.1
Andrew Overholt e314446
Requires:       plexus-container-default
Andrew Overholt e314446
Requires:       plexus-utils
Andrew Overholt e314446
Requires:       jpackage-utils >= 0:1.7.3
Andrew Overholt e314446
Requires(post): jpackage-utils >= 0:1.7.3
Andrew Overholt e314446
Requires(postun): jpackage-utils >= 0:1.7.3
Andrew Overholt e314446
BuildRequires:  jpackage-utils >= 0:1.7.3
Andrew Overholt e314446
BuildRequires:  java-devel >= 0:1.5.0
Andrew Overholt e314446
BuildRequires:  ant >= 0:1.6
Andrew Overholt e314446
BuildRequires:  maven2
b634807
BuildRequires:  maven-compiler-plugin
b634807
BuildRequires:  maven-install-plugin
b634807
BuildRequires:  maven-jar-plugin
b634807
BuildRequires:  maven-javadoc-plugin
b634807
BuildRequires:  maven-release-plugin
b634807
BuildRequires:  maven-resources-plugin
b634807
BuildRequires:  maven-surefire-maven-plugin
b634807
BuildRequires:  maven-surefire-provider-junit
Andrew Overholt e314446
BuildRequires:  maven-doxia
Andrew Overholt e314446
BuildRequires:  maven-doxia-sitetools
Andrew Overholt e314446
BuildRequires:  plexus-maven-plugin >= 1.3.5
Andrew Overholt e314446
BuildRequires:  plexus-container-default
Andrew Overholt e314446
BuildRequires:  plexus-utils
Andrew Overholt e314446
Andrew Overholt e314446
BuildArch:      noarch
Andrew Overholt e314446
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
Andrew Overholt e314446
Andrew Overholt e314446
%description
Andrew Overholt e314446
The Plexus project seeks to create end-to-end developer tools for
Andrew Overholt e314446
writing applications. At the core is the container, which can be
Andrew Overholt e314446
embedded or for a full scale application server. There are many
Andrew Overholt e314446
reusable components for hibernate, form processing, jndi, i18n,
Andrew Overholt e314446
velocity, etc. Plexus also includes an application server which
Andrew Overholt e314446
is like a J2EE application server, without all the baggage.
Andrew Overholt e314446
Andrew Overholt e314446
%package javadoc
Andrew Overholt e314446
Summary:        Javadoc for %{name}
Andrew Overholt e314446
Group:          Documentation
Andrew Overholt e314446
Andrew Overholt e314446
%description javadoc
Andrew Overholt e314446
API documentation for %{name}.
Andrew Overholt e314446
Andrew Overholt e314446
%prep
b634807
%setup -q -n %{name}-%{namedversion}
Andrew Overholt e314446
cp -p %{SOURCE3} settings.xml
b634807
%patch0 -p1
Andrew Overholt e314446
Andrew Overholt e314446
%build
Andrew Overholt e314446
sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml
Andrew Overholt e314446
sed -i -e "s|<url>__JAVADIR_PLACEHOLDER__</url>|<url>file://`pwd`/external_repo</url>|g" settings.xml
Andrew Overholt e314446
sed -i -e "s|<url>__MAVENREPO_DIR_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml
Andrew Overholt e314446
sed -i -e "s|<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/maven2/plugins</url>|g" settings.xml
Andrew Overholt e314446
sed -i -e "s|<url>__ECLIPSEDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/eclipse/plugins</url>|g" settings.xml
Andrew Overholt e314446
Andrew Overholt e314446
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
Andrew Overholt e314446
mkdir -p $MAVEN_REPO_LOCAL
Andrew Overholt e314446
Andrew Overholt e314446
mkdir external_repo
Andrew Overholt e314446
ln -s %{_javadir} external_repo/JPP
Andrew Overholt e314446
Andrew Overholt e314446
mvn-jpp \
Andrew Overholt e314446
        -e \
Andrew Overholt e314446
        -s $(pwd)/settings.xml \
Andrew Overholt e314446
        -Dmaven2.jpp.mode=true \
Andrew Overholt e314446
        -Dmaven2.jpp.depmap.file=%{SOURCE4} \
Andrew Overholt e314446
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
Andrew Overholt e314446
        install javadoc:javadoc
Andrew Overholt e314446
Andrew Overholt e314446
%install
Andrew Overholt e314446
rm -rf $RPM_BUILD_ROOT
Andrew Overholt e314446
# jars
Andrew Overholt e314446
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/plexus
Andrew Overholt e314446
install -pm 644 target/%{name}-%{namedversion}.jar \
Andrew Overholt e314446
  $RPM_BUILD_ROOT%{_javadir}/plexus/%{subname}-%{version}.jar
Andrew Overholt e314446
%add_to_maven_depmap org.codehaus.plexus %{name} %{namedversion} JPP/%{parent} %{subname}
Andrew Overholt e314446
Andrew Overholt e314446
(cd $RPM_BUILD_ROOT%{_javadir}/plexus && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
Andrew Overholt e314446
Andrew Overholt e314446
# poms
Andrew Overholt e314446
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
Andrew Overholt e314446
install -pm 644 pom.xml \
Andrew Overholt e314446
    $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{parent}-%{subname}.pom
Andrew Overholt e314446
Andrew Overholt e314446
# javadoc
Andrew Overholt e314446
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
Andrew Overholt e314446
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
Andrew Overholt e314446
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
Andrew Overholt e314446
Andrew Overholt e314446
%clean
Andrew Overholt e314446
rm -rf $RPM_BUILD_ROOT
Andrew Overholt e314446
Andrew Overholt e314446
%post
Andrew Overholt e314446
%update_maven_depmap
Andrew Overholt e314446
Andrew Overholt e314446
%postun
Andrew Overholt e314446
%update_maven_depmap
Andrew Overholt e314446
Andrew Overholt e314446
%files
Andrew Overholt e314446
%defattr(-,root,root,-)
Andrew Overholt e314446
%{_javadir}/%{parent}/*
b634807
%{_mavenpomdir}/*
Andrew Overholt e314446
%{_mavendepmapfragdir}/*
Andrew Overholt e314446
Andrew Overholt e314446
%files javadoc
Andrew Overholt e314446
%defattr(-,root,root,-)
Andrew Overholt e314446
%{_javadocdir}/%{name}-%{version}
Andrew Overholt e314446
%{_javadocdir}/%{name}
Andrew Overholt e314446
Andrew Overholt e314446
%changelog
b634807
* Wed Aug 25 2010 Alexander Kurtakov <akurtako@redhat.com> 1.0-0.3.a7
b634807
- Update to alpha 7.
b634807
- Apply patch to fix rhbz#621714.
b634807
- Use global instead of define.
b634807
- Drop ant build - broken after update.
b634807
Andrew Overholt e314446
* Wed Aug 26 2009 Andrew Overholt <overholt@redhat.com> 1.0-0.2.a4
Andrew Overholt e314446
- Fix release and defattr
Andrew Overholt e314446
- Make -javadoc description better
Andrew Overholt e314446
Andrew Overholt e314446
* Tue Aug 25 2009 Andrew Overholt <overholt@redhat.com> 1.0-0.1.a4.5
Andrew Overholt e314446
- Remove gcj support
Andrew Overholt e314446
- Fix license tag
Andrew Overholt e314446
- Improve source build instructions
Andrew Overholt e314446
- Remove "excalibur-" prefix from two BRs
Andrew Overholt e314446
Andrew Overholt e314446
* Thu Mar 20 2009 Yong Yang <yyang@redhat.com> 0:1.0-0.1.a4.4
Andrew Overholt e314446
- Build with maven2-2.0.8 built in non-bootstrap mode
Andrew Overholt e314446
- Add some missing BRs
Andrew Overholt e314446
Andrew Overholt e314446
* Thu Mar 20 2009 Yong Yang <yyang@redhat.com> 0:1.0-0.1.a10.3
Andrew Overholt e314446
- Build with maven2 2.0.8
Andrew Overholt e314446
Andrew Overholt e314446
* Tue Jan 20 2009 Yong Yang <yyang@redhat.com> 0:1.0-0.1.a4.2jpp.1
Andrew Overholt e314446
- Import from dbhole's maven 2.0.8 packages
Andrew Overholt e314446
- Merge with JPP-5
Andrew Overholt e314446
Andrew Overholt e314446
* Fri Sep 21 2007 Deepak Bhole <dbhole@redhat.com> 0:1.0-0.1.a4.2jpp.3
Andrew Overholt e314446
- ExcludeArch ppc64
Andrew Overholt e314446
Andrew Overholt e314446
* Tue Mar 20 2007 Deepak Bhole <dbhole@redhat.com> 0:1.0-0.1.a4.2jpp.2
Andrew Overholt e314446
- Enable gcj
Andrew Overholt e314446
Andrew Overholt e314446
* Tue Feb 20 2007 Tania Bento <tbento@redhat.com> 0:1.0-0.1.a4.2jpp.1
Andrew Overholt e314446
- Fixed %%Release.
Andrew Overholt e314446
- Fixed %%BuildRoot.
Andrew Overholt e314446
- Removed %%Vendor.
Andrew Overholt e314446
- Removed %%Distribution.
Andrew Overholt e314446
- Edited instructions on how to generate the source drops.
Andrew Overholt e314446
- Removed %%post and %%postun sections for javadoc.
Andrew Overholt e314446
- Added gcj support.
Andrew Overholt e314446
Andrew Overholt e314446
* Tue Oct 17 2006 Deepak Bhole <dbhole@redhat.com> 1.0-0.a4.2jpp
Andrew Overholt e314446
- Update for maven2 9jpp
Andrew Overholt e314446
Andrew Overholt e314446
* Mon Jun 12 2006 Deepak Bhole <dbhole@redhat.com> - 0:1.0-0.a4.1jpp
Andrew Overholt e314446
- Initial build