Gradle fails to execute ant jar task


(Surya) #1

I have an ant project which we are migrating to gradle by just importing the build.xml into the build.gradle and default ant targets are getting properly executed except for jar task. It fails with ‘Could not find default manifest: /org/apache/tools/ant/defaultManifest.mf’ .

Also when I run the build with --no-daemon (assuming daemon is the issue), I face the below issue:

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:buildBeans’.

The following error occurred while executing this line:
java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/Zip$WhenEmpty

Environment : gradle-4.2
Any help is much appreciated.