maven install 报错找不到符号(但是包其实是存在的)

时间:2025-04-19 20:37:45

maven install 报错找不到符号

原因可能是spring-boot-maven-plugin

  • pom文件中,Spring Boot的Maven插件(Spring Boot Maven plugin)能够以Maven的方式为应用提供Spring Boot的支持,即为Spring Boot应用提供了执行Maven操作的可能。Spring Boot Maven plugin能够将Spring Boot应用打包为可执行的jar或war文件,然后以通常的方式运行Spring Boot应用。但是打成的jar包不被用作依赖,可以直接运行。
    <plugins>
        <plugin>
            <groupId></groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>

解决方法

     <plugin>
         <groupId></groupId>
         <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <classifier>execute</classifier>
            </configuration>
      </plugin>