moving itest to sandbox - NPE's in Maven 1's build and not yet at first

release



git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@126383 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett
2005-01-25 13:55:11 +00:00
parent 5cd10b06df
commit 16e672ead5
5 changed files with 0 additions and 418 deletions

View File

@@ -1 +0,0 @@
target

View File

@@ -1,85 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Rev: 46019 $ $Date: 2004/09/20 22:13:04 $ -->
<project default="default"
xmlns:ant="jelly:ant"
xmlns:j="jelly:core">
<!-- ================= -->
<!-- Global Properties -->
<!-- ================= -->
<!-- Determine what the top-level project root is -->
<j:set var="project.root" value="${pom.parentBasedir().getParentFile().getCanonicalFile()}"/>
<!-- Load the global properties -->
<ant:property file="${project.root}/etc/global.properties"/>
<!-- ==================== -->
<!-- Default Global Goals -->
<!-- ==================== -->
<goal name="default">
<attainGoal name="plugin:install"/>
</goal>
<goal name="build">
<attainGoal name="default"/>
</goal>
<goal name="rebuild">
<attainGoal name="clean"/>
<attainGoal name="build"/>
</goal>
<goal name="clover.wrapper">
<!-- no src/test, don't run clover -->
<!--attainGoal name="clover"/-->
</goal>
<!-- Remove the log files -->
<goal name="clobber"
description="Removes all (non-repository installed) build generated files">
<!-- Let clean:clean do some work first -->
<attainGoal name="clean:clean"/>
<j:jelly xmlns="jelly:ant">
<delete quiet="false" failonerror="false">
<fileset dir="${basedir}">
<include name="maven.log"/>
<include name="velocity.log*"/>
<include name="junit*.properties"/>
</fileset>
</delete>
</j:jelly>
</goal>
<goal name="java-src"
description="Creates an archive containing only java source.">
<ant:mkdir dir="${basedir}/target"/>
<ant:jar destfile="${basedir}/target/${pom.artifactId}-${pom.currentVersion}-java-src.jar">
<fileset dir="${basedir}/src/java"/>
</ant:jar>
</goal>
</project>

View File

@@ -1,207 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $Rev$ $Date: 2004/09/20 22:13:05 $ -->
<project default="itest"
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:maven="jelly:maven"
xmlns:u="jelly:util"
>
<goal name="itest"
description="Run Application Integration Tests"
prereqs="itest:itest"/>
<goal name="itest:prepare-filesystem"
description="Create the needed directory structure">
<mkdir dir="${maven.itest.dest}"/>
<mkdir dir="${maven.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="${context.getVariable('maven.itest.skip') != 'true'}">
<javac
destdir="${maven.itest.dest}"
srcdir="${maven.itest.src}"
excludes="**/package.html"
debug="${maven.compile.debug}"
deprecation="${maven.compile.deprecation}"
optimize="${maven.compile.optimize}">
<classpath>
<pathelement path="${maven.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('maven.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=",">${maven.itest.src.excludes}</u:tokenize>
<j:forEach var="exclude" items="${excludes}">
<ant:exclude name="${exclude}"/>
</j:forEach>
<u:tokenize var="includes" delim=",">${maven.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="${context.getVariable('maven.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="${maven.itest.printSummary}"
failureProperty="maven.itest.failure"
fork="${maven.itest.fork}">
<j:if test="${context.getVariable('maven.itest.jvm') != null}">
<setProperty name="jvm" value="${maven.itest.jvm}"/>
</j:if>
<j:if test="${!context.getVariable('maven.itest.fork').toString().trim().equalsIgnoreCase('no')}">
<setProperty name="dir" value="${maven.itest.dir}"/>
</j:if>
<sysproperty key="basedir" value="${basedir}"/>
<u:tokenize var="listOfProperties" delim=" ">${maven.itest.sysproperties}</u:tokenize>
<j:forEach var="someProperty" items="${listOfProperties}">
<sysproperty key="${someProperty}" value="${context.getVariable(someProperty)}"/>
</j:forEach>
<u:tokenize var="listOfEnv" delim=" ">${maven.itest.envvars}</u:tokenize>
<j:forEach var="someEnv" items="${listOfEnv}">
<env key="${someEnv}" value="${context.getVariable(someEnv)}"/>
</j:forEach>
<u:tokenize var="listOfJvmArgs" delim=" ">${maven.itest.jvmargs}</u:tokenize>
<j:forEach var="somejvmarg" items="${listOfJvmArgs}">
<jvmarg value="${somejvmarg}"/>
</j:forEach>
<formatter type="xml"/>
<formatter type="${maven.itest.format}" usefile="${maven.itest.usefile}"/>
<classpath>
<pathelement location="${maven.itest.dest}"/>
<pathelement location="${maven.build.dest}"/>
<path refid="maven.dependency.classpath"/>
<pathelement path="${plugin.getDependencyPath('junit')}"/>
<j:if test="${!context.getVariable('maven.itest.fork').toString().trim().equalsIgnoreCase('no')}">
<pathelement path="${plugin.getDependencyPath('xml-apis')}"/>
<pathelement path="${plugin.getDependencyPath('xerces')}"/>
</j:if>
</classpath>
<batchtest todir="${maven.itest.reportsDirectory}">
<fileset dir="${maven.itest.src}" includes="${maven.itest.includes}" excludes="{maven.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('maven.itest.failure.ignore') != 'true'}">
<fail message="There was an exception from the tests."/>
</j:if>
</j:if>
<j:if test="${maven.itest.failure}">
<j:if test="${context.getVariable('maven.itest.failure.ignore') != 'true'}">
<fail message="There were test failures."/>
</j:if>
</j:if>
</j:if>
</goal>
<goal name="itest:setup">
<!--hook, customize by including a preGoal for itest:setup-->
</goal>
<goal name="itest:teardown">
<!--hook, customize by including a preGoal for itest:teardown-->
</goal>
<goal name="itest:test-resources"
description="Copy any resources that must be present for the integration tests to run"
prereqs="itest:prepare-filesystem">
<j:if test="${context.getVariable('maven.itest.skip') != 'true'
and context.getVariable('maven.itest.resources') != ''}">
<ant:copy todir="${maven.itest.dest}">
<u:tokenize var="resources" delim=", ">${maven.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>
</project>

View File

@@ -1,28 +0,0 @@
##
## $Rev$ $Date: 2004/09/20 22:13:05 $
##
maven.itest.dir=${basedir}
maven.itest.fork=no
maven.itest.format=brief
maven.itest.jvmargs=
maven.itest.envvars=
maven.itest.jvm=
maven.itest.printSummary=true
maven.itest.usefile = true
maven.itest.dest=${maven.build.dir}/itest-classes
maven.itest.reportsDirectory = ${maven.build.dir}/itest-reports
maven.itest.skip=false
maven.itest.src=${basedir}/src/itest
maven.itest.src.includes=
maven.itest.src.excludes=
maven.itest.includes=
maven.itest.excludes=**/Abstract*.java
maven.itest.sysproperties=
maven.itest.resources=

View File

@@ -1,97 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project>
<pomVersion>3</pomVersion>
<!--extend>${basedir}/../../etc/project.xml</extend-->
<id>maven-itest-plugin</id>
<name>Maven Integration Test Plug-in</name>
<currentVersion>1.0</currentVersion>
<description>Run JUnit tests on artifacts such as jars, ejbs, wars, ears.</description>
<shortDescription>Run JUnit integration tests</shortDescription>
<url>http://maven.apache.org/reference/plugins/itest/</url>
<issueTrackingUrl>http://jira.codehaus.org/browse/MPTEST</issueTrackingUrl>
<siteDirectory>/www/maven.apache.org/reference/plugins/itest/</siteDirectory>
<url>http://maven.apache.org/reference/plugins/itest/</url>
<issueTrackingUrl>http://jira.codehaus.org/browse/MPTEST</issueTrackingUrl>
<siteDirectory>/www/maven.apache.org/reference/plugins/itest/</siteDirectory>
<repository>
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/test/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/itest/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/itest/</url>
</repository>
<versions>
<version>
<id>1.0</id>
<name>1.0</name>
<tag>MAVEN_ITEST_1_0</tag>
</version>
</versions>
<developers>
<developer>
<name>Dain Sundstrom</name>
<id>dain</id>
<email>dsundstrom@gluecode.com</email>
<organization>Gluecode</organization>
</developer>
<developer>
<name>David Blevins</name>
<id>dblevins</id>
<email>dblevins@gluecode.com</email>
<organization>Gluecode</organization>
</developer>
<developer>
<name>David Jencks</name>
<id>djencks</id>
<email>djencks@gluecode.com</email>
<organization>Gluecode</organization>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/java</sourceDirectory>
<unitTestSourceDirectory></unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
</unitTest>
<resources>
<resource>
<directory>.</directory>
<includes>
<include>plugin.jelly</include>
<include>plugin.properties</include>
<include>project.properties</include>
<include>project.xml</include>
</includes>
</resource>
</resources>
</build>
</project>