tags:

views:

165

answers:

2

I've written an Ant build.xml file which obtains a number of source files via WSDL and compiles them. These have been working on an old, now destroyed (and therefore unavailable for comparison), system but the build process isn't completing on this newer, faster system.

The relevant section of the build file looks like this (updated):

<target name="obtain-files">
  <java classname="org.apache.axis.wsdl.WSDL2Java">
    <arg line="--all --server-side --skeletonDeploy --factory --wrapArrays --output src ${srcurl}" />
  </java>
</target>

<target name="compile" depends="obtain-files">
  <javac srcdir="${src}" destdir="${build}" verbose="yes" />
</target>

The .java files are downloaded/created via the WSDL service successfully, however after that point Ant simply stops & returns to the commandline.

Versions of the relevant apps:

# java -version
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16, mixed mode)
# javac -version
javac 1.6.0_14
# ant -version
Apache Ant version 1.6.5 compiled on January 6 2007

I'm assuming that there's a problem with javac that Ant isn't passing back. Is there any way I can get some debugging information from javac? I've tried adding a <record /> tag to the target but that doesn't give any more information than running ant -v does.

Any other suggestions would be great, also!

A: 

The problem is not well formulated, it is necessary to get more details to understand the problem.

  1. Does the the WSDL2Java generates the .java files in the output directory?
  2. Is the javac been called? (it will just return if it doesn't find any to compile, the above question)
  3. What is the error message you get? (or the output of the ant -v)
Jonas Fagundes
1. Yes, as stated the "files are downloaded via the WSDL service successfully", or created if that's how WSDL works.2. I can't tell - that's the problem I'm facing.3. None - that's what the problem is.
digitala
Ye, you download the .wsdl but you need to generate the .java from them.You should verify if they are been generated. Verify the output directory of the wsdl2java and see if they are there as expected.After this point we can look to the javac execution.
Jonas Fagundes
Yes, the java source files **are** created/generated by the WSDL service. They're there ready to compile, and can be compiled by manually calling `javac`.
digitala
Verify the ${src} variable that you are using in the javac task. In the wsdl2java is making the output just to src (string not a variable). Make sure that wsdl2java is generating where you expected and that javac is getting from the same place.
Jonas Fagundes
Did it solve your problem? What is the situation now?
Jonas Fagundes
A: 

Manually installing Java, Ant, and Apache Axis fixed the problems. I'm not entirely sure what the errors were, but I do know that after Axis generated the .java files in the $src directory it would die silently, causing Ant to exist silently also. javac never got called.

digitala