Files
maven-plugins/ear/src/plugin-test/srcResourcesTest/maven.xml
T
2005-01-10 09:20:47 +00:00

47 lines
1.5 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:assert="assert"
xmlns:util="jelly:util"
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
default="testPlugin">
<goal name="testPlugin" prereqs="test-ear">
<attainGoal name="clean"/>
</goal>
<goal name="test-ear" prereqs="ear:init">
<!-- first makes sure the project was set correctly -->
<j:if test="${context.getVariable('maven.ear.src') != context.getVariable('maven.ear.resources')}">
<ant:fail>Properties maven.ear.src and maven.ear.resources must be set with the same value</ant:fail>
</j:if>
<j:set var="failed" value="true"/>
<j:catch>
<attainGoal name="ear"/>
<j:set var="failed" value="false"/>
</j:catch>
<j:if test="${not failed}">
<ant:fail>ear goal should have failed</ant:fail>
</j:if>
</goal>
</project>