Files
maven-plugins/rar/src/plugin-test/maven.xml
T
2004-06-17 02:51:53 +00:00

56 lines
1.9 KiB
XML

<!--
/*
* 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">
<goal name="testPlugin" prereqs="test-rar">
<attainGoal name="clean"/>
</goal>
<goal name="test-rar">
<attainGoal name="rar"/>
<!-- tests that the ear is generated -->
<assert:assertFileExists file="${maven.build.dir}/test-maven-rar-plugin-1.0-SNAPSHOT.rar"/>
<!-- unzip the ear and look for the jars -->
<j:set var="rarFile"
value="${maven.build.dir}/test-maven-rar-plugin-1.0-SNAPSHOT.rar"/>
<j:set var="unzipDir" value= "${maven.build.dir}/rartest"/>
<mkdir dir="${unzipDir}"/>
<unzip src="${rarFile}" dest="${unzipDir}"/>
<!-- check for commons-logging -->
<assert:assertFileExists file="${unzipDir}/commons-logging-1.0.3.jar"
msg="commons logging was not bundled"/>
<!-- check for the LICENSE -->
<assert:assertFileExists file="${unzipDir}/META-INF/LICENSE.txt"
msg="License file not bundled"/>
<!-- check for the ra.xml -->
<assert:assertFileExists file="${unzipDir}/META-INF/ra.xml"
msg="ra.xml missing"/>
<!-- check for the fooserver-ra.xml -->
<assert:assertFileExists file="${unzipDir}/META-INF/fooserver-ra.xml"
msg="fooserver deployment descriptor missing"/>
</goal>
</project>