[apache-commons-vfs] Build with XMvn
by Michal Srb
commit d80d2d7e1725571d1b76c1ea694348ce2ab9d1ff
Author: Michal Srb <msrb(a)redhat.com>
Date: Fri Jun 28 07:54:39 2013 +0200
Build with XMvn
- Do not ignore test failures
- Fix BR
apache-commons-vfs.spec | 130 ++++++++++++----------------------------------
1 files changed, 34 insertions(+), 96 deletions(-)
---
diff --git a/apache-commons-vfs.spec b/apache-commons-vfs.spec
index 4d7bb6a..46dc550 100644
--- a/apache-commons-vfs.spec
+++ b/apache-commons-vfs.spec
@@ -2,9 +2,8 @@
%global short_name commons-%{base_name}
Name: apache-commons-vfs
Version: 2.0
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Commons Virtual File System
-Group: Development/Libraries
License: ASL 2.0
Url: http://commons.apache.org/%{base_name}/
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{ve...
@@ -17,48 +16,21 @@ Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_na
# remove old vfs stuff
Patch0: %{name}-%{version}-build.patch
-BuildRequires: java-devel
-BuildRequires: jpackage-utils
-BuildRequires: apache-commons-parent
-
-BuildRequires: maven-local
-BuildRequires: maven-antrun-plugin
-BuildRequires: maven-compiler-plugin
-BuildRequires: maven-install-plugin
-BuildRequires: maven-jar-plugin
-BuildRequires: maven-javadoc-plugin
-BuildRequires: maven-plugin-bundle
-BuildRequires: maven-resources-plugin
-BuildRequires: maven-site-plugin
-BuildRequires: maven-surefire-plugin
-BuildRequires: maven-surefire-provider-junit4
-
-BuildRequires: ant
-BuildRequires: apache-commons-collections
-BuildRequires: apache-commons-compress
-BuildRequires: apache-commons-logging
-BuildRequires: apache-commons-net
-BuildRequires: jakarta-commons-httpclient
-BuildRequires: javamail
-BuildRequires: jcifs
-BuildRequires: jdom
-BuildRequires: jsch
+BuildRequires: maven-local
+BuildRequires: mvn(com.jcraft:jsch)
+BuildRequires: mvn(commons-collections:commons-collections)
+BuildRequires: mvn(commons-httpclient:commons-httpclient)
+BuildRequires: mvn(commons-logging:commons-logging)
+BuildRequires: mvn(commons-net:commons-net)
+BuildRequires: mvn(org.apache.ant:ant)
+BuildRequires: mvn(org.apache.commons:commons-compress)
+BuildRequires: mvn(org.apache.commons:commons-parent)
+BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
+BuildRequires: mvn(org.jdom:jdom)
# test deps
-BuildRequires: junit4
-BuildRequires: slf4j
-
-Requires: apache-commons-collections
-Requires: apache-commons-compress
-Requires: apache-commons-logging
-Requires: apache-commons-net
-Requires: jakarta-commons-httpclient
-Requires: javamail
-Requires: jcifs
-Requires: jsch
-
-Requires: java
-Requires: jpackage-utils
+BuildRequires: mvn(junit:junit)
+
BuildArch: noarch
Provides: %{name}2 = %{version}-%{release}
@@ -83,29 +55,19 @@ Some of the features of Commons VFS are:
%package ant
Summary: Development files for Commons VFS
-Group: Development/Languages
-Requires: ant
-Requires: apache-commons-logging
Requires: %{name} = %{version}-%{release}
%description ant
This package enables support for the Commons VFS ant tasks.
%package examples
-Group: Development/Libraries
Summary: Commons VFS Examples
-Requires: jdom
-Requires: jpackage-utils
-Requires: %{name} = %{version}-%{release}
-Provides: %{name}2-examples = %{version}-%{release}
%description examples
VFS is a Virtual File System library - Examples.
%package javadoc
-Group: Documentation
Summary: Javadoc for %{name}
-Requires: jpackage-utils
%description javadoc
This package contains javadoc for %{name}.
@@ -121,67 +83,43 @@ sed -i 's|"webdav",||' core/src/test/java/org/apache/commons/vfs2/util/Delegatin
sed -i "s|<module>dist</module>|<!--module>dist</module-->|" pom.xml
-%build
+# not really needed
+%pom_remove_plugin :maven-checkstyle-plugin
-mvn-rpmbuild -Dmaven.test.failure.ignore=true install javadoc:aggregate
+%mvn_alias :commons-vfs2 "org.apache.commons:%{short_name}" "%{short_name}:%{short_name}"
+%mvn_alias :commons-vfs2-examples "org.apache.commons:%{short_name}-examples" "%{short_name}:%{short_name}-examples"
-%install
+# main package wins parent POM
+%mvn_package ":commons-vfs2-project" commons-vfs2
-mkdir -p %{buildroot}%{_javadir}
-install -m 644 core/target/%{short_name}2-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
-install -m 644 examples/target/%{short_name}2-examples-%{version}.jar %{buildroot}%{_javadir}/%{name}-examples.jar
-
-(
- cd %{buildroot}%{_javadir}
- ln -s %{name}.jar %{short_name}.jar
- ln -s %{name}-examples.jar %{short_name}-examples.jar
- ln -s %{name}.jar %{name}2.jar
- ln -s %{name}-examples.jar %{name}2-examples.jar
- ln -s %{name}.jar %{short_name}2.jar
- ln -s %{name}-examples.jar %{short_name}2-examples.jar
-)
-
-mkdir -p %{buildroot}%{_mavenpomdir}
-install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}-project.pom
-%add_maven_depmap JPP-%{short_name}-project.pom
-install -pm 644 core/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom
-%add_maven_depmap JPP-%{short_name}.pom %{short_name}.jar -a "org.apache.commons:%{short_name},%{short_name}:%{short_name}"
-install -pm 644 examples/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}-examples.pom
-%add_maven_depmap -f examples JPP-%{short_name}-examples.pom %{short_name}-examples.jar -a "org.apache.commons:%{short_name}-examples,%{short_name}:%{short_name}-examples"
-
-mkdir -p %{buildroot}%{_javadocdir}/%{name}
-cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
+%build
+%mvn_build -s
+
+%install
+%mvn_install
mkdir -p %{buildroot}%{_sysconfdir}/ant.d
echo "ant commons-logging %{short_name}" > %{short_name}
install -p -m 644 %{short_name} %{buildroot}%{_sysconfdir}/ant.d/%{short_name}
-%files
-%{_javadir}/%{name}.jar
-%{_javadir}/%{name}2.jar
-%{_javadir}/%{short_name}.jar
-%{_javadir}/%{short_name}2.jar
-%{_mavenpomdir}/JPP-%{short_name}.pom
-%{_mavenpomdir}/JPP-%{short_name}-project.pom
-%{_mavendepmapfragdir}/%{name}
+
+%files -f .mfiles-commons-vfs2
%doc LICENSE.txt NOTICE.txt README.txt RELEASE-NOTES.txt
-%files examples
-%{_javadir}/%{name}-examples.jar
-%{_javadir}/%{name}2-examples.jar
-%{_javadir}/%{short_name}-examples.jar
-%{_javadir}/%{short_name}2-examples.jar
-%{_mavenpomdir}/JPP-%{short_name}-examples.pom
-%{_mavendepmapfragdir}/%{name}-examples
+%files examples -f .mfiles-commons-vfs2-examples
-%files javadoc
-%{_javadocdir}/%{name}
+%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt NOTICE.txt
%files ant
%config %{_sysconfdir}/ant.d/%{short_name}
%changelog
+* Thu Jun 27 2013 Michal Srb <msrb(a)redhat.com> - 2.0-7
+- Build with XMvn
+- Do not ignore test failures
+- Fix BR
+
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
10 years, 10 months
[args4j] Update to latest upstream, fixes #808703
by Mat Booth
commit c2190c548bfef06666830aa0dab5cbfaf0f93375
Author: Mat Booth <fedora(a)matbooth.co.uk>
Date: Wed Jun 26 23:57:17 2013 +0100
Update to latest upstream, fixes #808703
- Also drop unneeded patches
.gitignore | 1 +
args4j-ant-removal.patch | 17 ------
args4j-osgi.patch | 50 ----------------
args4j-srcencoding.patch | 121 ----------------------------------------
args4j-wagon-svn-removal.patch | 19 ------
args4j.spec | 43 +++++++--------
sources | 2 +-
7 files changed, 22 insertions(+), 231 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5c3f7e7..62c39ac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/args4j-2.0.16.tar.xz
+/args4j-site-2.0.23.tar.gz
diff --git a/args4j.spec b/args4j.spec
index 16fd3bf..0c720db 100644
--- a/args4j.spec
+++ b/args4j.spec
@@ -3,30 +3,24 @@ Name: args4j
%global tools_name %{name}-tools
%global site_name %{name}-site
-Version: 2.0.16
-Release: 11%{?dist}
+Version: 2.0.23
+Release: 1%{?dist}
Summary: Small Java lib that makes it easy to parse command line options/args in CUI apps
License: MIT and BSD
Group: Development/Libraries
# http://args4j.java.net/
URL: http://%{name}.java.net/
-# Upload Your personal ssh key to java.net (otherwise the export fails)
-# svn export https://svn.java.net/svn/args4j~svn/tags/args4j-site-2_0_16 args4j-2.0.16
-# tar caf args4j-2.0.16.tar.xz args4j-2.0.16
-Source0: %{name}-%{version}.tar.xz
-
-Patch0: %{name}-wagon-svn-removal.patch
-Patch1: %{name}-ant-removal.patch
-Patch2: %{name}-osgi.patch
-# https://github.com/kohsuke/args4j/commit/fc85e79 + some additions
-Patch3: %{name}-srcencoding.patch
+Source0: https://github.com/kohsuke/%{name}/archive/%{site_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: java-devel
BuildRequires: jpackage-utils
BuildRequires: maven-local
-BuildRequires: maven-surefire-provider-junit
+BuildRequires: maven-dependency-plugin
+BuildRequires: maven-install-plugin
+BuildRequires: maven-shade-plugin
+BuildRequires: mockito
Requires: java
Requires: jpackage-utils
@@ -52,23 +46,22 @@ Requires: jpackage-utils
This package contains the API documentation for %{name}.
%prep
-%setup -q
-
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
+%setup -q -n %{name}-%{site_name}-%{version}
# removing classpath addition
sed -i 's/<addClasspath>true/<addClasspath>false/g' %{tools_name}/pom.xml
+# fix ant group id
+sed -i 's/<groupId>ant/<groupId>org.apache.ant/g' %{tools_name}/pom.xml
+
# removing bundled stuff
-rm -rf repo
-rm -rf www
-rm -rf %{name}/lib
+find -name '*.class' -exec rm -f '{}' \;
+find -name '*.jar' -exec rm -f '{}' \;
+
+%pom_xpath_remove "pom:parent"
%build
-mvn-rpmbuild install javadoc:aggregate
+mvn-rpmbuild -pl :args4j-site,:args4j,:args4j-tools install javadoc:aggregate
%install
# jars
@@ -104,6 +97,10 @@ cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
%doc %{_javadocdir}/%{name}
%changelog
+* Thu Jun 27 2013 Mat Booth <fedora(a)matbooth.co.uk> - 2.0.23-1
+- Update to latest upstream, fixes #808703
+- Also drop unneeded patches
+
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.0.16-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
diff --git a/sources b/sources
index 5a3f86e..717a727 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b765c9c25789884cb982e7c8fefc0de0 args4j-2.0.16.tar.xz
+3cc3de3c67b26afdbe4c8c23827b2463 args4j-site-2.0.23.tar.gz
10 years, 10 months