0

I currently have the following target in ant script for a Java project:

<target name="axis wrapper">
        <java classname="org.apache.axis.wsdl.WSDL2Java"
              fork="true">
            <classpath>
                <fileset dir="lib">
                    <include name="**/*.jar"/>
                </fileset>
            </classpath>
            <arg line="-D ${web.loc}/Hello.asmx?WSDL -o src"/>
        </java>
    </target>

I have been trying to convert it to Gradle but keep running into the following error from using ant.taskdef:

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':genWrapperClasses'.

    No main class specified

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

When I try to create a Gradle task based on the Ant target I get an error that tells me some part of the jars are missing.

I was wondering if anyone knew the best way to either invoke ant from Gradle or make a custom Gradle task that would make it work.

Note:

  • All of the proper .jar files are in the right place
  • I have set my environment variable for Axis set to point to the directory where those jars are located.
  • Regarding the `No main class specified` error, see [Gradle to execute Java class](http://stackoverflow.com/questions/21358466/gradle-to-execute-java-class-without-modifying-build-gradle). – Chad Nouis Jul 08 '16 at 14:37
  • I'd give the [wsdl2java gradle plugin](https://github.com/nilsmagnus/wsdl2java) a shot that likely provides the functionality you are looking for. – Benjamin Muschko Jul 12 '16 at 01:13

0 Answers0