acd2e2f
# Copyright (c) 2000-2005, JPackage Project
acd2e2f
# All rights reserved.
acd2e2f
#
acd2e2f
# Redistribution and use in source and binary forms, with or without
acd2e2f
# modification, are permitted provided that the following conditions
acd2e2f
# are met:
acd2e2f
#
acd2e2f
# 1. Redistributions of source code must retain the above copyright
acd2e2f
#    notice, this list of conditions and the following disclaimer.
acd2e2f
# 2. Redistributions in binary form must reproduce the above copyright
acd2e2f
#    notice, this list of conditions and the following disclaimer in the
acd2e2f
#    documentation and/or other materials provided with the
acd2e2f
#    distribution.
acd2e2f
# 3. Neither the name of the JPackage Project nor the names of its
acd2e2f
#    contributors may be used to endorse or promote products derived
acd2e2f
#    from this software without specific prior written permission.
acd2e2f
#
acd2e2f
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
acd2e2f
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
acd2e2f
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
acd2e2f
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
acd2e2f
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
acd2e2f
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
acd2e2f
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
acd2e2f
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
acd2e2f
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
acd2e2f
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
acd2e2f
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
acd2e2f
#
acd2e2f
acd2e2f
Name:           maven-plugin-tools
acd2e2f
Version:        2.1
acd2e2f
Release:        5%{?dist}
acd2e2f
Epoch:          0
acd2e2f
Summary:        Maven Plugin Tools
acd2e2f
License:        ASL 2.0
acd2e2f
Group:          Development/Libraries
acd2e2f
URL:            http://maven.apache.org/plugin-tools/
acd2e2f
Source0:        %{name}-%{version}-src.tar.gz
acd2e2f
# svn export https://svn.apache.org/repos/asf/maven/shared/tags/maven-plugin-tools-2.1
acd2e2f
# tar czf maven-plugin-tools-2.1-src.tar.gz maven-plugin-tools-2.1
acd2e2f
acd2e2f
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
acd2e2f
acd2e2f
BuildArch:      noarch
acd2e2f
acd2e2f
BuildRequires:    jpackage-utils >= 0:1.7.2
acd2e2f
BuildRequires:    maven2 >= 2.0.4-9
acd2e2f
BuildRequires:    maven2-plugin-compiler
acd2e2f
BuildRequires:    maven2-plugin-install
acd2e2f
BuildRequires:    maven2-plugin-jar
acd2e2f
BuildRequires:    maven2-plugin-javadoc
acd2e2f
BuildRequires:    maven2-plugin-resources
acd2e2f
BuildRequires:    maven2-plugin-surefire = 2.3
acd2e2f
BuildRequires:    maven-surefire-provider-junit = 2.3
acd2e2f
BuildRequires:    maven2-common-poms >= 1.0-2
acd2e2f
BuildRequires:    maven-doxia
acd2e2f
BuildRequires:    classworlds
acd2e2f
BuildRequires:    plexus-container-default
acd2e2f
BuildRequires:    plexus-utils >= 1.4.5
acd2e2f
BuildRequires:    java-devel
acd2e2f
acd2e2f
BuildRequires:  tomcat5
acd2e2f
BuildRequires:  tomcat5-servlet-2.4-api
acd2e2f
acd2e2f
Requires(post):    jpackage-utils >= 0:1.7.2
acd2e2f
Requires(postun):  jpackage-utils >= 0:1.7.2
acd2e2f
acd2e2f
%description
acd2e2f
The Maven Plugin Tools contains the necessary tools to play with Maven Plugins.
acd2e2f
acd2e2f
%package javadoc
acd2e2f
Summary:        Javadoc for %{name}
acd2e2f
Group:          Documentation
acd2e2f
acd2e2f
%description javadoc
acd2e2f
Java API documentation for %{name}.
acd2e2f
acd2e2f
%prep
acd2e2f
%setup -q -n %{name}-%{version}
acd2e2f
acd2e2f
%build
acd2e2f
acd2e2f
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
acd2e2f
mkdir -p $MAVEN_REPO_LOCAL
acd2e2f
acd2e2f
mvn-jpp \
acd2e2f
    -e \
acd2e2f
    -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
acd2e2f
    install
acd2e2f
acd2e2f
# Manual iteration should not be needed, but there is a bug in the javadoc
acd2e2f
# plugin which makes this necessary. See:
acd2e2f
# http://jira.codehaus.org/browse/MJAVADOC-157
acd2e2f
for dir in %{name}-*; do
acd2e2f
    pushd $dir >& /dev/null
acd2e2f
        mvn-jpp \
acd2e2f
            -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
acd2e2f
            javadoc:javadoc
acd2e2f
    popd >& /dev/null
acd2e2f
done
acd2e2f
acd2e2f
%install
acd2e2f
rm -rf $RPM_BUILD_ROOT
acd2e2f
# jars
acd2e2f
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
acd2e2f
acd2e2f
install -pm 644 maven-plugin-tools-ant/target/maven-plugin-tools-ant-%{version}.jar \
acd2e2f
                $RPM_BUILD_ROOT%{_javadir}/maven-plugin-tools/ant-%{version}.jar
acd2e2f
install -pm 644 maven-plugin-tools-api/target/maven-plugin-tools-api-%{version}.jar \
acd2e2f
                $RPM_BUILD_ROOT%{_javadir}/maven-plugin-tools/api-%{version}.jar
acd2e2f
install -pm 644 maven-plugin-tools-beanshell/target/maven-plugin-tools-beanshell-%{version}.jar \
acd2e2f
                $RPM_BUILD_ROOT%{_javadir}/maven-plugin-tools/beanshell-%{version}.jar
acd2e2f
install -pm 644 maven-plugin-tools-java/target/maven-plugin-tools-java-%{version}.jar \
acd2e2f
                $RPM_BUILD_ROOT%{_javadir}/maven-plugin-tools/java-%{version}.jar
acd2e2f
install -pm 644 maven-plugin-tools-model/target/maven-plugin-tools-model-%{version}.jar \
acd2e2f
                $RPM_BUILD_ROOT%{_javadir}/maven-plugin-tools/model-%{version}.jar
acd2e2f
acd2e2f
(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}*; \
acd2e2f
  do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
acd2e2f
acd2e2f
# pom
acd2e2f
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
acd2e2f
acd2e2f
install -pm 644 pom.xml \
acd2e2f
                $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-%{name}.pom
acd2e2f
%add_to_maven_depmap org.apache.maven %{name} %{version} JPP/%{name} %{name}
acd2e2f
acd2e2f
install -pm 644 maven-plugin-tools-ant/pom.xml \
acd2e2f
                $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-ant.pom
acd2e2f
%add_to_maven_depmap org.apache.maven %{name}-ant %{version} JPP/%{name} ant
acd2e2f
acd2e2f
install -pm 644 maven-plugin-tools-api/pom.xml \
acd2e2f
                $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-api.pom
acd2e2f
%add_to_maven_depmap org.apache.maven %{name}-api %{version} JPP/%{name} api
acd2e2f
acd2e2f
install -pm 644 maven-plugin-tools-beanshell/pom.xml \
acd2e2f
                $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-beanshell.pom
acd2e2f
%add_to_maven_depmap org.apache.maven %{name}-beanshell %{version} JPP/%{name} beanshell
acd2e2f
acd2e2f
install -pm 644 maven-plugin-tools-java/pom.xml \
acd2e2f
                $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-java.pom
acd2e2f
%add_to_maven_depmap org.apache.maven %{name}-java %{version} JPP/%{name} java
acd2e2f
acd2e2f
install -pm 644 maven-plugin-tools-model/pom.xml \
acd2e2f
                $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-model.pom
acd2e2f
%add_to_maven_depmap org.apache.maven %{name}-model %{version} JPP/%{name} model
acd2e2f
acd2e2f
# javadoc
acd2e2f
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
acd2e2f
acd2e2f
for dir in %{name}-*; do
acd2e2f
    install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/$dir
acd2e2f
    cp -pr $dir/target/site/apidocs/* \
acd2e2f
        $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/$dir/
acd2e2f
done
acd2e2f
acd2e2f
ln -s %{name}-%{version} \
acd2e2f
     $RPM_BUILD_ROOT%{_javadocdir}/%{name}
acd2e2f
acd2e2f
%clean
acd2e2f
rm -rf $RPM_BUILD_ROOT
acd2e2f
acd2e2f
%post
acd2e2f
%update_maven_depmap
acd2e2f
acd2e2f
%postun
acd2e2f
%update_maven_depmap
acd2e2f
acd2e2f
%files
acd2e2f
%defattr(-,root,root,-)
acd2e2f
%{_javadir}/%{name}
acd2e2f
%{_datadir}/maven2
acd2e2f
%{_mavendepmapfragdir}
acd2e2f
acd2e2f
%files javadoc
acd2e2f
%defattr(-,root,root,-)
acd2e2f
%doc %{_javadocdir}/*
acd2e2f
acd2e2f
%changelog
acd2e2f
* Mon Aug 31 2009 Alexander Kurtakov <akurtako@redhat.com> 0:2.1-5
acd2e2f
- Set minimum version for plexus-utils BR.
acd2e2f
- BR java-devel.
acd2e2f
- Fix javadoc subpackage description.
acd2e2f
acd2e2f
* Mon Aug 31 2009 Alexander Kurtakov <akurtako@redhat.com> 0:2.1-4
acd2e2f
- Adapt for Fedora.
acd2e2f
acd2e2f
* Wed May 20 2009 Fernando Nasser <fnasser@redhat.com> - 0:2.1-3
acd2e2f
- Fix license
acd2e2f
- Fix URL
acd2e2f
acd2e2f
* Mon Apr 27 2009 Yong Yang <yyang@redhat.com> - 0:2.1-2
acd2e2f
- Add BRs for maven-doxia*
acd2e2f
- Rebuild with maven2-2.0.8 built in non-bootstrap mode
acd2e2f
acd2e2f
* Mon Mar 09 2009 Yong Yang <yyang@redhat.com> - 0:2.1-1
acd2e2f
- Import from dbhole's maven2 2.0.8 packages
acd2e2f
acd2e2f
* Mon Apr 07 2008 Deepak Bhole <dbhole@redhat.com> - 0:2.1-0jpp.1
acd2e2f
- Initial build