Home » Java » java – In pom.xml maven-antrun-plugin not found-Exceptionshub

java – In pom.xml maven-antrun-plugin not found-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

I am following this blog to build my backend in spring boot and frontend in Reactjs. When I cloned the code, it is working fine. But in pom.xml it shows error message as maven-antrun-plugin not found. Why is it so? How do I fix it?

    <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>
How to&Answers:

Along with artifactId, you should specify groupId as org.apache.maven.plugins and version as 1.8