Sync from SUSE:ALP:Source:Standard:1.0 apache-commons-lang3 revision dc36d7fda2f2abc69150cf5444ceb16d

This commit is contained in:
Adrian Schröter 2024-02-20 09:16:00 +01:00
commit 5ad723e16a
6 changed files with 763 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,304 @@
-------------------------------------------------------------------
Wed Aug 30 20:57:36 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Break cycle with the new bcel
- Removed patch:
* apache-commons-lang3-junit-bom.patch
+ not needed since we install the pom file using the new
%%mvn_install_pom macro which sanitizes the pom file to the
bare runtime dependencies.
-------------------------------------------------------------------
Wed Dec 29 15:18:48 UTC 2021 - Pedro Monreal <pmonreal@suse.com>
- Remove the junit bom dependency for now as it breaks the build of
other packages like log4j.
* Add apache-commons-lang3-junit-bom.patch
-------------------------------------------------------------------
Wed Dec 29 12:49:05 UTC 2021 - David Anes <david.anes@suse.com>
- Fix component version in default.properties to 3.12
-------------------------------------------------------------------
Fri Dec 24 14:28:12 UTC 2021 - David Anes <david.anes@suse.com>
- Updated download URL.
- Update to 3.12.0:
- New features:
* Add BooleanUtils.booleanValues().
* Add BooleanUtils.primitiveValues().
* Add StringUtils.containsAnyIgnoreCase(CharSequence, CharSequence...).
* Add StopWatch.getStopTime().
* More test coverage for CharSequenceUtils.
* Add fluent-style ArraySorter.
* Add and use LocaleUtils.toLocale(Locale) to avoid NPEs.
* Add FailableShortSupplier, handy for JDBC APIs.
* Add JavaVersion.JAVA_17.
* Add missing boolean[] join method.
* Add StringUtils.substringBefore(String, int).
* Add Range.INTEGER.
* Add DurationUtils.
* Introduce the use of @Nonnull, and @Nullable, and the Objects class as a helper tool.
* Add and use true and false String constants.
* Add and use ObjectUtils.requireNonEmpty().
- Fixed Bugs:
* Correct implementation of RandomUtils.nextLong(long, long).
* Restore handling of collections for non-JSON ToStringStyle.
* ContextedException Javadoc add missing semicolon.
* Resolve JUnit pioneer transitive dependencies using JUnit BOM.
* NumberUtilsTest - incorrect types in min/max tests.
* Improve StringUtils.stripAccents conversion of remaining accents.
* StringUtils.countMatches - clarify Javadoc.
* Remove redundant argument from substring call.
* BigDecimal is created when you pass it the min and max values.
* ArrayUtils.contains() and indexOf() fail to handle Double.NaN.
* ArrayUtils contains() and indexOf() fail to handle Float.NaN.
* Fix potential NPE in TypeUtils.isAssignable(Type, ParameterizedType, Map, Type>).
* TypeUtils.isAssignable returns wrong result for GenericArrayType and ParameterizedType.
* testGetAllFields and testGetFieldsWithAnnotation sometimes fail.
* Fix Javadoc for SystemUtils.isJavaVersionAtMost().
* Fix StringUtils.unwrap throws StringIndexOutOfBoundsException.
* Fix formatting of isAnyBlank() and isAnyEmpty().
* TypeUtils. containsTypeVariables does not support GenericArrayType.
* Javadoc of some methods incorrectly refers to another method.
* Refine StringUtils.lastIndexOfIgnoreCase.
* Refine StringUtils.abbreviate.
* Refine StringUtils.isNumericSpace.
* Refine StringUtils.deleteWhitespace.
* Correction in Javadoc of some methods.
* Javadoc for RandomStringUtils.random() letters, numbers parameters is wrong.
* Correct markup in Javadoc for unbalanced braces.
* MethodUtils.invokeMethod NullPointerException in case of null in args list.
* Fix 2 digit week year formatting.
* Fix broken Javadoc links to commons-text.
* Add and use ThreadUtils.sleep(Duration).
* Add and use ThreadUtils.join(Thread, Duration).
* Add ObjectUtils.wait(Duration).
- Changes:
* ArrayUtils.toPrimitive(Object) does not support boolean and other types.
* Enable Dependabot.
* Bump junit-jupiter from 5.6.2 to 5.7.0.
* Bump spotbugs from 4.1.2 to 4.2.1.
* Bump spotbugs-maven-plugin from 4.0.0 to 4.2.0.
* Bump biz.aQute.bndlib from 5.1.1 to 5.3.0.
* Bump junit-pioneer from 0.6.0 to 1.1.0.
* Bump checkstyle from 8.34 to 8.40.
* Bump actions/checkout from v2.3.1 to v2.3.4.
* Bump actions/setup-java from v1.4.0 to v1.4.2.
* Update commons.jacoco.version 0.8.5 to 0.8.6 (Fixes Java 15 builds).
* Update maven-surefire-plugin 2.22.2 -> 3.0.0-M5.
* Bump maven-pmd-plugin from 3.13.0 to 3.14.0.
* Bump jmh.version from 1.21 to 1.27.
* Update commons.japicmp.version 0.14.3 -> 0.15.2.
* Processor.java: check enum equality with == instead of .equals() method.
* Bump junit-pioneer from 1.1.0 to 1.3.0.
* Bump maven-checkstyle-plugin from 3.1.1 to 3.1.2.
* Bump actions/cache from v2 to v2.1.4.
* Bump junit-bom from 5.7.0 to 5.7.1.
* Minor Improvements.
* Minor Improvement: Add final variable.try to make the code read-only.
* Minor Improvement: Remove redundant initializer.
* Use own validator ObjectUtils.anyNull to check null String input.
- From 3.11 Update:
- New features:
* Add ArrayUtils.isSameLength() to compare more array types.
* Added the Locks class as a convenient possibility to deal with locked objects.
* Add to Functions: FailableBooleanSupplier, FailableIntSupplier, FailableLongSupplier, FailableDoubleSupplier, and so on.
* Add ArrayUtils.get(T[], index, T) to provide an out-of-bounds default value.
* Add JavaVersion enum constants for Java 14 and 15.
* Add JavaVersion enum constants for Java 16.
* Use Java 8 lambdas and Map operations.
* Change removeLastFieldSeparator to use endsWith.
* Change a Pattern to a static final field, for not letting it compile each time the function invoked.
* Add ImmutablePair factory methods left() and right().
* Add ObjectUtils.toString(Object, Supplier<String>).
* Add org.apache.commons.lang3.StringUtils.substringAfter(String, int).
* Add org.apache.commons.lang3.StringUtils.substringAfterLast(String, int).
- Fixed Bugs:
* Fix Javadoc for StringUtils.appendIfMissingIgnoreCase().
* Refine Javadoc.
* Fix typos
* Ignored exception `ignored`, should not be called so.
* StringUtils.replaceEachRepeatedly gives IllegalStateException.
* [JSON string for maps] ToStringBuilder.reflectionToString doesnt render nested maps correctly.
* Correct Javadocs of methods that use Validate.notNull() and replace some uses of Validate.isTrue() with Validate.notNull().
* Add allNull() and anyNull() methods to ObjectUtils.
- Changes:
* Refine test output for FastDateParserTest
* CharSequenceUtils.lastIndexOf : remake it
* remove encoding and docEncoding and use inherited values from commons-parent
* Simplify null checks in Pair.hashCode() using Objects.hashCode().
* Simplify null checks in Triple.hashCode() using Objects.hashCode().
* Simplify some if statements in StringUtils.
* Simplify a null check in the private replaceEach() method of StringUtils.
* Replace some usages of the ternary operator with calls to Math.max() and Math.min().
* (Javadoc) Fix return tag for throwableOf*() methods.
* CharSequenceUtils.regionMatches is wrong dealing with Georgian.
* Optimize ArrayUtils::isArrayIndexValid method.
* Use List.sort instead of Collection.sort.
* Use StandardCharsets.UTF_8.
* Use Collections.singletonList insteadof Arrays.asList when there be only one element.
* Change array style from `int a[]` to `int[] a`.
* Change from addAll to constructors for some List.
* Simplify if as some conditions are covered by others.
* Fixed Javadocs for setTestRecursive().
* ToStringBuilder.reflectionToString - Wrong JSON format when object has a List of Enum.
* Make org.apache.commons.lang3.CharSequenceUtils.toCharArray(CharSequence) public.
* org.apache.commons:commons-parent 50 -> 51.
* org.junit-pioneer:junit-pioneer 0.5.4 -> 0.6.0.
* org.junit.jupiter:junit-jupiter 5.6.0 -> 5.6.2.
* com.github.spotbugs:spotbugs 4.0.0 -> 4.0.6.
* com.puppycrawl.tools:checkstyle 8.29 -> 8.34.
* commons.surefire.version 3.0.0-M4 -> 3.0.0-M5..
- From 3.10 Update:
- New features:
* Add ExceptionUtils.throwableOfType(Throwable, Class) and friends.
* Add EMPTY_ARRAY constants to classes in org.apache.commons.lang3.tuple.
* Add null-safe StringUtils APIs to wrap String#getBytes([Charset|String]).
* Add zero arg constructor for org.apache.commons.lang3.NotImplementedException.
* Add ArrayUtils.addFirst() methods.
* Add Range.fit(T) to fit a value into a range.
* Added Functions.as*, and tests thereof, as suggested by Peter Verhas
* Add getters for lhs and rhs objects in DiffResult.
* Generify builder classes Diffable, DiffBuilder, and DiffResult.
* Add ClassLoaderUtils with toString() implementations.
* Add null-safe APIs as StringUtils.toRootLowerCase(String) and StringUtils.toRootUpperCase(String).
* Add org.apache.commons.lang3.time.Calendars.
* Add EnumUtils getEnum() methods with default values.
* Added indexesOf methods and simplified removeAllOccurences.
* Add support of lambda value evaluation for defaulting methods.
* Add factory methods to Pair classes with Map.Entry input.
* Add StopWatch convenience APIs to format times and create a simple instance.
* Allow a StopWatch to carry an optional message.
* Add ComparableUtils.
* Add org.apache.commons.lang3.SystemUtils.getUserName().
* Add ObjectToStringComparator.
* Add org.apache.commons.lang3.arch.Processor.Arch.getLabel().
* Add IS_JAVA_14 and IS_JAVA_15 to org.apache.commons.lang3.SystemUtils.
* ObjectUtils: Get first non-null supplier value.
* Added the Streams class, and Functions.stream() as an accessor thereof.
- Fixed Bugs:
* Make test more stable by wrapping assertions in hashset.
* Generate Javadoc jar on build.
* Trivial: year of release for 3.9 says 2018, should be 2019.
* Use synchronize on a set created with Collections.synchronizedSet before iterating.
* StringUtils.unwrap incorrect throw StringIndexOutOfBoundsException.
* StringIndexOutOfBoundsException in StringUtils.replaceIgnoreCase.
* StringUtils.removeIgnoreCase("?a", "a") throws IndexOutOfBoundsException.
* Corrected usage examples in Javadocs.
* StringUtils abbreviate returns String of length greater than maxWidth.
* Test may fail due to a different order of fields returned by reflection api.
* Sort fields in ReflectionToStringBuilder for deterministic order.
* MethodUtils will throw a NPE if invokeMethod() is called for a var-args method.
* MethodUtils.getAnnotation() with searchSupers = true does not work if super is generic.
- Changes:
* Remove redundant if statements in join methods.
* commons.japicmp.version 0.13.1 -> 0.14.1.
* junit-jupiter 5.5.0 -> 5.5.1.
* junit-jupiter 5.5.1 -> 5.5.2.
* Improve Javadoc based on the discussion of the GitHub PR.
* maven-checkstyle-plugin 3.0.0 -> 3.1.0.
* Update documentation related to the issue LANG-696.
* AnnotationUtils little cleanup.
* Update test dependency: org.easymock:easymock 4.0.2 -> 4.1.
* Update test dependency: org.hamcrest:hamcrest 2.1 -> 2.2.
* Update test dependency: org.junit-pioneer:junit-pioneer 0.3.0 -> 0.4.2.
* Update build dependency: com.puppycrawl.tools:checkstyle 8.18 -> 8.27.
* Update POM parent: org.apache.commons:commons-parent 48 -> 50.
* BooleanUtils Javadoc.
* Functions Javadoc.
* org.easymock:easymock 4.1 -> 4.2.
* org.junit-pioneer:junit-pioneer 0.4.2 -> 0.5.4.
* org.junit.jupiter:junit-jupiter 5.5.2 -> 5.6.0.
* Use Javadoc {@code} instead of pre tags.
* ExceptionUtilsTest to 100%.
* Reuse own code in Functions.java.
* Avoid unnecessary allocation in StringUtils.wrapIfMissing.
* Internally use Validate.notNull(foo, ...) instead of Validate.isTrue(foo != null, ...).
* Add 1 and 0 in toBooleanObject(final String str).
* Remove an redundant argument check in NumberUtils.
* Deprecate org.apache.commons.lang3.ArrayUtils.removeAllOccurences(*) for org.apache.commons.lang3.ArrayUtils.removeAllOccurrences(*).
-------------------------------------------------------------------
Fri Apr 23 20:23:47 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
- Fixed SPEC file: Replaced broken URL
- Update to 3.9
* Requires jdk >= 1.8
* Fixed issues with java 12
* Add more SystemUtils.IS_JAVA_XX variants
* Adding the Functions class
* Add @FunctionalInterface to ThreadPredicate and ThreadGroupPredicate
* Add isEmpty method to ObjectUtils
* null-safe StringUtils.valueOf(char[]) to delegate to
String.valueOf(char[]).
* Add API org.apache.commons.lang3.SystemUtils.isJavaVersionAtMost(JavaVersion)
* Consolidate the StringUtils equals and equalsIgnoreCase
-------------------------------------------------------------------
Tue Feb 16 19:47:33 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- Add OSGi manifest
-------------------------------------------------------------------
Mon Mar 25 17:41:59 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Remove pom parent, since we don't use it when not building with
maven
-------------------------------------------------------------------
Mon Feb 4 06:21:14 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Clean-up the spec file and install less jar symlinks
-------------------------------------------------------------------
Mon Oct 22 10:24:43 UTC 2018 - Fridrich Strba <fstrba@suse.com>
- Build commons-lang3-3.8.1 using modified build.xml and
default.properties from 3.4.
- Removed patch:
* commons-lang3-3.4-javadoc.patch
- integrated in the build.xml
- Use source and target version 1.7, since the code contains
diamond operator.
-------------------------------------------------------------------
Wed May 2 12:22:44 UTC 2018 - tchvatal@suse.com
- Format with spec-cleaner
-------------------------------------------------------------------
Mon Oct 9 06:45:42 UTC 2017 - fstrba@suse.com
- Modified patch:
* commons-lang3-3.4-javadoc.patch
+ Fix build with jdk9
- Allow building with jdk9 too
- Run fdupes on javadoc
-------------------------------------------------------------------
Thu Sep 14 12:45:49 UTC 2017 - fstrba@suse.com
- Specify java target and source level 1.6
- Force building with jdk < 1.9, since jdk9's javadoc chocks on one
class file (internal error)
-------------------------------------------------------------------
Fri May 19 09:59:33 UTC 2017 - pcervinka@suse.com
- New build dependency: javapackages-local
-------------------------------------------------------------------
Sun Jan 24 12:45:36 UTC 2016 - p.drouand@gmail.com
- Initial release (version 3.4)

101
apache-commons-lang3.spec Normal file
View File

@ -0,0 +1,101 @@
#
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define base_name lang3
%define short_name commons-%{base_name}
Name: apache-%{short_name}
Version: 3.12.0
Release: 0
Summary: Apache Commons Lang Package
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://commons.apache.org/proper/commons-lang/
Source0: https://dlcdn.apache.org/commons/lang/source/%{short_name}-%{version}-src.tar.gz
Source1: build.xml
Source2: default.properties
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local >= 6
#!BuildIgnore: bcel
#!BuildIgnore: xalan-j2
#!BuildIgnore: xerces-j2
Provides: %{short_name} = %{version}-%{release}
BuildArch: noarch
%description
The standard Java libraries fail to provide enough methods for
manipulation of its core classes. The Commons Lang Component provides
these extra methods.
The Commons Lang Component provides a host of helper utilities for the
java.lang API, notably String manipulation methods, basic numerical
methods, object reflection, creation and serialization, and System
properties. Additionally it contains an inheritable enum type, an
exception structure that supports multiple types of nested-Exceptions
and a series of utilities dedicated to help with building methods, such
as hashCode, toString and equals.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
Javadoc for %{name}.
%prep
%setup -q -n %{short_name}-%{version}-src
cp %{SOURCE1} .
cp %{SOURCE2} .
sed -i 's/\r//' *.txt
%build
export OPT_JAR_LIST=`cat %{_sysconfdir}/ant.d/junit`
export CLASSPATH=
ant \
-Dcompile.source=1.8 -Dcompile.target=1.8 \
-Dfinal.name=%{short_name} \
jar javadoc
%install
# jars
install -dm 755 %{buildroot}%{_javadir}
install -m 0644 target/%{short_name}.jar %{buildroot}%{_javadir}/%{name}.jar
ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
# pom
install -dm 755 %{buildroot}%{_mavenpomdir}
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}.pom %{name}.jar
# javadoc
install -dm 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}/%{name}/
%files -f .mfiles
%license LICENSE.txt NOTICE.txt
%doc RELEASE-NOTES.txt
%{_javadir}/%{short_name}.jar
%files javadoc
%{_javadocdir}/%{name}
%changelog

242
build.xml Normal file
View File

@ -0,0 +1,242 @@
<!--
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
-->
<!--
"Lang" component of the Apache Commons Subproject
$Id: build.xml 1583140 2014-03-30 13:51:54Z britter $
-->
<project name="Lang" default="compile" basedir=".">
<!-- ========== Initialize Properties ===================================== -->
<property file="${user.home}/${component.name}.build.properties"/>
<property file="${user.home}/build.properties"/>
<property file="${basedir}/build.properties"/>
<property file="${basedir}/default.properties"/>
<property name="jdk.javadoc" value="http://docs.oracle.com/javase/6/docs/api/"/>
<property name="collections.javadoc" value="http://commons.apache.org/collections/api-release/"/>
<!-- ========== Construct compile classpath =============================== -->
<path id="compile.classpath">
<pathelement location="${build.home}/classes"/>
</path>
<!-- ========== Construct unit test classpath ============================= -->
<path id="test.classpath">
<pathelement location="${build.home}/classes"/>
<pathelement location="${build.home}/tests"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${easymock.jar}"/>
<pathelement location="${commons-io.jar}"/>
<pathelement location="${hamcrest.jar}"/>
</path>
<!-- ========== Executable Targets ======================================== -->
<target name="init" description="Initialize and evaluate conditionals">
<echo message="-------- ${component.name} ${component.version} --------"/>
<filter token="name" value="${component.name}"/>
<filter token="package" value="${component.package}"/>
<filter token="version" value="${component.version}"/>
<filter token="compile.source" value="${compile.source}"/>
<filter token="compile.target" value="${compile.target}"/>
<mkdir dir="${build.home}"/>
</target>
<!-- ========== Compile Targets ========================================= -->
<target name="compile" depends="init" description="Compile shareable components">
<mkdir dir="${build.home}/classes"/>
<javac srcdir="${source.home}" destdir="${build.home}/classes" debug="${compile.debug}" deprecation="${compile.deprecation}" target="${compile.target}" source="${compile.source}" excludes="${compile.excludes}" optimize="${compile.optimize}" includeantruntime="false" encoding="${compile.encoding}">
<classpath refid="compile.classpath"/>
</javac>
<copy todir="${build.home}/classes" filtering="on">
<fileset dir="${source.home}" excludes="**/*.java,**/*.html"/>
</copy>
</target>
<target name="compile.tests" depends="compile" description="Compile unit test cases">
<mkdir dir="${build.home}/tests"/>
<javac srcdir="${test.home}" destdir="${build.home}/tests" debug="${compile.debug}" deprecation="off" target="${compile.target}" source="${compile.source}" optimize="${compile.optimize}" includeantruntime="false" encoding="${compile.encoding}">
<classpath refid="test.classpath"/>
</javac>
<copy todir="${build.home}/tests" filtering="on">
<fileset dir="${test.home}" excludes="**/*.java"/>
</copy>
</target>
<!-- ========== Unit Tests ========================================= -->
<target name="test" depends="compile.tests" description="Run all unit test cases">
<echo message="Running unit tests ..."/>
<mkdir dir="${build.home}/test-reports"/>
<junit printsummary="true" showoutput="true" fork="yes" haltonfailure="${test.failonerror}">
<classpath refid="test.classpath"/>
<formatter type="plain" usefile="true" />
<!-- If test.entry is defined, run a single test, otherwise run all valid tests -->
<test name="${test.entry}" todir="${build.home}/test-reports" if="test.entry"/>
<batchtest fork="yes" todir="${build.home}/test-reports" unless="test.entry">
<fileset dir="${test.home}">
<include name="**/*Test.java"/>
<exclude name="**/Abstract*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="clean" description="Clean build and distribution directories">
<delete dir="${build.home}"/>
</target>
<target name="all" depends="clean,test,compile" description="Clean and compile all components"/>
<!-- ========== JavaDocs ========================================= -->
<target name="javadoc" depends="compile" description="Create component Javadoc documentation">
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}/apidocs"/>
<tstamp>
<format property="current.year" pattern="yyyy"/>
</tstamp>
<javadoc sourcepath="${source.home}"
destdir="${build.home}/apidocs"
overview="${source.home}/org/apache/commons/lang3/overview.html"
packagenames="org.apache.commons.*"
excludepackagenames="${javadoc.excludepackagenames}"
author="false"
version="true"
doctitle="&lt;h1&gt;Commons Lang ${component.version}&lt;/h1&gt;"
windowtitle="Lang ${component.version}"
bottom="Copyright &amp;copy; 2001-${current.year} - Apache Software Foundation"
use="true"
encoding="${compile.encoding}"
source="${compile.source}">
</javadoc>
</target>
<!-- ========== Jar Targets ========================================= -->
<target name="jar" depends="compile" description="Create jar">
<mkdir dir="${build.home}/classes/META-INF"/>
<copy file="LICENSE.txt" tofile="${build.home}/classes/META-INF/LICENSE.txt"/>
<copy file="NOTICE.txt" tofile="${build.home}/classes/META-INF/NOTICE.txt"/>
<jar jarfile="${build.home}/${final.name}.jar">
<manifest>
<attribute name="Automatic-Module-Name" value="org.apache.commons.lang3"/>
<attribute name="Bundle-Description" value="Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang."/>
<attribute name="Bundle-DocURL" value="http://commons.apache.org/proper/commons-lang/"/>
<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="Apache Commons Lang"/>
<attribute name="Bundle-SymbolicName" value="org.apache.commons.lang3"/>
<attribute name="Bundle-Vendor" value="The Apache Software Foundation"/>
<attribute name="Bundle-Version" value="${component.version}"/>
<attribute name="Export-Package" value="org.apache.commons.lang3;version=&quot;${component.version}&quot;,org.apache.commons.lang3.arch;version=&quot;${component.version}&quot;,org.apache.commons.lang3.builder;version=&quot;${component.version}&quot;,org.apache.commons.lang3.concurrent;version=&quot;${component.version}&quot;,org.apache.commons.lang3.event;version=&quot;${component.version}&quot;,org.apache.commons.lang3.exception;version=&quot;${component.version}&quot;,org.apache.commons.lang3.math;version=&quot;${component.version}&quot;,org.apache.commons.lang3.mutable;version=&quot;${component.version}&quot;,org.apache.commons.lang3.reflect;version=&quot;${component.version}&quot;,org.apache.commons.lang3.text;version=&quot;${component.version}&quot;,org.apache.commons.lang3.text.translate;version=&quot;${component.version}&quot;,org.apache.commons.lang3.time;version=&quot;${component.version}&quot;,org.apache.commons.lang3.tuple;version=&quot;${component.version}&quot;"/>
<attribute name="Implementation-Title" value="Commons Lang"/>
<attribute name="Implementation-Version" value="${component.version}"/>
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
<attribute name="Implementation-Vendor-Id" value="org.apache"/>
<attribute name="Include-Resource" value="META-INF/LICENSE.txt=LICENSE.txt,META-INF/NOTICE.txt=NOTICE.txt"/>
<attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=${compile.target}))&quot;"/>
<attribute name="Specification-Title" value="Commons Lang"/>
<attribute name="Specification-Version" value="${component.version}"/>
<attribute name="Specification-Vendor" value="The Apache Software Foundation"/>
<attribute name="X-Compile-Source-JDK" value="${compile.source}"/>
<attribute name="X-Compile-Target-JDK" value="${compile.target}"/>
</manifest>
<fileset dir="${build.home}/classes">
<include name="**/*.class"/>
<include name="**/LICENSE.txt"/>
<include name="**/NOTICE.txt"/>
</fileset>
</jar>
</target>
<target name="javadoc-jar" depends="javadoc" description="Create JavaDoc jar">
<jar jarfile="${build.home}/${final.name}-javadoc.jar">
<manifest>
<attribute name="Specification-Title" value="Commons Lang API"/>
<attribute name="Specification-Version" value="${component.version}"/>
<attribute name="Specification-Vendor" value="The Apache Software Foundation"/>
<attribute name="Implementation-Title" value="Commons Lang API"/>
<attribute name="Implementation-Version" value="${component.version}"/>
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
<attribute name="Implementation-Vendor-Id" value="org.apache"/>
</manifest>
<fileset dir="${build.home}/apidocs"/>
<fileset dir="${basedir}">
<include name="LICENSE.txt"/>
<include name="NOTICE.txt"/>
</fileset>
</jar>
</target>
<target name="source-jar" depends="init" description="Create JavaDoc jar">
<jar jarfile="${build.home}/${final.name}-sources.jar">
<manifest>
<attribute name="Specification-Title" value="Commons Lang Source"/>
<attribute name="Specification-Version" value="${component.version}"/>
<attribute name="Specification-Vendor" value="The Apache Software Foundation"/>
<attribute name="Implementation-Title" value="Commons Lang Source"/>
<attribute name="Implementation-Version" value="${component.version}"/>
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
<attribute name="Implementation-Vendor-Id" value="org.apache"/>
</manifest>
<fileset dir="${source.home}">
<include name="**/*.java"/>
</fileset>
<fileset dir="${basedir}">
<include name="LICENSE.txt"/>
<include name="NOTICE.txt"/>
</fileset>
</jar>
</target>
<!-- ========== Distribution ========================================= -->
<target name="dist" depends="clean,jar,source-jar,javadoc-jar" description="Create binary distribution">
<!-- binary distro -->
<zip destfile="${build.home}/${final.name}.zip">
<zipfileset dir="${basedir}" prefix="${final.name}"
includes="LICENSE.txt,
NOTICE.txt,
RELEASE-NOTES.txt"
/>
<zipfileset dir="${build.home}" includes="*.jar," prefix="${final.name}"/>
<zipfileset dir="${build.home}/apidocs" prefix="${final.name}/apidocs"/>
</zip>
<tar destfile="${build.home}/${final.name}.tar.gz" compression="gzip">
<zipfileset src="${build.home}/${final.name}.zip"/>
</tar>
<!-- source distro -->
<zip destfile="${build.home}/${final.name}-src.zip">
<zipfileset dir="${basedir}" prefix="${final.name}-src"
includes="build.xml,
build.xml,
checkstyle.xml,
default.properties,
LICENSE.txt,
NOTICE.txt,
pom.xml,
RELEASE-NOTES.txt"
/>
<zipfileset dir="${basedir}/src" prefix="${final.name}-src/src"/>
</zip>
<tar destfile="${build.home}/${final.name}-src.tar.gz" compression="gzip">
<zipfileset src="${build.home}/${final.name}-src.zip"/>
</tar>
</target>
</project>

BIN
commons-lang3-3.12.0-src.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

90
default.properties Normal file
View File

@ -0,0 +1,90 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# $Id: default.properties 1671054 2015-04-03 12:28:16Z britter $
# The location of the "junit.jar" JAR file
junit.jar = ${junit.home}/junit-5.5.2.jar
# The location of the Easymock jar
easymock.jar = ${easymock.home}/easymock-3.3.1.jar
# The location of the Commons-IO jar
commons-io.jar = ${commons-io.home}/commons-io-2.4.jar
# The location of Hamcrest jar
hamcrest.jar = ${hamcrest.home}/hamcrest-all-1.3.jar
# Whether or not to fork tests
junit.fork = true
# The name of this component
component.name = commons-lang3
# The primary package name of this component
component.package = org.apache.commons.lang3
# The title of this component
component.title = Core Language Utilities
# The current version number of this component
component.version = 3.12
# The name that is used to create the jar file
final.name = ${component.name}-${component.version}
# The base directory for compilation targets
build.home = target
# The base directory for component configuration files
conf.home = src/conf
# The base directory for component sources
source.home = src/main/java
# The base directory for unit test sources
test.home = src/test/java
# Should Java compilations set the 'debug' compiler option?
compile.debug = true
# Should Java compilations set the 'deprecation' compiler option?
compile.deprecation = true
# Should Java compilations set the 'optimize' compiler option?
compile.optimize = true
# Generate class files for specific VM version (e.g., 1.1 or 1.2).
# Note that the default value depends on the JVM that is running Ant.
# In particular, if you use JDK 1.4+ the generated classes will not be usable
# for a 1.1 Java VM unless you explicitly set this attribute to the value 1.1
# (which is the default value for JDK 1.1 to 1.3).
compile.target = 1.8
# Specifies the source version for the Java compiler.
# Corresponds to the source attribute for the ant javac task.
# Valid values are 1.3, 1.4, 1.5.
compile.source = 1.8
# Specifies the source encoding.
compile.encoding = ISO-8859-1
# Should all tests fail if one does?
test.failonerror = true
# The test runner to execute
test.runner = junit.textui.TestRunner