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

In pom.xml maven-antrun-plugin not found

我正在关注此 blog 以在 spring 引导中构建我的后端,并在 Reactjs 中构建前端。当我克隆代码时,它工作正常。但是在 pom.xml 中,它显示错误消息为找不到 maven-antrun-plugin。为什么会这样?我该如何解决?

    <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