Files
maven-plugins/checkstyle/src/plugin-test/maven.xml
T
2004-06-29 12:45:58 +00:00

41 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:util="jelly:util"
xmlns:j="jelly:core"
xmlns:x="jelly:xml"
xmlns:assert="assert">
<goal name="testPlugin" prereqs="clean,test-checkstyle-report">
</goal>
<goal name="test-checkstyle-report">
<attainGoal name="checkstyle:report"/>
<assert:assertFileExists file="${maven.gen.docs}/checkstyle-report.xml"/>
<!-- Verify that there are no Boolean instantiation errors as we have
excluded the SuppressionFilterSample java file from the checks -->
<util:file var="rawFile" name="${maven.build.dir}/checkstyle-raw-report.xml"/>
<x:parse var="doc" xml="${rawFile}"/>
<x:if select="$doc//file[contains(@name,'SuppressionFilterSample')]/error[contains(@source,'IllegalInstantiationCheck')]">
<fail>Should not have generated an error as we have a suppression filter set on SuppressionFilterSample</fail>
</x:if>
</goal>
</project>