Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Spotbugs mvn插件缺少分析所需的类_Java_Maven_Gitlab_Spotbugs - Fatal编程技术网

Java Spotbugs mvn插件缺少分析所需的类

Java Spotbugs mvn插件缺少分析所需的类,java,maven,gitlab,spotbugs,Java,Maven,Gitlab,Spotbugs,我正在使用GitLab CI/CD管道,该管道使用Maven的spotbugs插件;当我试着跑的时候 mvn compile spotbugs:check 我得到以下错误: [INFO] Fork Value is true [java] The following classes needed for analysis were missing: [java] org.junit.jupiter.api.Assertions 上一个命令在我的本地计算机上运行,但在Gi

我正在使用GitLab CI/CD管道,该管道使用Maven的spotbugs插件;当我试着跑的时候

mvn compile spotbugs:check 
我得到以下错误:

[INFO] Fork Value is true
    [java] The following classes needed for analysis were missing:
    [java]   org.junit.jupiter.api.Assertions
上一个命令在我的本地计算机上运行,但在GitLab runner上失败。我想这可能是一个配置问题(即:pom.xml文件出错),但我不太确定如何修复它

下面是pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.7.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>accessing-data-mysql</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>accessing-data-mysql</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- junit 5, unit test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>4.3.2.RELEASE</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>2.2.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-rest</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency> 
            <groupId>org.springframework</groupId> 
            <artifactId>spring-webmvc</artifactId> 
            <version>${spring.version}</version> 
        </dependency> 
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>

            <!-- Maven checkstyle plugin  -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <configLocation>google_checks.xml</configLocation>
                    <encoding>UTF-8</encoding>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <linkXRef>false</linkXRef>
                </configuration>
            </plugin>
            <!-- Maven spotbugs plugin  -->
            <plugin>
              <groupId>com.github.spotbugs</groupId>
              <artifactId>spotbugs-maven-plugin</artifactId>
              <version>3.1.12.2</version>
            </plugin>
            <!-- Maven PMD plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.12.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.12</version>
                <executions>
                <execution>
                    <goals>
                        <goal>integration-test</goal>
                        <goal>verify</goal>
                    </goals>
                </execution>
            </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                  <execution>
                    <id>add-integration-test-source</id>
                    <phase>generate-test-sources</phase>
                    <goals>
                      <goal>add-test-source</goal>
                    </goals>
                    <configuration>
                      <sources>
                        <source>src/integration-test/java</source>
                      </sources>
                    </configuration>
                  </execution>
                  <execution>
                    <id>add-integration-test-resource</id>
                    <phase>generate-test-resources</phase>
                    <goals>
                      <goal>add-test-resource</goal>
                    </goals>
                    <configuration>
                      <resources>
                        <resource>
                          <directory>src/integration-test/resources</directory>
                        </resource>
                      </resources>
                    </configuration>
                  </execution>
                </executions>
            </plugin>

        </plugins>

        <!-- target/docker-spring-boot.jar -->
        <finalName>docker-spring-boot</finalName>

    </build>

</project>

4.0.0
org.springframework.boot
spring启动程序父级
2.1.7.发布
com.example
访问mysql数据
0.0.1-快照
访问mysql数据
SpringBoot的演示项目
1.8
org.springframework.boot
spring引导启动器数据jpa
org.springframework.boot
SpringBootStarterWeb
mysql
mysql连接器java
运行时
org.springframework.boot
弹簧起动试验
测试
朱尼特
朱尼特
4.12
测试
org.springframework
弹簧试验
4.3.2.1发布
测试
org.hamcrest
汉克雷斯特图书馆
1.3
测试
com.jayway.jsonpath
json路径
2.2.0
测试
org.springframework.boot
弹簧靴起动器执行器
org.springframework.boot
弹簧启动启动器数据rest
org.springframework.boot
spring引导配置处理器
真的
org.springframework
SpringWebMVC
${spring.version}
org.springframework.boot
springbootmaven插件
org.apache.maven.plugins
maven checkstyle插件
3.1.0
google_checks.xml
UTF-8
真的
真的
假的
com.github.spotbug
spotbugs maven插件
3.1.12.2
org.apache.maven.plugins
maven pmd插件
3.12.0
org.apache.maven.plugins
maven故障保护插件
2.12
集成测试
验证
org.codehaus.mojo
构建助手maven插件
添加集成测试源
生成测试源
添加测试源
src/集成测试/java
添加集成测试资源
生成测试资源
添加测试资源
src/集成测试/资源
docker弹簧靴

感谢您的帮助。

显示您的pom.xml。这是: