[Jpackage-commits] dist/mockejb/devel .cvsignore, 1.1, 1.2 mockejb-0.6-beta2.pom, NONE, 1.1 mockejb-0.6-build_properties.patch, NONE, 1.1 mockejb-AllTests.patch, NONE, 1.1 mockejb-MockEjbContext.patch, NONE, 1.1 mockejb-build_mockejb.patch, NONE, 1.1 mockejb.spec, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Wed May 28 21:15:29 CEST 2008


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

Modified Files:
	.cvsignore sources 
Added Files:
	mockejb-0.6-beta2.pom mockejb-0.6-build_properties.patch 
	mockejb-AllTests.patch mockejb-MockEjbContext.patch 
	mockejb-build_mockejb.patch mockejb.spec 
Log Message:
Import from JPP 5.0

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/mockejb/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	28 May 2008 19:15:08 -0000	1.1
--- .cvsignore	28 May 2008 19:15:27 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ mockejb-0.6-beta2.zip

--- NEW FILE: mockejb.spec ---
# Copyright (c) 2000-2008, 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}}}

# If you want tests to be built,
# give rpmbuild option '--with tests'
%define with_tests %{!?_with_tests:0}%{?_with_tests:1}
%define without_tests %{?_without_tests:1}%{!?_without_tests:0}

%define section free

Summary:        Framework for running EJBs
Name:           mockejb
Version:        0.6
Release:        0.b2.3jpp
Epoch:          0
License:        Apache Software License
URL:            http://mockejb.sourceforge.net/
Group:          Development/Libraries/Java
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:%{_vendor}}
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
Source0:        mockejb-0.6-beta2.zip
Source1:        mockejb-0.6-beta2.pom
Patch0:         mockejb-0.6-build_properties.patch
Patch1:         mockejb-AllTests.patch
Patch2:         mockejb-MockEjbContext.patch
Patch3:         mockejb-build_mockejb.patch

BuildRequires:  jpackage-utils >= 0:1.7.4
BuildRequires:  java-devel = 0:1.5.0
BuildRequires:  ant >= 0:1.6.5
BuildRequires:  ant-junit
BuildRequires:  junit
BuildRequires:  asm
BuildRequires:  aspectj
BuildRequires:  cglib
BuildRequires:  easymock
BuildRequires:  jakarta-commons-logging
BuildRequires:  jakarta-cactus
BuildRequires:  jakarta-oro
BuildRequires:  geronimo-j2ee-1.4-apis
BuildRequires:  xdoclet
BuildRequires:  xml-commons-apis
%if %{with_tests}
BuildRequires:  mockrunner
%endif
Requires:  jakarta-commons-logging
%if ! %{gcj_support}
BuildArch:      noarch
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%if %{gcj_support}
BuildRequires:    gnu-crypto
BuildRequires:    java-gcj-compat-devel
Requires(post):   java-gcj-compat
Requires(postun): java-gcj-compat
%endif
Requires(post):    jpackage-utils >= 0:1.7.4
Requires(postun):  jpackage-utils >= 0:1.7.4

%description
MockEJB is a lightweight framework for running EJBs. MockEJB 
implements javax.ejb APIs and creates Home and EJBObject 
implementation classes for your EJBs. Internally, MockEJB relies 
on dynamic proxies and interceptors. MockEJB has two primary usages:
* It allows for running EJBs outside of the container for unit 
  testing.You can run EJBs directly from your favorite IDE with 
  the minimal setup effort.
* It allows for deploying mock EJBs (i.e., mock EJB implementation 
  classes) into the container. Mock EJBs provide very effective way 
  of isolating EJBs under test from the rest of the application. 
  Mock EJBs return predefined test data and can override the actual 
  "non-mock" deployed EJBs. Once again, the purpose of MockEJB is 
  twofold and it works inside and outside of the container. So you 
  can benefit from it even if you continue running all your test 
  classes inside the container using Cactus. 
Additionally, MockEJB comes with the "mock" implementation of non-EJB 
APIs. Currently it provides in-memory JNDI and JMS implementations 
which can be used independently from MockEJB's EJB support.
MockEJB is not a full-blown EJB container. It does not fully implement 
J2EE/EJB specs, however it supports all vital APIs. 

%package javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation
Requires(post):   /bin/rm,/bin/ln
Requires(postun): /bin/rm

%description javadoc
%{summary}.

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

%description manual
%{summary}.

%prep
%setup -q -n %{name}-%{version}-beta2
# remove all binary libs
for j in $(find . -name "*.jar"); do
    mv $j $j.no
done
cp build.properties.sample build.properties

%patch0 -b .sav
%patch1 -b .sav
%patch2 -b .sav
%patch3 -b .sav
cp build.properties build_test.properties

%build
mkdir cactus-lib
pushd cactus-lib
ln -sf $(build-classpath aspectjrt) .
ln -sf $(build-classpath cactus-14/cactus) .
ln -sf $(build-classpath asm/asm) .
%if %{with_tests}
ln -sf $(build-classpath mockrunner/mockrunner) .
ln -sf $(build-classpath mockrunner/mockrunner-ejb) .
%endif
popd
export OPT_JAR_LIST="ant/ant-junit junit"
%if %{with_tests}
export CLASSPATH=$(build-classpath mockrunner)
ant build test
%else
ant -f build_mockejb.xml build
%endif

%install
rm -rf $RPM_BUILD_ROOT

# jars
mkdir -p $RPM_BUILD_ROOT%{_javadir}

cp -p build/%{name}/%{name}-%{version}-beta2/lib/%{name}.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)

# pom and depmap frags
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
%add_to_maven_depmap org.mockejb %{name} %{version} JPP %{name}
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom

# javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr build/%{name}/%{name}-%{version}-beta2/doc/javadoc/* \
    $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
rm -rf build/%{name}/%{name}-%{version}-beta2/doc/{javadoc,java2html}

# manual
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr build/%{name}/%{name}-%{version}-beta2/doc/* \
    $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}

%if %{gcj_support}
export CLASSPATH=$(build-classpath gnu-crypto)
%{_bindir}/aot-compile-rpm
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ "$1" = "0" ]; then
  rm -f %{_javadocdir}/%{name}
fi

%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)
%{_javadir}/*.jar
%doc %{_docdir}/%{name}-%{version}/ReleaseNotes.html
%{_datadir}/maven2
%{_mavendepmapfragdir}
%if %{gcj_support}
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%endif

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

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

%changelog
* Wed Feb 28 2007 Ralph Apel <r.apel at r-apel.de> - 0:0.6-0.b2.3jpp
- First JPP-5.0 release
- Add pom and depmap frags

* Fri Nov 11 2005 Ralph Apel <r.apel at r-apel.de> - 0:0.6-0.b2.2jpp
- Add OPT_JAR_LIST for tests
- Add BuildRequires for asm, aspectj
* Thu Oct 20 2005 Ralph Apel <r.apel at r-apel.de> - 0:0.6-0.b2.1jpp
- First JPackage build

--- NEW FILE: mockejb-0.6-beta2.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.mockejb</groupId>
  <artifactId>mockejb</artifactId>
  <version>0.6-beta2</version>
  <packaging>jar</packaging>
  <name>Mock EJB</name>
  <url>http://mockejb.org</url>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <url>http://mockejb.cvs.sourceforge.net/mockejb/</url>
  </scm>
  <dependencies>
    <dependency>
      <groupId>oro</groupId>
      <artifactId>oro</artifactId>
      <version>2.0.8</version>
    </dependency>
    <dependency>
      <groupId>cglib</groupId>
      <artifactId>cglib-full</artifactId>
      <version>2.0.2</version>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.0.4</version>
    </dependency>
    <dependency>
      <groupId>javax.j2ee</groupId>
      <artifactId>j2ee</artifactId>
      <version>1.4</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
</project>

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/mockejb/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	28 May 2008 19:15:08 -0000	1.1
--- sources	28 May 2008 19:15:27 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ 6639f9fbdb6f9f4c8657dfb42e8a3da4  mockejb-0.6-beta2.zip

--- NEW FILE: mockejb-0.6-build_properties.patch ---
--- build.properties.sav	2005-09-27 10:08:25.000000000 +0200
+++ build.properties	2005-09-27 10:09:10.000000000 +0200
@@ -10,30 +10,30 @@
 # on Ant classpath. The easiest thing to do is to drop them into $ANT_HOME/lib
 
 # Location of Jars
-javalib.dir=/javalib
+javalib.dir=/usr/share/java
 
 # ** Libraries required for MockEJB runtime. 
 # You must define this libraries if you want to build MockEJB
 
 # * Bundled libraries
-commons-logging.jar.path= ${javalib.dir}/commons-logging-1.0.3/commons-logging.jar
-cglib.jar.path=${javalib.dir}/cglib/cglib-full-2.0-RC2.jar
-oro.jar.path=${javalib.dir}/jakarta-oro-2.0.8/jakarta-oro-2.0.8.jar 
+commons-logging.jar.path= ${javalib.dir}/commons-logging.jar
+cglib.jar.path=${javalib.dir}/cglib.jar
+oro.jar.path=${javalib.dir}/oro.jar
 
 # J2EE javax interfaces
-j2ee.jar.path=${javalib.dir}/j2ee-1.3.1/j2ee.jar
+j2ee.jar.path=${javalib.dir}/geronimo-j2ee-1.4-apis.jar
 
 # * Runtime dependencies not bundled with MockEJB
 # Cactus is required only if you use OptionalCactusTestCase
-cactus.lib.dir=${javalib.dir}/jakarta-cactus-13-1.5/lib
-cactus.jar.path=${cactus.lib.dir}/cactus-1.5.jar
+cactus.lib.dir=cactus-lib
+cactus.jar.path=${cactus.lib.dir}/cactus.jar
 
 # Junit should be on Ant classpath. Explicit reference is only needed for Javadoc
-junit.jar.path = ${javalib.dir}/junit-3.8.1/junit.jar 
+junit.jar.path = ${javalib.dir}/junit.jar 
 
 
 # Required to build documentation
-j2h.jar.path = ${javalib.dir}/java2html-1.3.1/j2h.jar  
+j2h.jar.path = ${javalib.dir}/java2html.jar
 
 # end of libraries required to build MockEJB
 
@@ -46,14 +46,14 @@
 mockejb.lib.dir=build/mockejb/mockejb-0.6-beta2/lib
 
 #MySQL JDBC driver for unit tests. 
-jdbc.driver.path=${javalib.dir}/mysql-connector-java-3.0.7-stable/mysql-connector-java-3.0.7-stable-bin.jar
+jdbc.driver.path=${javalib.dir}/mysql-connector-java.jar
 
 # We use easymock to create mock session beans
-easymock.lib.dir=${javalib.dir}/easymock1.0.1b
+easymock.lib.dir=${javalib.dir}
 easymock.jar.path=${easymock.lib.dir}/easymock.jar
 
 # we use MockUserTranaction from mockrunner
-mocrunner.lib.dir=${javalib.dir}/mockrunner-0.2.8/lib
+mocrunner.lib.dir=${javalib.dir}
 mockrunner.jar.path=${mocrunner.lib.dir}/mockrunner.jar
 
 
@@ -63,7 +63,7 @@
 
 # Following jars should be available in Xdoclet lib dir:
 # xdoclet-bea-module.jar xdoclet-web-module-1.2b2.jar xdoclet-ejb-module.jar xdoclet-1.2b2.jar xdoclet-xjavadoc-1.2b2.jar
-xdoclet.lib.dir=${javalib.dir}/xdoclet-1.2b2/lib
+xdoclet.lib.dir=${javalib.dir}/xdoclet
 
 # Path to cactus.properties
 cactus.properties.path=${basedir}/testfiles

--- NEW FILE: mockejb-build_mockejb.patch ---
--- build_mockejb.xml.sav	2007-02-28 17:21:36.000000000 +0100
+++ build_mockejb.xml	2007-02-28 17:22:32.000000000 +0100
@@ -127,6 +127,7 @@
         	</classpath>
         </javadoc>
 
+<!--
         <taskdef name="java2html" classname="com.java2html.Java2HTMLTask">
             <classpath>
                 <pathelement location="${j2h.jar.path}" />
@@ -139,7 +140,7 @@
             header="true" footer="false" destination="${build.j2h.dir}">
             <fileset dir="${src.dir}" includes="**/*.java" excludes="**/TempTest*" />
         </java2html>
-
+-->
         <copy todir="${build.doc.dir}" >
             <fileset dir="${doc.dir}" includes="*.html *.jpg *.css *." />
         </copy>

--- NEW FILE: mockejb-AllTests.patch ---
--- src/org/mockejb/test/AllTests.java.sav	2005-10-20 18:44:54.000000000 +0200
+++ src/org/mockejb/test/AllTests.java	2005-10-20 18:45:19.000000000 +0200
@@ -25,7 +25,7 @@
         suite.addTestSuite( HelloWorldTest.class  );
         suite.addTestSuite( FundamentalsTest.class  );
         suite.addTestSuite( MDBTest.class );
-        suite.addTestSuite( JdbcAndTransactionTest.class );
+//        suite.addTestSuite( JdbcAndTransactionTest.class );
         suite.addTestSuite( StatefulTest.class );
         // Entity tests
         suite.addTestSuite( EntityBeanTest.class );

--- NEW FILE: mockejb-MockEjbContext.patch ---
--- src/org/mockejb/MockEjbContext.java.sav	2004-09-04 11:58:58.000000000 +0200
+++ src/org/mockejb/MockEjbContext.java	2007-02-28 17:16:26.000000000 +0100
@@ -12,6 +12,8 @@
 import javax.transaction.SystemException;
 import javax.transaction.UserTransaction;
 
+import javax.xml.rpc.handler.MessageContext;
+
 /**
  * Provides implementation of <code>javax.ejb.SessionContext</code>,
  * <code>javax.ejb.MessageDrivenContext</code> and <code>javax.ejb.EntityContext</code>
@@ -224,6 +226,13 @@
     	this.primaryKey = primaryKey;
     }
 
+    public MessageContext getMessageContext() throws IllegalStateException {
+        throwMethodNotImplemented( "getMessageContext");
+        return null;
+    }
 
-
+    public TimerService getTimerService() throws IllegalStateException {
+        throwMethodNotImplemented( "getTimerService");
+        return null;
+    }
 }




More information about the JPackage-commits mailing list