Accepting request 679439 from Java:packages
Upgrade to 2.6 OBS-URL: https://build.opensuse.org/request/show/679439 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apache-commons-io?expand=0&rev=12
This commit is contained in:
commit
73fc7661b6
250
apache-commons-io-build.xml
Normal file
250
apache-commons-io-build.xml
Normal file
@ -0,0 +1,250 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="commons-io" default="package" basedir=".">
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Build environment properties -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<property file="maven-build.properties"/>
|
||||
|
||||
<property name="project.groupId" value="commons-io"/>
|
||||
<property name="project.artifactId" value="commons-io"/>
|
||||
<property name="project.version" value="2.6"/>
|
||||
<property name="project.name" value="Apache Commons IO"/>
|
||||
<property name="project.description" value="The Apache Commons IO library
|
||||
contains utility classes, stream implementations, file filters,
|
||||
file comparators, endian transformation classes, and much more."/>
|
||||
<property name="project.organization.name" value="The Apache Software Foundation"/>
|
||||
|
||||
<property name="bundle.symbolicName" value="org.apache.commons.io"/>
|
||||
<property name="bundle.version" value="${project.version}.0"/>
|
||||
|
||||
<property name="compiler.source" value="1.7"/>
|
||||
<property name="compiler.target" value="${compiler.source}"/>
|
||||
|
||||
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
|
||||
<property name="build.dir" value="target"/>
|
||||
<property name="build.outputDir" value="${build.dir}/classes"/>
|
||||
<property name="build.srcDir" value="src/main/java"/>
|
||||
<property name="build.resourceDir.0" value="src/main/resources"/>
|
||||
<property name="build.resourceDir.1" value="."/>
|
||||
<property name="build.testOutputDir" value="${build.dir}/test-classes"/>
|
||||
<property name="build.testDir" value="src/test/java"/>
|
||||
<property name="build.testResourceDir.0" value="src/test/resources"/>
|
||||
<property name="build.testResourceDir.1" value="."/>
|
||||
<property name="test.reports" value="${build.dir}/test-reports"/>
|
||||
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Defining classpaths -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<path id="build.classpath"/>
|
||||
<path id="build.test.classpath"/>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Cleaning up target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="clean" description="Clean the output directory">
|
||||
<delete dir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Compilation target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="compile" description="Compile the code">
|
||||
<mkdir dir="${build.outputDir}"/>
|
||||
<javac destdir="${build.outputDir}"
|
||||
encoding="iso-8859-1"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
optimize="false"
|
||||
deprecation="true"
|
||||
target="${compiler.target}"
|
||||
verbose="false"
|
||||
fork="false"
|
||||
source="${compiler.source}">
|
||||
<src>
|
||||
<pathelement location="${build.srcDir}"/>
|
||||
</src>
|
||||
<classpath refid="build.classpath"/>
|
||||
</javac>
|
||||
<mkdir dir="${build.outputDir}/META-INF"/>
|
||||
<copy todir="${build.outputDir}/META-INF">
|
||||
<fileset dir="${build.resourceDir.1}">
|
||||
<include name="NOTICE.txt"/>
|
||||
<include name="LICENSE.txt"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Test-compilation target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="compile-tests"
|
||||
depends="compile"
|
||||
description="Compile the test code"
|
||||
unless="test.skip">
|
||||
<mkdir dir="${build.testOutputDir}"/>
|
||||
<javac destdir="${build.testOutputDir}"
|
||||
encoding="iso-8859-1"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
optimize="false"
|
||||
deprecation="true"
|
||||
target="${compiler.target}"
|
||||
verbose="false"
|
||||
fork="false"
|
||||
source="${compiler.source}">
|
||||
<src>
|
||||
<pathelement location="${build.testDir}"/>
|
||||
</src>
|
||||
<classpath>
|
||||
<path refid="build.test.classpath"/>
|
||||
<pathelement location="${build.outputDir}"/>
|
||||
</classpath>
|
||||
</javac>
|
||||
<copy todir="${build.testOutputDir}">
|
||||
<fileset dir="${build.testResourceDir.0}"/>
|
||||
</copy>
|
||||
<mkdir dir="${build.testOutputDir}/META-INF"/>
|
||||
<copy todir="${build.testOutputDir}/META-INF">
|
||||
<fileset dir="${build.testResourceDir.1}">
|
||||
<include name="NOTICE.txt"/>
|
||||
<include name="LICENSE.txt"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Run all tests -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="test"
|
||||
depends="compile-tests, junit-missing"
|
||||
unless="junit.skipped"
|
||||
description="Run the test cases">
|
||||
<mkdir dir="${test.reports}"/>
|
||||
<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
|
||||
<sysproperty key="basedir" value="."/>
|
||||
<formatter type="xml"/>
|
||||
<formatter type="plain" usefile="false"/>
|
||||
<classpath>
|
||||
<path refid="build.test.classpath"/>
|
||||
<pathelement location="${build.outputDir}"/>
|
||||
<pathelement location="${build.testOutputDir}"/>
|
||||
</classpath>
|
||||
<batchtest todir="${test.reports}" unless="test">
|
||||
<fileset dir="${build.testDir}">
|
||||
<include name="**/*Test*.java"/>
|
||||
<exclude name="**/*Abstract*TestCase*"/>
|
||||
<exclude name="**/testtools/**"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
<batchtest todir="${test.reports}" if="test">
|
||||
<fileset dir="${build.testDir}">
|
||||
<include name="**/${test}.java"/>
|
||||
<exclude name="**/*Abstract*TestCase*"/>
|
||||
<exclude name="**/testtools/**"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
</junit>
|
||||
</target>
|
||||
|
||||
<target name="test-junit-present">
|
||||
<available classname="junit.framework.Test" property="junit.present" classpathref="build.test.classpath"/>
|
||||
</target>
|
||||
|
||||
<target name="test-junit-status"
|
||||
depends="test-junit-present">
|
||||
<condition property="junit.missing">
|
||||
<and>
|
||||
<isfalse value="${junit.present}"/>
|
||||
<isfalse value="${test.skip}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="junit.skipped">
|
||||
<or>
|
||||
<isfalse value="${junit.present}"/>
|
||||
<istrue value="${test.skip}"/>
|
||||
</or>
|
||||
</condition>
|
||||
</target>
|
||||
|
||||
<target name="junit-missing"
|
||||
depends="test-junit-status"
|
||||
if="junit.missing">
|
||||
<echo>=================================== WARNING ===================================</echo>
|
||||
<echo> JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed.</echo>
|
||||
<echo>===============================================================================</echo>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Javadoc target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="javadoc" description="Generates the Javadoc of the application">
|
||||
<javadoc sourcepath="${build.srcDir}"
|
||||
packagenames="*"
|
||||
destdir="${reporting.outputDirectory}/apidocs"
|
||||
access="protected"
|
||||
verbose="false"
|
||||
encoding="iso-8859-1"
|
||||
version="true"
|
||||
use="true"
|
||||
author="true"
|
||||
splitindex="false"
|
||||
nodeprecated="false"
|
||||
nodeprecatedlist="false"
|
||||
notree="false"
|
||||
noindex="false"
|
||||
nohelp="false"
|
||||
nonavbar="false"
|
||||
serialwarn="false"
|
||||
source="${compiler.source}"
|
||||
linksource="true"
|
||||
breakiterator="false">
|
||||
</javadoc>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Package target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="package" depends="compile,test" description="Package the application">
|
||||
<jar jarfile="${build.dir}/${build.finalName}.jar"
|
||||
compress="true"
|
||||
index="false"
|
||||
basedir="${build.outputDir}"
|
||||
excludes="**/package.html">
|
||||
<manifest>
|
||||
<attribute name="Automatic-Module-Name" value="${bundle.symbolicName}"/>
|
||||
<attribute name="Bundle-Description" value="${project.description}"/>
|
||||
<attribute name="Bundle-DocURL" value="http://commons.apache.org/proper/commons-io/"/>
|
||||
<attribute name="Bundle-License" value="https://www.apache.org/licenses/LICENSE-2.0.txt"/>
|
||||
<attribute name="Bundle-ManifestVersion" value="2"/>
|
||||
<attribute name="Bundle-Name" value="${project.name}"/>
|
||||
<attribute name="Bundle-SymbolicName" value="${bundle.symbolicName}"/>
|
||||
<attribute name="Bundle-Vendor" value="${project.organization.name}"/>
|
||||
<attribute name="Bundle-Version" value="${bundle.version}"/>
|
||||
<attribute name="Export-Package" value="org.apache.commons.io;version="1.4.9999",org.apache.commons.io.comparator;version="1.4.9999",org.apache.commons.io.filefilter;version="1.4.9999",org.apache.commons.io.input;version="1.4.9999",org.apache.commons.io.output;version="1.4.9999",org.apache.commons.io.monitor;version="${project.version}",org.apache.commons.io.serialization;version="${project.version}",org.apache.commons.io;version="${project.version}",org.apache.commons.io.comparator;version="${project.version}",org.apache.commons.io.filefilter;version="${project.version}",org.apache.commons.io.input;version="${project.version}",org.apache.commons.io.output;version="${project.version}""/>
|
||||
<attribute name="Include-Resource" value="META-INF/NOTICE.txt=NOTICE.txt,META-INF/LICENSE.txt=LICENSE.txt"/>
|
||||
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
|
||||
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
|
||||
<attribute name="JavaPackages-Version" value="${project.version}"/>
|
||||
<attribute name="Require-Capability" value="osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=${compiler.target}))""/>
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- A dummy target for the package named after the type it creates -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="jar" depends="package" description="Builds the jar for the application"/>
|
||||
|
||||
</project>
|
@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 26 17:34:25 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Update to upstream version 2.6
|
||||
* many bugfixes, features and enhancenments, like
|
||||
Automatic-Module-Name entry in manifest
|
||||
* requires jdk7 or later
|
||||
* see RELEASE-NOTES.txt for details
|
||||
- Generated a build.xml to be able to build with ant
|
||||
- Build with tests is now optional
|
||||
- Removed patch:
|
||||
* commons-io-version-property.patch
|
||||
+ not needed anymore in this version
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 15 10:41:03 UTC 2018 - fstrba@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package apache-commons-io
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -12,32 +12,33 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define base_name io
|
||||
%define short_name commons-%{base_name}
|
||||
Name: apache-commons-io
|
||||
Version: 2.4
|
||||
%bcond_with tests
|
||||
Name: apache-%{short_name}
|
||||
Version: 2.6
|
||||
Release: 0
|
||||
Summary: Utilities to assist with developing IO functionality
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/Java
|
||||
Url: http://commons.apache.org/%{base_name}
|
||||
URL: http://commons.apache.org/%{base_name}
|
||||
Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
|
||||
#PATCH-FIX-OPENSUSE: fix the version property to 2.4
|
||||
Patch0: commons-io-version-property.patch
|
||||
Source1: %{name}-build.xml
|
||||
BuildRequires: ant >= 1.6
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: java-devel >= 1.8
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: javapackages-tools
|
||||
Provides: %{short_name} = %{version}-%{release}
|
||||
Provides: jakarta-%{short_name} = %{version}-%{release}
|
||||
Obsoletes: jakarta-%{short_name} < %{version}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Obsoletes: jakarta-%{short_name} < %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
%if %{with tests}
|
||||
BuildRequires: ant-junit
|
||||
%endif
|
||||
|
||||
%description
|
||||
Commons-IO contains utility classes, stream implementations,
|
||||
@ -45,53 +46,45 @@ file filters, and endian classes. It is a library of utilities
|
||||
to assist with developing IO functionality.
|
||||
|
||||
%package javadoc
|
||||
Summary: Commons IO Package
|
||||
Group: Development/Libraries/Java
|
||||
Summary: API documentation for %{name}
|
||||
Group: Documentation/HTML
|
||||
|
||||
%description javadoc
|
||||
This package contains the API documentation for %{name}.
|
||||
This package provides %{summary}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{short_name}-%{version}-src
|
||||
%patch0 -p1
|
||||
# wrong end of line encoding
|
||||
sed -i -e 's/.$//' *.txt
|
||||
cp %{SOURCE1} build.xml
|
||||
|
||||
%build
|
||||
export OPT_JAR_LIST="junit"
|
||||
export CLASSPATH=
|
||||
CLASSPATH=target/classes:target/test-classes:$CLASSPATH
|
||||
ant -Dcompile.source=8 -Dcompile.target=8 \
|
||||
-Dbuild.sysclasspath=only \
|
||||
dist
|
||||
%{ant} \
|
||||
-Dcompiler.source=1.8 \
|
||||
%if %{without tests }
|
||||
-Dtest.skip=true \
|
||||
%endif
|
||||
jar javadoc
|
||||
|
||||
%install
|
||||
# jars
|
||||
install -d -m 0755 %{buildroot}%{_javadir}
|
||||
install -p -m 0644 target/%{short_name}-%{version}.jar \
|
||||
%{buildroot}%{_javadir}/%{name}.jar
|
||||
ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
|
||||
|
||||
%{buildroot}%{_javadir}/%{short_name}.jar
|
||||
ln -sf %{short_name}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||
# pom
|
||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom
|
||||
|
||||
%add_maven_depmap JPP-%{short_name}.pom %{short_name}.jar -a "org.apache.commons:commons-io"
|
||||
|
||||
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}.pom
|
||||
%add_maven_depmap %{short_name}.pom %{short_name}.jar -a "org.apache.commons:commons-io"
|
||||
# javadoc
|
||||
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
||||
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
||||
%fdupes -s %{buildroot}%{_javadocdir}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
|
||||
%{_javadir}/*.jar
|
||||
%{_mavenpomdir}/JPP-%{short_name}.pom
|
||||
%{_datadir}/maven-metadata/%{name}.xml*
|
||||
%files -f .mfiles
|
||||
%license LICENSE.txt NOTICE.txt
|
||||
%doc RELEASE-NOTES.txt
|
||||
%{_javadir}/%{name}.jar
|
||||
|
||||
%files javadoc
|
||||
%defattr(-,root,root,-)
|
||||
%doc %{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:961c8b41a891933c2d662d8e490667243ac82422668d1ccdd7bfedfdb944bb58
|
||||
size 330961
|
3
commons-io-2.6-src.tar.gz
Normal file
3
commons-io-2.6-src.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f68167938ab15ced969747bc6b4d91c4f923a34ad4fdb2e8c8c3029adaa47e0c
|
||||
size 383069
|
@ -1,13 +0,0 @@
|
||||
Index: commons-io-2.4-src/build.xml
|
||||
===================================================================
|
||||
--- commons-io-2.4-src.orig/build.xml 2012-06-13 00:18:07.000000000 +0200
|
||||
+++ commons-io-2.4-src/build.xml 2012-10-25 10:19:14.012998318 +0200
|
||||
@@ -55,7 +55,7 @@
|
||||
<property name="component.title" value="Commons IO"/>
|
||||
|
||||
<!-- The current version number of this component -->
|
||||
- <property name="component.version" value="2.2-SNAPSHOT"/>
|
||||
+ <property name="component.version" value="2.4"/>
|
||||
|
||||
<!-- The base directory for component sources -->
|
||||
<property name="source.home" value="src/main/java"/>
|
Loading…
x
Reference in New Issue
Block a user