migration to plexus-containers-component-metadata
This commit is contained in:
parent
e64e88c199
commit
b91cec5736
18
plexus-i18n-migration-to-component-metadata.patch
Normal file
18
plexus-i18n-migration-to-component-metadata.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff -Naur plexus-i18n-1.0-beta-10.orig/pom.xml plexus-i18n-1.0-beta-10/pom.xml
|
||||
--- plexus-i18n-1.0-beta-10.orig/pom.xml 2008-08-15 21:11:54.000000000 +0200
|
||||
+++ plexus-i18n-1.0-beta-10/pom.xml 2011-07-28 15:43:00.813980336 +0200
|
||||
@@ -26,12 +26,11 @@
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
- <artifactId>plexus-maven-plugin</artifactId>
|
||||
- <version>1.3.5</version>
|
||||
+ <artifactId>plexus-component-metadata</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
- <goal>descriptor</goal>
|
||||
+ <goal>generate-metadata</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
127
plexus-i18n.spec
127
plexus-i18n.spec
@ -28,14 +28,12 @@
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
%define with_maven 1
|
||||
%define parent plexus
|
||||
%define subname i18n
|
||||
|
||||
Name: plexus-i18n
|
||||
Version: 1.0
|
||||
Release: 0.b10.2%{?dist}.1
|
||||
Epoch: 0
|
||||
Release: 0.b10.2%{?dist}.2
|
||||
Summary: Plexus I18N Component
|
||||
License: ASL 2.0
|
||||
Group: Development/Java
|
||||
@ -43,35 +41,29 @@ URL: http://plexus.codehaus.org/plexus-components/plexus-i18n
|
||||
Source0: plexus-i18n-1.0-beta-10-src.tar.bz2
|
||||
# svn export http://svn.codehaus.org/plexus/plexus-components/tags/plexus-i18n-1.0-beta-10/
|
||||
# tar cjf plexus-i18n-1.0-beta-10-src.tar.bz2 plexus-i18n-1.0-beta-10/
|
||||
Source1: plexus-i18n-1.0-build.xml
|
||||
Source5: plexus-i18n-1.0-plexus-components.xml
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Patch0: %{name}-migration-to-component-metadata.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: jpackage-utils >= 0:1.7.2
|
||||
BuildRequires: ant >= 0:1.6
|
||||
BuildRequires: java-devel >= 1.6.0
|
||||
%if %{with_maven}
|
||||
BuildRequires: maven2 >= 2.0.4-10jpp
|
||||
BuildRequires: maven2-plugin-compiler
|
||||
BuildRequires: maven2-plugin-install
|
||||
BuildRequires: maven2-plugin-jar
|
||||
BuildRequires: maven2-plugin-javadoc
|
||||
BuildRequires: maven2-plugin-resources
|
||||
BuildRequires: maven
|
||||
BuildRequires: maven-compiler-plugin
|
||||
BuildRequires: maven-install-plugin
|
||||
BuildRequires: maven-jar-plugin
|
||||
BuildRequires: maven-javadoc-plugin
|
||||
BuildRequires: maven-resources-plugin
|
||||
BuildRequires: maven-surefire-maven-plugin
|
||||
BuildRequires: maven-surefire-provider-junit
|
||||
BuildRequires: maven-doxia-sitetools
|
||||
BuildRequires: plexus-maven-plugin
|
||||
%endif
|
||||
BuildRequires: plexus-containers-component-metadata
|
||||
BuildRequires: classworlds >= 0:1.1
|
||||
BuildRequires: plexus-container-default
|
||||
BuildRequires: plexus-utils
|
||||
BuildRequires: plexus-container-default
|
||||
BuildRequires: plexus-utils
|
||||
Requires: classworlds >= 0:1.1
|
||||
Requires: plexus-container-default
|
||||
Requires: plexus-utils
|
||||
Requires(post): jpackage-utils >= 0:1.7.2
|
||||
Requires(postun): jpackage-utils >= 0:1.7.2
|
||||
Requires: plexus-container-default
|
||||
Requires: plexus-utils
|
||||
|
||||
%description
|
||||
The Plexus project seeks to create end-to-end developer tools for
|
||||
@ -92,96 +84,43 @@ Javadoc for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n plexus-i18n-1.0-beta-10
|
||||
for j in $(find . -name "*.jar"); do
|
||||
mv $j $j.no
|
||||
done
|
||||
cp %{SOURCE1} build.xml
|
||||
mkdir -p src/main/resources/META-INF/plexus
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%if %{with_maven}
|
||||
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
||||
mkdir -p $MAVEN_REPO_LOCAL
|
||||
|
||||
mkdir external_repo
|
||||
ln -s %{_javadir} external_repo/JPP
|
||||
|
||||
mvn-jpp \
|
||||
-e \
|
||||
-Dmaven2.jpp.mode=true \
|
||||
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
||||
install javadoc:javadoc
|
||||
|
||||
%else
|
||||
|
||||
mkdir -p target/lib
|
||||
build-jar-repository -s -p target/lib \
|
||||
classworlds \
|
||||
plexus/container-default \
|
||||
plexus/utils \
|
||||
|
||||
ant jar javadoc
|
||||
|
||||
# inject pom and component descriptor into the jar (can be done via ant, but
|
||||
# since build.xml is autogenerated, it is best to do it here)
|
||||
mkdir -p META-INF/plexus META-INF/maven/org.codehaus.plexus/plexus-i18n/
|
||||
cp %{SOURCE5} META-INF/plexus/components.xml
|
||||
cp pom.xml META-INF/maven/org.codehaus.plexus/plexus-i18n/
|
||||
jar uvf target/%{name}-%{version}-beta-10.jar META-INF
|
||||
rm -rf META-INF
|
||||
|
||||
%endif
|
||||
mvn-rpmbuild -e install javadoc:aggregate
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
# jars
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/plexus
|
||||
install -pm 644 target/%{name}-%{version}-beta-10.jar \
|
||||
$RPM_BUILD_ROOT%{_javadir}/plexus/i18n-%{version}.jar
|
||||
%add_to_maven_depmap org.codehaus.plexus %{name} %{version} JPP/%{parent} %{subname}
|
||||
|
||||
(cd $RPM_BUILD_ROOT%{_javadir}/plexus && for jar in *-%{version}*; \
|
||||
do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
||||
install -Dpm 644 target/%{name}-%{version}-beta-10.jar \
|
||||
%{buildroot}/%{_javadir}/%{parent}/%{subname}.jar
|
||||
|
||||
# poms
|
||||
%if %{with_maven}
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
|
||||
install -pm 644 pom.xml \
|
||||
$RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{parent}-%{subname}.pom
|
||||
%endif
|
||||
install -Dpm 644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP.%{name}.pom
|
||||
%add_maven_depmap JPP.%{name}.pom %{parent}/%{subname}.jar
|
||||
|
||||
# javadoc
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
%if %{with_maven}
|
||||
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
%else
|
||||
cp -pr target/docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
%endif
|
||||
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
install -d -m 755 %{buildroot}/%{_javadocdir}/%{name}
|
||||
cp -pr target/site/apidocs/* %{buildroot}/%{_javadocdir}/%{name}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
%update_maven_depmap
|
||||
|
||||
%postun
|
||||
%update_maven_depmap
|
||||
%pre javadoc
|
||||
# workaround for rpm bug, can be removed in F-19
|
||||
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
|
||||
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_javadir}/%{parent}/*
|
||||
%if %{with_maven}
|
||||
%{_datadir}/maven2/poms/*
|
||||
%endif
|
||||
%{_mavendepmapfragdir}
|
||||
%{_javadir}/%{parent}/%{subname}.jar
|
||||
%{_mavenpomdir}/JPP.%{name}.pom
|
||||
%{_mavendepmapfragdir}/%{name}
|
||||
|
||||
%files javadoc
|
||||
%defattr(-,root,root,-)
|
||||
%doc %{_javadocdir}/%{name}-%{version}
|
||||
%doc %{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Thu Jul 28 2011 Jaromir Capik <jcapik@redhat.com> - 1.0-0.b10.2.2
|
||||
- Migration to maven3
|
||||
- Migration from plexus-maven-plugin to plexus-containers-component-metadata
|
||||
- Minor spec file changes according to the latest guidelines
|
||||
|
||||
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.0-0.b10.2.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user