diff --git a/2.6.tar.gz b/2.6.tar.gz new file mode 100644 index 0000000..a978b62 Binary files /dev/null and b/2.6.tar.gz differ diff --git a/objenesis.spec b/objenesis.spec new file mode 100644 index 0000000..0a2c0e0 --- /dev/null +++ b/objenesis.spec @@ -0,0 +1,57 @@ +Name: objenesis +Version: 2.6 +Release: 4 +Summary: A Java library to instantiate a new object +License: ASL 2.0 +URL: http://objenesis.org/ + +Source0: https://github.com/easymock/%{name}/archive/%{version}.tar.gz + +BuildArch: noarch +BuildRequires: maven-local junit maven-plugin-bundle maven-shade-plugin +BuildRequires: maven-remote-resources-plugin apache-resource-bundles +Provides: %{name}-javadoc = %{version}-%{release} +Obsoletes: %{name}-javadoc < %{version}-%{release} + + +%description +Objenesis is a small Java library that serves one purpose: +* To instantiate a new object of a particular class. +Java already supports this dynamic instantiation of classes using Class.newInstance(). However, +this only works if the class has an appropriate constructor. There are many times when a class +cannot be instantiated this way, such as when the class contains: +* Constructors that require arguments. +* Constructors that have side effects. +* Constructors that throw exceptions. +As a result, it is common to see restrictions in libraries stating that classes must require a +default constructor. Objenesis aims to overcome these restrictions by bypassing the constructor +on object instantiation. + +%prep +%autosetup -n %{name}-%{version} + +%pom_xpath_remove pom:addMavenDescriptor +%pom_xpath_remove "pom:dependency[pom:scope='test']" tck +%pom_xpath_remove pom:build/pom:extensions +%pom_remove_plugin :maven-timestamp-plugin +%pom_remove_plugin :maven-license-plugin + +%build +%mvn_build -- -Dyear=2009 -Dmaven.test.skip=true + +%install +%mvn_install + + +%files +%defattr(-,root,root) +%license LICENSE.txt +%{_datadir}/java/* +%{_datadir}/javadoc/* +%{_datadir}/maven-poms/* +%{_datadir}/maven-metadata/* + + +%changelog +* Wed Dec 4 2019 openEuler Buildteam - 2.6-4 +- Package init