packages java-plexus-xmlrpc.spec
      Pages: < 1 >  DOWNLOAD      
Name:          java-plexus-xmlrpc
%define        api_version   1.0
%define        with_maven    0
Version:       1.0b4
Release:       2mamba
Summary:       Plexus XML-RPC Component
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://plexus.codehaus.org/
# svn export http://svn.codehaus.org/plexus/tags/plexus-xmlrpc-1.0-beta-4
# tar czf plexus-xmlrpc-1.0-beta-4-src-svn.tar.gz plexus-xmlrpc-1.0-beta-4
Source0:       plexus-xmlrpc-1.0-beta-4-src-svn.tar.gz
Source1:       maven2-2.2.0-settings.xml
Source2:       java-plexus-xmlrpc-1.0-beta-4-autogeneratefiles.tar.gz
Patch0:        java-plexus-xmlrpc-1.0b4-add-commons-codec-dep.patch
Patch1:        java-plexus-xmlrpc-1.0b4-xmlrpc-version-dep.patch
License:       Apache Software License 2.0
BuildRequires: apache-ant
%if %with_maven
BuildRequires: apache-maven2
BuildRequires: apache-maven2-ant-plugin
BuildRequires: apache-maven2-assembly-plugin
BuildRequires: apache-maven2-changes-plugin
BuildRequires: apache-maven2-compiler-plugin
BuildRequires: apache-maven2-deploy-plugin
BuildRequires: apache-maven2-eclipse-plugin
BuildRequires: apache-maven2-gpg-plugin
BuildRequires: apache-maven2-install-plugin
BuildRequires: apache-maven2-jar-plugin
BuildRequires: apache-maven2-javadoc-plugin
BuildRequires: apache-maven2-remote-resources-plugin
BuildRequires: apache-maven2-resources-plugin
BuildRequires: apache-maven2-source-plugin
BuildRequires: apache-tomcat5
%endif
BuildRequires: apache-xmlrpc2
BuildRequires: jakarta-commons-codec
BuildRequires: java-classworlds
BuildRequires: java-plexus-container-default
BuildRequires: java-plexus-utils
BuildRequires: jpackage-utils
Requires:      apache-xmlrpc2
Requires:      java-classworlds
Requires:      java-plexus-container-default
Requires:      java-plexus-utils
Requires:      jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
The Plexus project seeks to create end-to-end developer tools for
writing applications. At the core is the container, which can be
embedded or for a full scale application server. There are many
reusable components for hibernate, form processing, jndi, i18n,
velocity, etc. Plexus also includes an application server which
is like a J2EE application server, without all the baggage

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

%description javadoc
Plexus XML-RPC Component.

This package contains javadoc for %{name}

%prep

%setup -q -n plexus-xmlrpc-1.0-beta-4
%patch0 -p1
%patch1 -p1
chmod -R go=u-w *

for j in $(find . -name "*.jar"); do
	mv $j $j.no
done
%if %with_maven
  cp %{SOURCE1} settings.xml

  mkdir -p .m2/repository/JPP/maven2

  sed -i -e "s|<localRepository>__INTERNAL_REPO_PLACEHOLDER__</localRepository>|<localRepository>file://`pwd`/external_repo</localRepository>|g" settings.xml
  sed -i -e "s|<url>__EXTERNAL_REPO_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml
%else
  tar -xf %{SOURCE2}
%endif

%build
export JAVA_HOME=/usr/lib/jvm/jdk-sun
export MAVEN_REPO_LOCAL=$PWD/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL

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

  mvn-jpp \
    -e \
    -s $PWD/settings.xml \
    -Dmaven.test.failure.ignore=true \
    -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
    install:install-file -DgroupId=xmlrpc \
    -DartifactId=xmlrpc -Dversion=2.0.1 \
    -Dpackaging=jar -Dfile=$(build-classpath xmlrpc2)

  mvn-jpp \
    -e \
    -s $PWD/settings.xml \
    -Dmaven.test.failure.ignore=true \
    -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
    ant:ant install javadoc:javadoc
%else

  export CLASSPATH=""
  CLASSPATH=$CLASSPATH:$(build-classpath xmlrpc2 classworlds commons-codec)
  CLASSPATH=$CLASSPATH:$(build-classpath plexus/container-default plexus/utils)
  CLASSPATH=$CLASSPATH:$(build-classpath junit-3.8.2):target/classes:target/test-classes
  ant \
    -Duser.home=$PWD \
    -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
    -Dmaven.settings.offline=true \
    -Dmaven.settings.interactiveMode=false \
    jar javadoc

%endif

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}/plexus
install -pm 644 target/plexus-xmlrpc-%{api_version}-beta-4.jar \
	%{buildroot}%{_javadir}/plexus/xmlrpc-%{api_version}.jar
%add_to_maven_depmap org.codehaus.plexus plexus-xmlrpc 1.0-beta-4 JPP/plexus xmlrpc

(
  cd %{buildroot}%{_javadir}/plexus
  for jar in *-%{api_version}*; do
    ln -sf ${jar} `echo $jar| sed  "s|-%{api_version}||g"`
  done
)

mkdir -p %{buildroot}%{_datadir}/maven2/poms
install -pm 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP.plexus-xmlrpc.pom

mkdir -p %{buildroot}%{_javadocdir}/plexus-xmlrpc-%{version}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/plexus-xmlrpc-%{version}
ln -s plexus-xmlrpc-%{version} %{buildroot}%{_javadocdir}/plexus-xmlrpc

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root)
%{_javadir}/plexus/xmlrpc-%{api_version}.jar
%{_javadir}/plexus/xmlrpc.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc LICENSE.txt

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/plexus-xmlrpc-%{version}
%{_javadocdir}/plexus-xmlrpc

%changelog
* Sun Dec 19 2010 gil <puntogil@...> 1.0b4-2mamba
- rebuilt devel

* Sun Jun 28 2009 gil <puntogil@...> 1.0b4-1mamba
- package created by autospec