diff --git a/src/it/check-no-missing-classes/invoker.properties b/src/it/check-no-missing-classes/invoker.properties new file mode 100644 index 00000000..d5da9063 --- /dev/null +++ b/src/it/check-no-missing-classes/invoker.properties @@ -0,0 +1,4 @@ +invoker.goals = clean compile spotbugs:check + +# The expected result of the build, possible values are "success" (default) and "failure" +invoker.buildResult = success diff --git a/src/it/check-no-missing-classes/pom.xml b/src/it/check-no-missing-classes/pom.xml new file mode 100644 index 00000000..0776017c --- /dev/null +++ b/src/it/check-no-missing-classes/pom.xml @@ -0,0 +1,74 @@ + + + + 4.0.0 + + spotbugs-maven-plugin.it + check-no-missing-classes + testing + check-no-missing-classes + jar + + 1.8 + 1.8 + + + + org.junit.jupiter + junit-jupiter-engine + @junitVersion@ + + + + + + com.github.spotbugs + spotbugs-maven-plugin + @pom.version@ + + true + false + @spotbugsTestDebug@ + High + + + + run-analysis + process-classes + + spotbugs + + + + process-results + + verify + + + + + + + diff --git a/src/it/check-no-missing-classes/src/main/java/test/App.java b/src/it/check-no-missing-classes/src/main/java/test/App.java new file mode 100644 index 00000000..e4c6765b --- /dev/null +++ b/src/it/check-no-missing-classes/src/main/java/test/App.java @@ -0,0 +1,14 @@ +package test; + +import org.junit.jupiter.api.Assertions; + +/** + * Hello world! + */ +public class App { + + public static void main( String[] args ) { + Assertions.assertNull(args); + System.out.println( "Hello World!" ); + } +} diff --git a/src/it/check-no-missing-classes/verify.groovy b/src/it/check-no-missing-classes/verify.groovy new file mode 100644 index 00000000..14f621bf --- /dev/null +++ b/src/it/check-no-missing-classes/verify.groovy @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2006-2020 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 + * + * https://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. + */ + +// Check no missing classes + +File buildLog = new File( basedir, 'build.log' ) +assert !buildLog.text.contains( 'The following classes needed for analysis were missing' ) +