58 lines
1.8 KiB
RPMSpec
58 lines
1.8 KiB
RPMSpec
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 <buildteam@openeuler.org> - 2.6-4
|
|
- Package init
|