[Jpackage-commits] dist/objenesis/devel .cvsignore, 1.1, 1.2 objenesis-jpp-depmap.xml, NONE, 1.1 objenesis-settings.xml, NONE, 1.1 objenesis-website-pom.patch, NONE, 1.1 objenesis.spec, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Fri Feb 27 18:16:07 CET 2009


Update of /home/projects/jpackage/cvs/dist/objenesis/devel
In directory ryu.zarb.org:/tmp/cvs-serv22668/devel

Modified Files:
	.cvsignore sources 
Added Files:
	objenesis-jpp-depmap.xml objenesis-settings.xml 
	objenesis-website-pom.patch objenesis.spec 
Log Message:
Import objenesis into devel

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/objenesis/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	27 Feb 2009 17:15:29 -0000	1.1
--- .cvsignore	27 Feb 2009 17:16:05 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ objenesis-1.0.tar.gz

--- NEW FILE: objenesis-website-pom.patch ---
--- website/pom.xml.sav0	2007-02-15 00:04:12.000000000 +0100
+++ website/pom.xml	2008-06-18 12:19:55.000000000 +0200
@@ -30,8 +30,9 @@
         <groupId>org.codehaus.xsite</groupId>
         <artifactId>xsite-maven-plugin</artifactId>
         <configuration>
-          <siteMapPath>${project.build.directory}/content/sitemap.xml</siteMapPath>
-          <skinPath>${basedir}/skin/skin.html</skinPath>
+          <sitemapPath>sitemap.xml</sitemapPath>
+          <skinPath>../../skin/skin.html</skinPath>
+          <sourceDirectoryPath>${project.build.directory}/content</sourceDirectoryPath>
           <outputDirectoryPath>${project.build.directory}/xsite</outputDirectoryPath>
         </configuration>
       </plugin>      

--- NEW FILE: objenesis.spec ---
# Copyright (c) 2000-2009, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}

%define section free

Summary:        Instantiate New Object
Name:           objenesis
Version:        1.0
Release:        2%{dist}
Epoch:          0
Group:          Development/Libraries
License:        MIT
URL:            http://objenesis.googlecode.com/svn/docs/index.html
Source0:        %{name}-%{version}.tar.gz
# svn export http://objenesis.googlecode.com/svn/tags/1_0/ objenesis-1.0

Source1:        %{name}-jpp-depmap.xml
Source2:        %{name}-settings.xml

Patch0:         objenesis-website-pom.patch

BuildRequires:  jpackage-utils >= 0:1.7.5
BuildRequires:  java-devel >= 0:1.5.0
BuildRequires:  junit
BuildRequires:  maven2 >= 0:2.0.7
BuildRequires:  maven2-plugin-antrun
BuildRequires:  maven2-plugin-assembly
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-eclipse
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-site
BuildRequires:  maven2-plugin-source
BuildRequires:  maven2-plugin-surefire
BuildRequires:  xpp3-minimal
BuildRequires:  xsite


Requires:       java >= 0:1.5.0

Requires(post):   jpackage-utils >= 0:1.7.5
Requires(postun): jpackage-utils >= 0:1.7.5

%if %{gcj_support}
BuildRequires:          java-gcj-compat-devel
Requires(post):         java-gcj-compat
Requires(postun):       java-gcj-compat
%endif
%if ! %{gcj_support}
BuildArch:      noarch
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

%description
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 overcomes these restrictions by bypassing 
the constructor on object instantiation.
Needing to instantiate an object without calling the 
constructor is a fairly specialized task, however there 
are certain cases when this is useful:
* Serialization, Remoting and Persistence - 
  Objects need to be instantiated and restored to a 
  specific state, without invoking code.
* Proxies, AOP Libraries and Mock Objects - Classes can be 
  subclassed without needing to worry about the super() 
  constructor.
* Container Frameworks - Objects can be dynamically 
  instantatiated in non-standard ways.


%package javadoc
Group:          Development/Documentation
Summary:        Javadoc for %{name}

%description javadoc
%{summary}.

%package manual
Group:          Development/Documentation
Summary:        Documents for %{name}

%description manual
%{summary}.

%prep
%setup -q 

%patch0 -b .sav0

%build
cp %{SOURCE2} maven2-settings.xml

sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/repository</url>|g" maven2-settings.xml
sed -i -e "s|<url>__JAVADIR_PLACEHOLDER__</url>|<url>file://`pwd`/external_repo</url>|g" maven2-settings.xml
sed -i -e "s|<url>__MAVENREPO_DIR_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/repository</url>|g" maven2-settings.xml
sed -i -e "s|<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/maven2/plugins</url>|g" maven2-settings.xml
sed -i -e "s|<url>__ECLIPSEDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/eclipse/plugins</url>|g" maven2-settings.xml

mkdir external_repo
ln -s %{_javadir} external_repo/JPP

export M2SETTINGS=$(pwd)/maven2-settings.xml
export MAVEN_REPO_LOCAL=`pwd`/m2_repo/repository

mvn-jpp -e \
        -s ${M2SETTINGS} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        -Dmaven2.jpp.depmap.file=%{SOURCE1} \
        install javadoc:javadoc

pushd website
mvn-jpp -e \
        -s ${M2SETTINGS} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        -Dmaven2.jpp.depmap.file=%{SOURCE1} \
        antrun:run xsite:run
popd

%install
rm -rf $RPM_BUILD_ROOT

# jars
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms

install -m 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}-parent.pom
%add_to_maven_depmap org.objenesis objenesis-parent %{version} JPP %{name}-parent

install -m 644 main/target/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
install -m 644 main/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
%add_to_maven_depmap org.objenesis objenesis %{version} JPP %{name}

install -m 644 tck/target/%{name}-tck-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-tck-%{version}.jar
install -m 644 tck/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}-tck.pom
%add_to_maven_depmap org.objenesis objenesis-tck %{version} JPP %{name}-tck

(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

# javadoc
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/main
cp -pr main/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/main
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/tck
cp -pr tck/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/tck
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

# manual
install -d -m 0755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr website/target/xsite/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
cp -p LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/

%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%postun
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%files
%defattr(0644,root,root,0755)
%doc %{_docdir}/%{name}-%{version}/LICENSE.txt
%dir %{_javadir}/%{name}
%{_javadir}/*.jar
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*
%if %{gcj_support}
%attr(-,root,root) %dir %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}-%{version}.jar.*
%endif

%files javadoc
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name}

%files manual
%defattr(0644,root,root,0755)
%{_docdir}/%{name}-%{version}

%changelog
* Fri Feb 27 2009 Ralph Apel <r.apel at r-apel.de> 0:1.0-2.jpp5
- BR xpp3-minimal and fix depmap accordingly
- Disown poms and fragments dirs

* Wed Jun 18 2008 Ralph Apel <r.apel at r-apel.de> 0:1.0-1.jpp5
- First release


Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/objenesis/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	27 Feb 2009 17:15:29 -0000	1.1
--- sources	27 Feb 2009 17:16:05 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ 152edbc0b81d214ea679b926ab075db5  objenesis-1.0.tar.gz

--- NEW FILE: objenesis-settings.xml ---
<settings>
	<profiles>
		<profile>
			<id>JPP</id>
			<repositories>
				<repository>
					<id>internal</id>
					<layout>jpp</layout>
					<url>__JPP_URL_PLACEHOLDER__</url>
				</repository>
				<repository>
					<id>external</id>
					<layout>jpp</layout>
					<url>__JAVADIR_PLACEHOLDER__</url>
				</repository>
				<repository>
					<id>local</id>
					<layout>jpp</layout>
					<url>__MAVENREPO_DIR_PLACEHOLDER__</url>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
					<id>plugins-internal</id>
					<name>plugins-internal</name>
					<layout>jpp</layout>
					<url>__JPP_URL_PLACEHOLDER__</url>
				</pluginRepository>
				<pluginRepository>
					<id>plugins-external</id>
					<name>plugins-external</name>
					<layout>jpp</layout>
					<url>__JAVADIR_PLACEHOLDER__</url>
				</pluginRepository>
				<pluginRepository>
					<id>plugins-maven</id>
					<name>plugins-maven</name>
					<layout>jpp</layout>
					<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>
				</pluginRepository>
			</pluginRepositories>
		</profile>
	</profiles>
	<activeProfiles>
		<activeProfile>JPP</activeProfile>
	</activeProfiles>
</settings>

--- NEW FILE: objenesis-jpp-depmap.xml ---
<dependencies>
   <dependency>
      <maven>
         <groupId>freemarker</groupId>
         <artifactId>freemarker</artifactId>
         <version>2.3.9</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>freemarker</artifactId>
         <version>2.3.6</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>xpp3</groupId>
         <artifactId>xpp3_min</artifactId>
         <version>1.1.4c</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>xpp3-minimal</artifactId>
         <version>1.1.3.8</version>
      </jpp>
   </dependency>

</dependencies>




More information about the JPackage-commits mailing list