|
|
bb2081 |
# Copyright (c) 2000-2009, JPackage Project
|
|
|
bb2081 |
# All rights reserved.
|
|
|
bb2081 |
#
|
|
|
bb2081 |
# Redistribution and use in source and binary forms, with or without
|
|
|
bb2081 |
# modification, are permitted provided that the following conditions
|
|
|
bb2081 |
# are met:
|
|
|
bb2081 |
#
|
|
|
bb2081 |
# 1. Redistributions of source code must retain the above copyright
|
|
|
bb2081 |
# notice, this list of conditions and the following disclaimer.
|
|
|
bb2081 |
# 2. Redistributions in binary form must reproduce the above copyright
|
|
|
bb2081 |
# notice, this list of conditions and the following disclaimer in the
|
|
|
bb2081 |
# documentation and/or other materials provided with the
|
|
|
bb2081 |
# distribution.
|
|
|
bb2081 |
# 3. Neither the name of the JPackage Project nor the names of its
|
|
|
bb2081 |
# contributors may be used to endorse or promote products derived
|
|
|
bb2081 |
# from this software without specific prior written permission.
|
|
|
bb2081 |
#
|
|
|
bb2081 |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
bb2081 |
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
bb2081 |
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
bb2081 |
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
bb2081 |
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
bb2081 |
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
bb2081 |
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
bb2081 |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
bb2081 |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
bb2081 |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
bb2081 |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
bb2081 |
#
|
|
|
bb2081 |
%{?scl:%scl_package objenesis}
|
|
|
bb2081 |
%{!?scl:%global pkg_name %{name}}
|
|
|
bb2081 |
%{!?maven_scl:%global maven_scl_prefix %{nil}}
|
|
|
bb2081 |
|
|
|
bb2081 |
Summary: A library for instantiating Java objects
|
|
|
bb2081 |
Name: %{?scl_prefix}objenesis
|
|
|
bb2081 |
Version: 1.2
|
|
|
bb2081 |
Release: 16.1%{?dist}
|
|
|
bb2081 |
Group: Development/Libraries
|
|
|
bb2081 |
License: ASL 2.0
|
|
|
bb2081 |
URL: http://objenesis.org/
|
|
|
bb2081 |
# svn export http://objenesis.googlecode.com/svn/tags/1_2/ objenesis-1.2
|
|
|
bb2081 |
# tar cfJ objenesis-1.2.tar.xz objenesis-1.2
|
|
|
bb2081 |
Source0: %{pkg_name}-%{version}.tar.xz
|
|
|
bb2081 |
|
|
|
bb2081 |
# Skipping website (requires xsite), this patch is unused atm
|
|
|
bb2081 |
#Patch0: objenesis-website-pom.patch
|
|
|
bb2081 |
|
|
|
bb2081 |
# Remove deps for test scope (unavailable); fix
|
|
|
bb2081 |
# maven-license-plugin groupID to latest version available.
|
|
|
bb2081 |
Patch1: 001-objenesis-fix-build.patch
|
|
|
bb2081 |
Patch2: JRockitInstantntiatorCharacters.patch
|
|
|
bb2081 |
|
|
|
bb2081 |
BuildRequires: jpackage-utils
|
|
|
bb2081 |
BuildRequires: java-devel
|
|
|
bb2081 |
BuildRequires: junit
|
|
|
bb2081 |
BuildRequires: maven-local
|
|
|
bb2081 |
BuildRequires: maven-shade-plugin
|
|
|
bb2081 |
BuildRequires: xpp3-minimal
|
|
|
bb2081 |
BuildRequires: objectweb-asm
|
|
|
bb2081 |
BuildRequires: apache-resource-bundles
|
|
|
bb2081 |
|
|
|
bb2081 |
BuildArch: noarch
|
|
|
bb2081 |
|
|
|
bb2081 |
%description
|
|
|
bb2081 |
Objenesis is a small Java library that serves one purpose: to instantiate
|
|
|
bb2081 |
a new object of a particular class.
|
|
|
bb2081 |
Java supports dynamic instantiation of classes using Class.newInstance();
|
|
|
bb2081 |
however, this only works if the class has an appropriate constructor. There
|
|
|
bb2081 |
are many times when a class cannot be instantiated this way, such as when
|
|
|
bb2081 |
the class contains constructors that require arguments, that have side effects,
|
|
|
bb2081 |
and/or that throw exceptions. As a result, it is common to see restrictions
|
|
|
bb2081 |
in libraries stating that classes must require a default constructor.
|
|
|
bb2081 |
Objenesis aims to overcome these restrictions by bypassing the constructor
|
|
|
bb2081 |
on object instantiation. Needing to instantiate an object without calling
|
|
|
bb2081 |
the constructor is a fairly specialized task, however there are certain cases
|
|
|
bb2081 |
when this is useful:
|
|
|
bb2081 |
* Serialization, Remoting and Persistence - Objects need to be instantiated
|
|
|
bb2081 |
and restored to a specific state, without invoking code.
|
|
|
bb2081 |
* Proxies, AOP Libraries and Mock Objects - Classes can be sub-classed without
|
|
|
bb2081 |
needing to worry about the super() constructor.
|
|
|
bb2081 |
* Container Frameworks - Objects can be dynamically instantiated in
|
|
|
bb2081 |
non-standard ways.
|
|
|
bb2081 |
|
|
|
bb2081 |
|
|
|
bb2081 |
%package javadoc
|
|
|
bb2081 |
Group: Documentation
|
|
|
bb2081 |
Summary: Javadoc for %{pkg_name}
|
|
|
bb2081 |
BuildArch: noarch
|
|
|
bb2081 |
|
|
|
bb2081 |
%description javadoc
|
|
|
bb2081 |
This package contains the API documentation for %{pkg_name}.
|
|
|
bb2081 |
|
|
|
bb2081 |
|
|
|
bb2081 |
# Skipped till xsite avilable in fedora
|
|
|
bb2081 |
#%%package manual
|
|
|
bb2081 |
#Group: Documentation
|
|
|
bb2081 |
#Summary: Documents for %%{name}
|
|
|
bb2081 |
#
|
|
|
bb2081 |
#%%description manual
|
|
|
bb2081 |
#This package contains the %%{name} manual.
|
|
|
bb2081 |
|
|
|
bb2081 |
|
|
|
bb2081 |
%prep
|
|
|
bb2081 |
%setup -q -n %{pkg_name}-%{version}
|
|
|
bb2081 |
#%%patch0 -b .sav0
|
|
|
bb2081 |
%patch1 -p1
|
|
|
bb2081 |
%patch2 -p2
|
|
|
bb2081 |
scl enable %{scl} - <<"EOF"
|
|
|
bb2081 |
# Enable generation of pom.properties (rhbz#1017850)
|
|
|
bb2081 |
%pom_xpath_remove pom:addMavenDescriptor
|
|
|
bb2081 |
%pom_remove_plugin com.mycila.maven-license-plugin:maven-license-plugin
|
|
|
bb2081 |
%pom_remove_plugin com.keyboardsamurais.maven:maven-timestamp-plugin
|
|
|
bb2081 |
EOF
|
|
|
bb2081 |
|
|
|
bb2081 |
|
|
|
bb2081 |
%build
|
|
|
bb2081 |
scl enable %{scl} - <<"EOF"
|
|
|
bb2081 |
# tests are skipped because of missing dependency spring-osgi-test
|
|
|
bb2081 |
%mvn_build -- -Dyear=2009 -Dmaven.test.skip=true
|
|
|
bb2081 |
|
|
|
bb2081 |
# Below is for manual (requires xsite), skipped
|
|
|
bb2081 |
#pushd website
|
|
|
bb2081 |
#mvn-jpp -e \
|
|
|
bb2081 |
# -s ${M2SETTINGS} \
|
|
|
bb2081 |
# -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
|
|
bb2081 |
# -Dmaven2.jpp.depmap.file=%%{SOURCE1} \
|
|
|
bb2081 |
# antrun:run
|
|
|
bb2081 |
#popd
|
|
|
bb2081 |
EOF
|
|
|
bb2081 |
|
|
|
bb2081 |
|
|
|
bb2081 |
%install
|
|
|
bb2081 |
scl enable %{scl} - <<"EOF"
|
|
|
bb2081 |
%mvn_install
|
|
|
bb2081 |
EOF
|
|
|
bb2081 |
|
|
|
bb2081 |
|
|
|
bb2081 |
%files -f .mfiles
|
|
|
bb2081 |
%dir %{_javadir}/%{pkg_name}
|
|
|
bb2081 |
%doc LICENSE.txt
|
|
|
bb2081 |
|
|
|
bb2081 |
%files javadoc -f .mfiles-javadoc
|
|
|
bb2081 |
%doc LICENSE.txt
|
|
|
bb2081 |
|
|
|
bb2081 |
|
|
|
bb2081 |
%changelog
|
|
|
bb2081 |
* Tue Jun 3 2014 Alexander Kurtakov <akurtako@redhat.com> 1.2-16.1
|
|
|
bb2081 |
- Fix dist macro.
|
|
|
bb2081 |
|
|
|
bb2081 |
* Thu Oct 10 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2-16
|
|
|
bb2081 |
- Enable generation of pom.properties
|
|
|
bb2081 |
- Resolves: rhbz#1017850
|
|
|
bb2081 |
|
|
|
bb2081 |
* Sun Sep 08 2013 Mat Booth <fedora@matbooth.co.uk> - 1.2-15
|
|
|
bb2081 |
- Update for latest guidelines, rhbz #992389
|
|
|
bb2081 |
|
|
|
bb2081 |
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-14
|
|
|
bb2081 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
bb2081 |
|
|
|
bb2081 |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-13
|
|
|
bb2081 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
bb2081 |
|
|
|
bb2081 |
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 1.2-12
|
|
|
bb2081 |
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
|
|
|
bb2081 |
- Replace maven BuildRequires with maven-local
|
|
|
bb2081 |
|
|
|
bb2081 |
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-11
|
|
|
bb2081 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
bb2081 |
|
|
|
bb2081 |
* Mon May 14 2012 Guido Grazioli <guido.grazioli@gmail.com> 1.2-10
|
|
|
bb2081 |
- Update to current Java packaging guidelines
|
|
|
bb2081 |
- Remove maven-eclipse-plugin BR
|
|
|
bb2081 |
|
|
|
bb2081 |
* Mon Feb 20 2012 Jiri Vanek <jvanek@redhat.com> 1.2-9
|
|
|
bb2081 |
- Added patch2 - JRockitInstantntiatorCharacters.patch to fix unmappable characters
|
|
|
bb2081 |
- Added build requires apache-resource-bundles and maven-remote-resources-plugin
|
|
|
bb2081 |
|
|
|
bb2081 |
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-8
|
|
|
bb2081 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
bb2081 |
|
|
|
bb2081 |
* Mon May 09 2011 Guido Grazioli <guido.grazioli@gmail.com> 1.2-7
|
|
|
bb2081 |
- Improve project description
|
|
|
bb2081 |
|
|
|
bb2081 |
* Thu Feb 24 2011 Guido Grazioli <guido.grazioli@gmail.com> 1.2-6
|
|
|
bb2081 |
- Build with mvn-rpmbuild
|
|
|
bb2081 |
- Fix License
|
|
|
bb2081 |
- Comment on skipped tests
|
|
|
bb2081 |
|
|
|
bb2081 |
* Fri Feb 04 2011 Guido Grazioli <guido.grazioli@gmail.com> 1.2-5
|
|
|
bb2081 |
- Build with maven 3
|
|
|
bb2081 |
|
|
|
bb2081 |
* Sun Jan 23 2011 Guido Grazioli <guido.grazioli@gmail.com> 1.2-4
|
|
|
bb2081 |
- Drop buildroot and %%clean section
|
|
|
bb2081 |
- Drop use of maven2-settings.xml and jpp-depmap.xml
|
|
|
bb2081 |
- Install unversioned jars
|
|
|
bb2081 |
- Clean up of needed patch and mvn-jpp execution
|
|
|
bb2081 |
|
|
|
bb2081 |
* Tue Jan 18 2011 Guido Grazioli <guido.grazioli@gmail.com> 1.2-3
|
|
|
bb2081 |
- Fix build in rawhide
|
|
|
bb2081 |
|
|
|
bb2081 |
* Sat Dec 04 2010 Guido Grazioli <guido.grazioli@gmail.com> 1.2-2
|
|
|
bb2081 |
- Fix build in rawhide
|
|
|
bb2081 |
- Update to new Java Packaging Guidelines
|
|
|
bb2081 |
|
|
|
bb2081 |
* Mon May 10 2010 Guido Grazioli <guido.grazioli@gmail.com> 1.2-1
|
|
|
bb2081 |
- Update to 1.2
|
|
|
bb2081 |
|
|
|
bb2081 |
* Thu May 06 2010 Guido Grazioli <guido.grazioli@gmail.com> 1.0-1
|
|
|
bb2081 |
- Import from JPackage
|
|
|
bb2081 |
|
|
|
bb2081 |
* Fri Feb 27 2009 Ralph Apel <r.apel at r-apel.de> 0:1.0-2.jpp5
|
|
|
bb2081 |
- BR xpp3-minimal and fix depmap accordingly
|
|
|
bb2081 |
- Disown poms and fragments dirs
|
|
|
bb2081 |
|
|
|
bb2081 |
* Wed Jun 18 2008 Ralph Apel <r.apel at r-apel.de> 0:1.0-1.jpp5
|
|
|
bb2081 |
- First release
|