djencks 2004/09/14 17:39:52
Modified: modules/itests maven.xml project.properties
Log:
use brand-new geronimo maven itest plugin
Revision Changes Path
1.13 +32 -220 openejb/modules/itests/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/projects/openejb/scm/openejb/modules/itests/maven.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- maven.xml 12 Sep 2004 17:11:54 -0000 1.12
+++ maven.xml 14 Sep 2004 21:39:52 -0000 1.13
@@ -15,170 +15,14 @@
<attainGoal name="html2xdoc"/>
</preGoal>
- <goal name="default" prereqs="ejb:install,itest"/>
+ <goal name="default" prereqs="ejb:install"/>
- <goal name="itest"
- description="Run Application Integration Tests"
- prereqs="itest:itest"/>
-
- <goal name="itest:prepare-filesystem"
- description="Create the needed directory structure">
- <mkdir dir="${itest.dest}"/>
- <mkdir dir="${itest.reportsDirectory}"/>
- </goal>
-
- <goal name="itest:compile"
- description="Compile the Integration Tests"
-
prereqs="java:compile,java:jar-resources,itest:prepare-filesystem,itest:test-resources">
-
- <j:if test="${itest.skip != 'true'}">
-
- <javac
- destdir="${itest.dest}"
- srcdir="${itest.src}"
- excludes="**/package.html"
- debug="${maven.compile.debug}"
- deprecation="${maven.compile.deprecation}"
- optimize="${maven.compile.optimize}">
-
- <classpath>
- <pathelement path="${itest.dest}"/>
- <pathelement path="${maven.build.dest}"/>
- <path refid="maven.dependency.classpath"/>
- <!-- use this when we turn this into a plugin -->
- <!-- <pathelement
path="${plugin.getDependencyPath('junit')}"/>-->
- <j:if
test="${!context.getVariable('itest.fork').toString().trim().equalsIgnoreCase('no')}">
- <pathelement
path="${plugin.getDependencyPath('xml-apis')}"/>
- <pathelement path="${plugin.getDependencyPath('xerces')}"/>
- </j:if>
- </classpath>
-
- <!--
- |
- | Source Modifications
- |
- -->
- <u:tokenize var="excludes"
delim=",">${itest.src.excludes}</u:tokenize>
- <j:forEach var="exclude" items="${excludes}">
- <ant:exclude name="${exclude}"/>
- </j:forEach>
-
- <u:tokenize var="includes"
delim=",">${itest.src.includes}</u:tokenize>
- <j:forEach var="include" items="${includes}">
- <ant:include name="${include}"/>
- </j:forEach>
-
-
- <!--
- |
- | Standard compile properties
- |
- -->
- <j:if test="${context.getVariable('maven.compile.compilerargs') !=
null}">
- <compilerarg line="${maven.compile.compilerargs}"/>
- </j:if>
-
- <j:if test="${context.getVariable('maven.compile.encoding') !=
null}">
- <setProperty name="encoding" value="${maven.compile.encoding}"/>
- </j:if>
-
- <j:if test="${context.getVariable('maven.compile.executable') !=
null}">
- <setProperty name="executable"
value="${maven.compile.executable}"/>
- </j:if>
-
- <j:if test="${context.getVariable('maven.compile.fork') != null}">
- <setProperty name="fork" value="${maven.compile.fork}"/>
- </j:if>
-
- <j:if test="${context.getVariable('maven.compile.source') != null}">
- <setProperty name="source" value="${maven.compile.source}"/>
- </j:if>
-
- <j:if test="${context.getVariable('maven.compile.verbose') !=
null}">
- <setProperty name="verbose" value="${maven.compile.verbose}"/>
- </j:if>
- </javac>
- </j:if>
-
- </goal>
- <goal name="itest:itest"
- description="Run Application Integration Tests"
- prereqs="itest:compile">
-
- <j:if test="${itest.skip != 'true'}">
-
- <!-- call our setup code -->
- <attainGoal name="itest:setup"/>
-
- <taskdef
- name="junit"
- classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
-
- <j:catch var="exception">
- <junit printSummary="${itest.printSummary}"
- failureProperty="itest.failure"
- fork="${itest.fork}">
-
- <j:if test="${context.getVariable('itest.jvm') != null}">
- <setProperty name="jvm" value="${itest.jvm}"/>
- </j:if>
- <j:if
test="${!context.getVariable('itest.fork').toString().trim().equalsIgnoreCase('no')}">
- <setProperty name="dir" value="${itest.dir}"/>
- </j:if>
- <sysproperty key="basedir" value="${basedir}"/>
- <u:tokenize var="listOfProperties" delim="
">${itest.sysproperties}</u:tokenize>
- <j:forEach var="someProperty" items="${listOfProperties}">
- <sysproperty key="${someProperty}"
value="${context.getVariable(someProperty)}"/>
- </j:forEach>
- <u:tokenize var="listOfEnv" delim="
">${itest.envvars}</u:tokenize>
- <j:forEach var="someEnv" items="${listOfEnv}">
- <env key="${someEnv}"
value="${context.getVariable(someEnv)}"/>
- </j:forEach>
- <u:tokenize var="listOfJvmArgs" delim="
">${itest.jvmargs}</u:tokenize>
- <j:forEach var="somejvmarg" items="${listOfJvmArgs}">
- <jvmarg value="${somejvmarg}"/>
- </j:forEach>
- <formatter type="xml"/>
- <formatter type="${itest.format}" usefile="${itest.usefile}"/>
- <classpath>
- <pathelement location="${itest.dest}"/>
- <pathelement location="${maven.build.dest}"/>
- <path refid="maven.dependency.classpath"/>
- <pathelement path="${plugin.getDependencyPath('junit')}"/>
- <j:if
test="${!context.getVariable('itest.fork').toString().trim().equalsIgnoreCase('no')}">
- <pathelement
path="${plugin.getDependencyPath('xml-apis')}"/>
- <pathelement
path="${plugin.getDependencyPath('xerces')}"/>
- </j:if>
- </classpath>
- <batchtest todir="${itest.reportsDirectory}">
- <fileset dir="${itest.src}" includes="${itest.includes}"
excludes="{itest.excludes}"/>
- </batchtest>
- </junit>
- </j:catch>
- <j:if test="${exception != null}">
- ${exception.printStackTrace()}
- </j:if>
-
- <!-- call our teardown code -->
- <attainGoal name="itest:teardown"/>
-
- <j:if test="${exception != null}">
- <j:if test="${context.getVariable('itest.failure.ignore') !=
'true'}">
- <fail message="There was an exception from the tests."/>
- </j:if>
- </j:if>
-
- <j:if test="${itest.failure}">
- <j:if test="${context.getVariable('itest.failure.ignore') !=
'true'}">
- <fail message="There were test failures."/>
- </j:if>
- </j:if>
-
- </j:if>
+ <postGoal name="ejb:install">
+ <attainGoal name="itest"/>
+ </postGoal>
- </goal>
- <goal name="itest:setup">
+ <preGoal name="itest:setup">
<ant:delete dir="${maven.build.dir}/openejb"/>
<deploy:unpackServer
geronimoVersion="${openejb_version}"
@@ -208,64 +52,16 @@
username="system"
password="manager"
id="org/openejb/Itests"/>
- </goal>
-
- <goal name="itest:teardown">
- <deploy:stop
- uri="deployer:geronimo:jmx:rmi://localhost/jndi/rmi:/JMXConnector"
- username="system"
- password="manager"
- id="org/openejb/Itests"/>
- <deploy:undeploy
- uri="deployer:geronimo:jmx:rmi://localhost/jndi/rmi:/JMXConnector"
- username="system"
- password="manager"
- id="org/openejb/Itests"/>
- <echo message="undeployed ejbs"/>
- <deploy:stopRemoteServer
- uri="deployer:geronimo:jmx:rmi://localhost/jndi/rmi:/JMXConnector"
- username="system"
- password="manager"/>
- <echo message="server has stopped"/>
- </goal>
-
- <goal name="itest:test-resources"
- description="Copy any resources that must be present for the integration
tests to run"
- prereqs="itest:prepare-filesystem">
+ <ant:jar destfile="${basedir}/target/openejb-security-001.jar">
+ <fileset dir="${basedir}/target/classes"
includes="**/security/**/*.class"/>
+ <metainf dir="${basedir}/src/scenarios/001" includes="*.xml"/>
+ </ant:jar>
+
+ <ant:jar destfile="${basedir}/target/openejb-security-002.jar">
+ <fileset dir="${basedir}/target/classes"
includes="**/security/**/*.class"/>
+ <metainf dir="${basedir}/src/scenarios/002" includes="*.xml"/>
+ </ant:jar>
- <j:if test="${itest.skip != 'true' and
context.getVariable('itest.resources') != null}">
- <ant:copy todir="${itest.dest}">
- <u:tokenize var="resources" delim=",
">${itest.resources}</u:tokenize>
- <j:forEach var="resource" items="${resources}">
- <j:set var="dirProperty" value="${resource}.dir"/>
- <j:set var="includesProperty" value="${resource}.includes"/>
- <j:set var="excludesProperty" value="${resource}.excludes"/>
- <ant:fileset
- dir="${context.getVariable(dirProperty)}"
- includes="${context.getVariable(includesProperty)}"
- excludes="${context.getVariable(excludesProperty)}"
- />
- </j:forEach>
- </ant:copy>
- </j:if>
- </goal>
-
-
-
- <preGoal name="itest:itest">
- <ant:jar destfile="${basedir}/target/openejb-security-001.jar">
- <fileset dir="${basedir}/target/classes" includes="**/security/**/*.class"/>
- <metainf dir="${basedir}/src/scenarios/001" includes="*.xml"/>
- </ant:jar>
-
- <ant:jar destfile="${basedir}/target/openejb-security-002.jar">
- <fileset dir="${basedir}/target/classes" includes="**/security/**/*.class"/>
- <metainf dir="${basedir}/src/scenarios/002" includes="*.xml"/>
- </ant:jar>
- </preGoal>
-
-
- <postGoal name="itest:setup">
<deploy:distribute
uri="deployer:geronimo:jmx:rmi://localhost/jndi/rmi:/JMXConnector"
username="system"
@@ -290,7 +86,7 @@
username="system"
password="manager"
id="org/openejb/scenario002"/>
- </postGoal>
+ </preGoal>
<preGoal name="itest:teardown">
<deploy:stop
@@ -313,6 +109,22 @@
username="system"
password="manager"
id="org/openejb/scenario001"/>
+ <deploy:stop
+ uri="deployer:geronimo:jmx:rmi://localhost/jndi/rmi:/JMXConnector"
+ username="system"
+ password="manager"
+ id="org/openejb/Itests"/>
+ <deploy:undeploy
+ uri="deployer:geronimo:jmx:rmi://localhost/jndi/rmi:/JMXConnector"
+ username="system"
+ password="manager"
+ id="org/openejb/Itests"/>
+ <echo message="undeployed ejbs"/>
+ <deploy:stopRemoteServer
+ uri="deployer:geronimo:jmx:rmi://localhost/jndi/rmi:/JMXConnector"
+ username="system"
+ password="manager"/>
+ <echo message="server has stopped"/>
</preGoal>
</project>
1.8 +6 -22 openejb/modules/itests/project.properties
Index: project.properties
===================================================================
RCS file: /home/projects/openejb/scm/openejb/modules/itests/project.properties,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- project.properties 12 Sep 2004 17:11:54 -0000 1.7
+++ project.properties 14 Sep 2004 21:39:52 -0000 1.8
@@ -4,33 +4,17 @@
maven.repo.remote=http://www.openejb.org/maven, http://www.ibiblio.org/maven
-itest.dir=${basedir}
-itest.fork=no
-itest.format=brief
-itest.jvmargs=-Djava.rmi.server.RMIClassLoaderSpi=org.apache.geronimo.rmi.RMIClassLoaderSpiImpl
-Djava.security.auth.login.config=${itest.dest}/login.config
-itest.envvars=
-itest.jvm=
-itest.printSummary=true
-itest.usefile = true
+maven.itest.jvmargs=-Djava.rmi.server.RMIClassLoaderSpi=org.apache.geronimo.rmi.RMIClassLoaderSpiImpl
-Djava.security.auth.login.config=${maven.itest.dest}/login.config
-itest.dest=${maven.build.dir}/itest-classes
-itest.reportsDirectory = ${maven.build.dir}/itest-reports
-itest.skip=false
+maven.itest.includes=**/CmpTestSuite.java,**/BmpTestSuite.java,**/StatefulTestSuite.java,**/StatelessTestSuite.java,**/security/**/*Tests.java
-itest.src=${basedir}/src/itest
-itest.src.includes=
-itest.src.excludes=
-
-itest.includes=**/CmpTestSuite.java,**/BmpTestSuite.java,**/StatefulTestSuite.java,**/StatelessTestSuite.java,**/security/**/*Tests.java
-itest.excludes=**/Abstract*.java
-
-itest.sysproperties=openejb.test.server openejb.test.database
java.security.auth.login.config java.rmi.server.RMIClassLoaderSpi
+maven.itest.sysproperties=openejb.test.server openejb.test.database
java.security.auth.login.config java.rmi.server.RMIClassLoaderSpi
openejb.test.server=org.openejb.test.RemoteTestServer
openejb.test.database=org.openejb.test.AxionTestDatabase
-java.security.auth.login.config=${itest.dest}/login.config
+java.security.auth.login.config=${maven.itest.dest}/login.config
java.rmi.server.RMIClassLoaderSpi=org.apache.geronimo.rmi.RMIClassLoaderSpiImpl
-itest.resources=loginConfig
+maven.itest.resources=loginConfig
loginConfig.dir=${basedir}/src/test-resources
loginConfig.includes=