diff --git a/src/it/encoding-aux-classpath/invoker.properties b/src/it/encoding-aux-classpath/invoker.properties new file mode 100644 index 00000000..45e8f54e --- /dev/null +++ b/src/it/encoding-aux-classpath/invoker.properties @@ -0,0 +1,4 @@ +invoker.goals = clean compile spotbugs:check -X + +# The expected result of the build, possible values are "success" (default) and "failure" +invoker.buildResult = success diff --git "a/src/it/encoding-aux-classpath/lib/k\303\266nig/empty.jar" "b/src/it/encoding-aux-classpath/lib/k\303\266nig/empty.jar" new file mode 100644 index 00000000..09b21e20 Binary files /dev/null and "b/src/it/encoding-aux-classpath/lib/k\303\266nig/empty.jar" differ diff --git a/src/it/encoding-aux-classpath/pom.xml b/src/it/encoding-aux-classpath/pom.xml new file mode 100644 index 00000000..9056c539 --- /dev/null +++ b/src/it/encoding-aux-classpath/pom.xml @@ -0,0 +1,56 @@ + + + + + 4.0.0 + + com.github.spotbugs.spotbugs-maven-plugin.it + common + testing + ../common.xml + + encoding-aux-classpath + encoding-aux-classpath + jar + + UTF-8 + + + + empty + empty + 1.0 + system + ${project.basedir}/lib/könig/empty.jar + + + + + + com.github.spotbugs + spotbugs-maven-plugin + + true + false + @spotbugsTestDebug@ + High + + + + + diff --git a/src/it/encoding-aux-classpath/verify.groovy b/src/it/encoding-aux-classpath/verify.groovy new file mode 100644 index 00000000..d7e39fd9 --- /dev/null +++ b/src/it/encoding-aux-classpath/verify.groovy @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2006-2007 the original author or authors. + * + * 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. + */ + +File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') +assert !spotbugsHtml.exists() + +File spotbugXdoc = new File(basedir, 'target/spotbugs.xml') +assert spotbugXdoc.exists() + +File spotbugXml = new File(basedir, 'target/spotbugsXml.xml') +assert spotbugXml.exists() + +println '**********************************' +println "Checking Spotbugs Native XML file" +println '**********************************' + +path = new XmlSlurper().parse(spotbugXml) + +allNodes = path.depthFirst().collect{ it } +def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +println "BugInstance size is ${spotbugsXmlErrors}" + + + +println '***************************' +println "Checking xDoc file" +println '***************************' + +def path = new XmlSlurper().parse(spotbugXdoc) + +xNodes = path.depthFirst().collect{ it } +def xdocErrors = xNodes.findAll {it.name() == 'BugInstance'}.size() +println "BugInstance size is ${xdocErrors}" + +assert xdocErrors == spotbugsXmlErrors +