[apache-commons-discovery/f16] add maven pom
Stanislav Ochotnicky
sochotni at fedoraproject.org
Thu May 17 13:23:59 UTC 2012
commit def8ff570a4e2b24b9fbbf371cbb7c93e44447a1
Author: gil <puntogil at libero.it>
Date: Thu May 17 09:07:25 2012 +0200
add maven pom
apache-commons-discovery-0.4-pom.patch | 17 +++
apache-commons-discovery.spec | 48 ++++++----
commons-discovery-0.4.pom | 168 ++++++++++++++++++++++++++++++++
3 files changed, 213 insertions(+), 20 deletions(-)
---
diff --git a/apache-commons-discovery-0.4-pom.patch b/apache-commons-discovery-0.4-pom.patch
new file mode 100644
index 0000000..3e64049
--- /dev/null
+++ b/apache-commons-discovery-0.4-pom.patch
@@ -0,0 +1,17 @@
+--- pom.xml 2006-12-03 07:27:17.000000000 +0100
++++ pom.xml-gil 2012-05-17 08:53:48.291516910 +0200
+@@ -129,14 +129,6 @@
+ </includes>
+ </configuration>
+ </plugin>
+- <plugin>
+- <artifactId>maven-xdoc-plugin</artifactId>
+- <version>1.9.2</version>
+- <configuration>
+- <comment><strong>Site Only</strong> - v1.9.2 (minimum)
+- required for building the Site documentation.</comment>
+- </configuration>
+- </plugin>
+ </plugins>
+ </build>
+ <dependencies>
diff --git a/apache-commons-discovery.spec b/apache-commons-discovery.spec
index 688be77..5cc00d1 100644
--- a/apache-commons-discovery.spec
+++ b/apache-commons-discovery.spec
@@ -4,24 +4,25 @@
Name: apache-%{short_name}
Version: 0.4
-Release: 6%{?dist}
+Release: 7%{?dist}
Epoch: 2
Summary: Apache Commons Discovery
License: ASL 2.0
Group: Development/Libraries
URL: http://commons.apache.org/%{base_name}
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
+Source1: http://repo1.maven.org/maven2/%{short_name}/%{short_name}/%{version}/%{short_name}-%{version}.pom
Patch0: %{name}-addosgimanifest.patch
+# removed maven-xdoc-plugin
+Patch1: %{name}-%{version}-pom.patch
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: ant
-BuildRequires: ant-nodeps
BuildRequires: junit >= 0:3.7
BuildRequires: apache-commons-logging >= 1.1.1
Requires: apache-commons-logging >= 1.1.1
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# This should go away with F-17
Provides: jakarta-%{short_name} = %{epoch}:%{version}-%{release}
@@ -48,6 +49,8 @@ Obsoletes: jakarta-%{short_name}-javadoc <= 1:0.4
%prep
%setup -q -n %{short_name}-%{version}-src
%patch0
+cp -p %{SOURCE1} pom.xml
+%patch1
%build
ant \
@@ -56,40 +59,45 @@ ant \
test.discovery dist
%install
-rm -rf $RPM_BUILD_ROOT
# jar
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
-install -p -m 644 dist/%{short_name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
+install -p -m 644 dist/%{short_name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
-for jar in *-%{version}.jar; do
- ln -sf ${jar} `echo $jar| sed "s|apache-||g"`
- ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
- ln -sf ${jar} `echo $jar| sed "s|apache-\(.*\)-%{version}|\1|g"`
-done
+ ln -s %{name}.jar %{short_name}.jar
popd # come back from javadir
-# javadoc
-install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-cp -pr dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir}
+install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{short_name}.pom
+%add_maven_depmap JPP-%{short_name}.pom %{short_name}.jar
-%clean
-rm -rf $RPM_BUILD_ROOT
+# javadoc
+install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+cp -pr dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%files
-%defattr(-,root,root,-)
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
-%{_javadir}/*
+%{_javadir}/%{name}.jar
+%{_javadir}/%{short_name}.jar
+%{_mavenpomdir}/JPP-%{short_name}.pom
+%{_mavendepmapfragdir}/%{name}
+
+%pre javadoc
+[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
+rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
%files javadoc
-%defattr(-,root,root,-)
-%doc %{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name}
%doc LICENSE.txt NOTICE.txt
%changelog
+* Thu May 17 2012 gil cattaneo <puntogil at libero.it> - 2:0.4-7
+- add maven pom
+- adapt to current guideline
+- add %%pre javadoc script
+- remove BR ant-nodeps
+
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2:0.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
diff --git a/commons-discovery-0.4.pom b/commons-discovery-0.4.pom
new file mode 100644
index 0000000..d7bfa01
--- /dev/null
+++ b/commons-discovery-0.4.pom
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>commons-discovery</groupId>
+ <artifactId>commons-discovery</artifactId>
+ <name>Discovery</name>
+ <version>0.4</version>
+ <description>Commons Discovery</description>
+ <url>http://jakarta.apache.org/commons/${pom.artifactId.substring(8)}/</url>
+ <issueManagement>
+ <url>http://issues.apache.org/jira/</url>
+ </issueManagement>
+ <ciManagement>
+ <notifiers>
+ <notifier>
+ <configuration>
+ <address>commons-dev at jakarta.apache.org</address>
+ </configuration>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+ <inceptionYear>2002</inceptionYear>
+ <mailingLists>
+ <mailingList>
+ <name>Commons Dev List</name>
+ <subscribe>commons-dev-subscribe at jakarta.apache.org</subscribe>
+ <unsubscribe>commons-dev-unsubscribe at jakarta.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/jakarta-commons-dev/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Commons User List</name>
+ <subscribe>commons-user-subscribe at jakarta.apache.org</subscribe>
+ <unsubscribe>commons-user-unsubscribe at jakarta.apache.org</unsubscribe>
+ <archive>http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/</archive>
+ </mailingList>
+ </mailingLists>
+ <developers>
+ <developer>
+ <id>rsitze</id>
+ <name>Richard Sitze</name>
+ <email></email>
+ <organization></organization>
+ </developer>
+ <developer>
+ <id>craigmcc</id>
+ <name>Craig R. McClanahan</name>
+ <email></email>
+ <organization></organization>
+ </developer>
+ <developer>
+ <id>costin</id>
+ <name>Costin Manolache</name>
+ <email></email>
+ <organization></organization>
+ </developer>
+ <developer>
+ <id>jstrachan</id>
+ <name>James Strachan</name>
+ <email>jstrachan at apache.org</email>
+ <organization>SpiritSoft, Inc.</organization>
+ </developer>
+ <developer>
+ <id>matth</id>
+ <name>Matthew Hawthorne</name>
+ <email>matth at apache.org</email>
+ </developer>
+ <developer>
+ <id>dims</id>
+ <name>Davanum Srinivas</name>
+ <email>dims at apache.org</email>
+ </developer>
+ <developer>
+ <id>rwinston</id>
+ <name>Rory Winston</name>
+ <email>rwinston at eircom.net</email>
+ </developer>
+ <developer>
+ <id>rdonkin</id>
+ <name>Robert Burrell Donkin</name>
+ <email>rdonkin at apache.org</email>
+ </developer>
+ </developers>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>/LICENSE.txt</url>
+ </license>
+ </licenses>
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk</connection>
+ <url>http://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk</url>
+ </scm>
+ <organization>
+ <name>The Apache Software Foundation</name>
+ <url>http://jakarta.apache.org</url>
+ </organization>
+ <build>
+ <sourceDirectory>src/java</sourceDirectory>
+ <testSourceDirectory>src/test</testSourceDirectory>
+ <resources>
+ <resource>
+ <targetPath>META-INF</targetPath>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>NOTICE.txt</include>
+ </includes>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>${basedir}/src</directory>
+ <includes>
+ <include>**/testResource</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <directory>${basedir}/src/test</directory>
+ <includes>
+ <include>**/*.properties</include>
+ <include>META-INF/**</include>
+ </includes>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/TestAll.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-xdoc-plugin</artifactId>
+ <version>1.9.2</version>
+ <configuration>
+ <comment><strong>Site Only</strong> - v1.9.2 (minimum)
+ required for building the Site documentation.</comment>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.7</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <distributionManagement>
+ <repository>
+ <id>default</id>
+ <name>Default Repository</name>
+ <url>file:///www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId.substring(8)}/</url>
+ </repository>
+ <site>
+ <id>default</id>
+ <name>Default Site</name>
+ <url>scp://people.apache.org//www/jakarta.apache.org/commons/${pom.artifactId.substring(8)}/</url>
+ </site>
+ <status>converted</status>
+ </distributionManagement>
+</project>
\ No newline at end of file
More information about the scm-commits
mailing list