changed structure of tests to use reactor and allow multiple tests
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116151 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
05a5ec113e
commit
1545d2f6f5
9 files changed
+123
-93
No files matched your search
@@ -1 +1 @@
|
||||
maven.log
|
||||
target
|
||||
@@ -15,35 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<project xmlns:j="jelly:core"
|
||||
xmlns:assert="assert"
|
||||
xmlns:u="jelly:util">
|
||||
|
||||
<goal name="testPlugin" prereqs="test-war">
|
||||
<attainGoal name="clean"/>
|
||||
<project xmlns:util="jelly:util" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:assert="assert" xmlns:ant="jelly:ant">
|
||||
<goal name="testPlugin">
|
||||
<maven:reactor basedir="${basedir}" includes="test*/project.xml" goals="testPlugin" banner="Test" ignoreFailures="false"/>
|
||||
</goal>
|
||||
|
||||
<goal name="test-war">
|
||||
<attainGoal name="war"/>
|
||||
<j:set var="warFile" value="${maven.build.dir}/test-maven-war-plugin.war"/>
|
||||
<j:set var="warDir" value="${maven.build.dir}/test-maven-war-plugin"/>
|
||||
<assert:assertFileExists file="${warFile}"/>
|
||||
<assert:assertFileExists file="${warDir}/WEB-INF/lib/commons-logging-1.0.3.jar"/>
|
||||
|
||||
<!-- check for manifest contents -->
|
||||
<!-- a) Make sure existing manifest gets merged -->
|
||||
<j:set var="unzipDir" value="${maven.build.dir}/unzippedWar"/>
|
||||
<mkdir dir="${unzipDir}"/>
|
||||
<unzip src="${warFile}" dest="${unzipDir}"/>
|
||||
<u:loadText var="manifest" file="${unzipDir}/META-INF/MANIFEST.MF"/>
|
||||
<j:set var="found" value='${manifest.indexOf("Bogus: value") ge 0}'/>
|
||||
<j:if test="${!found}">
|
||||
<fail>Manifest not merged</fail>
|
||||
</j:if>
|
||||
<!-- b) Make sure Class-Path entry is created -->
|
||||
<j:set var="found" value='${manifest.indexOf("Class-Path: commons-logging-1.0.3.jar") ge 0}'/>
|
||||
<j:if test="${!found}">
|
||||
<fail>Class-Path not generated</fail>
|
||||
</j:if>
|
||||
</goal>
|
||||
</project>
|
||||
</project>
|
||||
@@ -1 +0,0 @@
|
||||
maven.war.manifest=${basedir}/src/MANIFEST.MF
|
||||
@@ -19,72 +19,25 @@
|
||||
|
||||
|
||||
<project>
|
||||
<!-- the version of maven's project object model -->
|
||||
|
||||
<pomVersion>3</pomVersion>
|
||||
<!-- a unique name for this project -->
|
||||
|
||||
<id>test-maven-war-plugin</id>
|
||||
<!-- a short but descriptive name for the project -->
|
||||
|
||||
<name>Test project for Maven War Plugin</name>
|
||||
<!-- The version of the project under development, e.g.
|
||||
1.1, 1.2, 2.0-dev -->
|
||||
|
||||
<groupId>maven</groupId>
|
||||
<currentVersion>1.0</currentVersion>
|
||||
<!-- details about the organization that 'owns' the project -->
|
||||
|
||||
<organization>
|
||||
<name>Apache Software Foundation</name>
|
||||
<url>http://jakarta.apache.org/</url>
|
||||
<url>http://www.apache.org/</url>
|
||||
<logo>http://maven.apache.org/images/apache-maven-project.png</logo>
|
||||
</organization>
|
||||
<!-- the year the project started -->
|
||||
|
||||
<inceptionYear>2002</inceptionYear>
|
||||
<!-- the top level of java packages that this project defines
|
||||
e.g. if your project contains the packages
|
||||
com.mycompany.accounts.reports, com.mycompany.accounts.reports
|
||||
and com.mycompany.accounts.utils, the package would be
|
||||
'com.mycompany.accounts' -->
|
||||
|
||||
<package>org.apache.maven.examples.simplewebapp</package>
|
||||
<!-- a short description of what the project does -->
|
||||
|
||||
<shortDescription>A simple web app project</shortDescription>
|
||||
<!-- the project home page -->
|
||||
|
||||
<url>http://maven.apache.org/</url>
|
||||
<!-- the version control repository and http url for online access
|
||||
the connection element has the form:
|
||||
scm:<system>:<system specific connection string> -->
|
||||
|
||||
<inceptionYear>2001</inceptionYear>
|
||||
<package>org.apache.maven</package>
|
||||
<logo>http://maven.apache.org/images/maven.gif</logo>
|
||||
<description>Test for Maven War plugin</description>
|
||||
<shortDescription>Test for Maven War plugin</shortDescription>
|
||||
<url>http://maven.apache.org/reference/plugins/war/</url>
|
||||
<siteDirectory>/www/maven.apache.org/reference/plugins/war/</siteDirectory>
|
||||
<repository>
|
||||
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven/src/examples/simple-webapp</connection>
|
||||
<url>http://cvs.apache.org/viewcvs/maven/src/examples/simple-webapp/</url>
|
||||
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/war/</connection>
|
||||
<url>http://cvs.apache.org/viewcvs/maven-plugins/war/</url>
|
||||
</repository>
|
||||
<!-- any mailing lists for the project -->
|
||||
|
||||
<mailingLists/>
|
||||
<!-- who the developers are for the project -->
|
||||
|
||||
<developers/>
|
||||
<!-- jar files the project is dependent on -->
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<url>http://jakarta.apache.org/commons/logging.html</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
<war.manifest.classpath>true</war.manifest.classpath>
|
||||
</properties>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<!-- build information for the project. We have no source, tests,
|
||||
resources etc
|
||||
-->
|
||||
|
||||
<build/>
|
||||
</project>
|
||||
</project>
|
||||
@@ -0,0 +1,49 @@
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-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 xmlns:j="jelly:core"
|
||||
xmlns:assert="assert"
|
||||
xmlns:u="jelly:util">
|
||||
|
||||
<goal name="testPlugin" prereqs="test-war">
|
||||
<attainGoal name="clean"/>
|
||||
</goal>
|
||||
|
||||
<goal name="test-war">
|
||||
<attainGoal name="war"/>
|
||||
<j:set var="warFile" value="${maven.build.dir}/${pom.artifactId}.war"/>
|
||||
<j:set var="warDir" value="${maven.build.dir}/${pom.artifactId}"/>
|
||||
<assert:assertFileExists file="${warFile}"/>
|
||||
<assert:assertFileExists file="${warDir}/WEB-INF/lib/commons-logging-1.0.3.jar"/>
|
||||
|
||||
<!-- check for manifest contents -->
|
||||
<!-- a) Make sure existing manifest gets merged -->
|
||||
<j:set var="unzipDir" value="${maven.build.dir}/unzippedWar"/>
|
||||
<mkdir dir="${unzipDir}"/>
|
||||
<unzip src="${warFile}" dest="${unzipDir}"/>
|
||||
<u:loadText var="manifest" file="${unzipDir}/META-INF/MANIFEST.MF"/>
|
||||
<j:set var="found" value='${manifest.indexOf("Bogus: value") ge 0}'/>
|
||||
<j:if test="${!found}">
|
||||
<fail>Manifest not merged</fail>
|
||||
</j:if>
|
||||
<!-- b) Make sure Class-Path entry is created -->
|
||||
<j:set var="found" value='${manifest.indexOf("Class-Path: commons-logging-1.0.3.jar") ge 0}'/>
|
||||
<j:if test="${!found}">
|
||||
<fail>Class-Path not generated</fail>
|
||||
</j:if>
|
||||
</goal>
|
||||
</project>
|
||||
@@ -0,0 +1 @@
|
||||
maven.war.manifest=${basedir}/src/MANIFEST.MF
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-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>
|
||||
<id>test-maven-war-plugin-manifest</id>
|
||||
<name>Maven War Plugin 01</name>
|
||||
<groupId>maven</groupId>
|
||||
<currentVersion>1.0</currentVersion>
|
||||
<organization>
|
||||
<name>Apache Software Foundation</name>
|
||||
<url>http://www.apache.org/</url>
|
||||
<logo>http://maven.apache.org/images/apache-maven-project.png</logo>
|
||||
</organization>
|
||||
<inceptionYear>2001</inceptionYear>
|
||||
<package>org.apache.maven</package>
|
||||
<logo>http://maven.apache.org/images/maven.gif</logo>
|
||||
<description>Test for Maven War plugin, tests property maven.war.manifest</description>
|
||||
<shortDescription>test for maven.war.manifest</shortDescription>
|
||||
<url>http://maven.apache.org/reference/plugins/war/</url>
|
||||
<siteDirectory>/www/maven.apache.org/reference/plugins/war/</siteDirectory>
|
||||
<repository>
|
||||
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/war/</connection>
|
||||
<url>http://cvs.apache.org/viewcvs/maven-plugins/war/</url>
|
||||
</repository>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<url>http://jakarta.apache.org/commons/logging.html</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
<war.manifest.classpath>true</war.manifest.classpath>
|
||||
</properties>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user