“Failed to create task or type antlib:org.apache.maven.artifact.ant:mvn” error in Ant

前端 未结 2 1872
长发绾君心
长发绾君心 2021-01-12 01:11

Ant build failed to run while running the ant tasks in build.xml. I got the following error in the console:

<         


        
2条回答
  •  囚心锁ツ
    2021-01-12 01:44

    1. Create a lib directory in the root of your project and place the maven-ant-tasks.jar file inside it.
    2. Include the import statement in your build.xml

    
    
    

    The above steps solved my issue. Hope this is helpful to someone in the future.

    Alternate solutions,

    • You can also place the maven-ant-tasks.jar file under the ANT_HOME/lib folder to solve this issue.
    • Or you could have it under the eclipse plugins folder.
      eg. eclipse\plugins\org.apache.ant_1.8.3.v20120321-1730\lib

提交回复
热议问题