java - 在 pom.xml 中找不到 maven-antrun-plugin

标签 java reactjs plugins maven-3

我正在关注这个blog在 Spring Boot 中构建后端,在 Reactjs 中构建前端。当我克隆代码时,它工作正常。但在 pom.xml 中,它显示错误消息为 maven-antrun-plugin not find 。为什么会这样呢?我该如何修复它?

    <plugin>
        <artifactId>maven-antrun-plugin</artifactId> // error not found
        <executions>
           <execution>
              <phase>generate-resources</phase>
              <configuration>
                 <target>
                    <copy todir="${project.build.directory}/classes/static">
                       <fileset dir="${project.basedir}/frontend/build" />
                    </copy>
                 </target>
              </configuration>
              <goals>
                 <goal>run</goal>
              </goals>
           </execution>
        </executions>
     </plugin>

最佳答案

除了artifactId,您还应该将groupId指定为org.apache.maven.plugins,将版本指定为1.8

关于java - 在 pom.xml 中找不到 maven-antrun-plugin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60270429/

相关文章:

java - 如何将 OAuth 2 token 映射到资源服务器中的 UserDetails 对象?

java - 为什么 Java ActionListener 不工作?

ReactJS:为什么我不应该改变嵌套状态?

plugins - 关闭 SwiftUI ColorPicker : "Connection to plugin interrupted while in use" 时出错

ruby-on-rails - 在 Redmine 中自动创建自定义字段

java - 使用 Java 谈论网络上的一些项目?

java - 如何使用H2数据库获取DataIntegrityViolationException上的constraintName?

javascript - 使用 reactjs 上传文件并处理 C :/fakepath/file

gulp - 在 gulp 中使用 browserify-css

c# - 在 VS 2012 中将 C# 类粘贴为 JSON