It's all about the answers!

Ask a question

Question about Java build execution environment

Harry Koehnemann (30115238) | asked Oct 11 '07, 11:38 a.m.

I'm having problems calling javadoc from a Jazz build - a local build - where ant invokes javadoc.exe externally. Looks like a problem with the build execution envirnment calling javadoc.exe. Can someone explain the execution environment - path, classpath, etc - defined for a build execution and then is it different for local and remote builds. I also had some problems with the Java compiler even though a JAVA_HOME is set and is in the PATH. The ecj.jar fixed it, but seems like a hack when both Eclipse and my PATH have a JDK available.

FYI, this is simply the Hello example from the buildsystem with a javadoc command added. The abrupt end and garbage at the end are from the log. I am not as much concerned about getting javadoc to work as I am understanding the build execution environment. Builds require many 3rd-party tools for building and analysis and I am curious how they can are integrated into Jazz builds. Failing on javadoc (and javac) is a concern.

Many thanks.

C:\java\jazz\workspace-admin\JazzBuildTest\build.xml:91: Javadoc failed: CreateProcess: javadoc.exe -d C:\java\jazz\workspace-admin\JazzBuildTest\javadoc -doctitle "<h1>Hello</h1>" -bottom "<i>Copyright © 2007 Hello.</i>" -classpath C:\java\jazz\jazz0.6M2a\client\eclipse\plugins\org.apache.ant_1.7.0.v200706080842\lib\ant-launcher.jar;C:\java\jazz\jazz0.6M2a\buildsystem\ecj.jar;C:\java\jazz\jazz0.6M2a\buildsystem\buildtoolkit\;C:\java\jazz\jazz0.6M2a\buildsystem\buildtoolkit\;C:\java\jazz\jazz0.6M2a\buildsystem\buildtoolkit\;C:\java\jazz\jazz0.6M2a\buildsystem\buildtoolkit\;C:\java\jazz\jazz0.6M2a\buildsystem\buildtoolkit\;C:\java\jazz\jazz0.6M2a\buildsystem\buildtoolkit\;C:\java\jazz\jazz0.6M2a\buildsystem\buildtoolkit\ ?~

2 answers

permanent link
Ryan Manwiller (1.3k1) | answered Oct 12 '07, 10:55 a.m.
I will need more information to fully answer your question. Are you using
the javadoc ant task, or invoking javadoc some other way? You say
externally, does this mean with the ant "exec" task? It would help to see
the full build.xml.

I did successfully add a javadoc ant task invocation to the M3 example build
at /jazz/buildsystem/buildtoolkit/examples/compile-ant-test/build.xml (in
the "compile" target) like this:

<javadoc sourcefiles="src/*.java" destdir="doc">


<pathelement path="${junitJar}" />



The execution environment is this:

You run the jazz build engine application. The engine fetches a request from
the respository and then spawns an ant process to run your build file. So,
the OS environment like PATH, etc should be inherited as you'd expect.

In M2, things were a little confusing because the "new build definition"
wizard was launching the build engine for you (using a jre). This is no
longer happening in M3. So, it should be clear when you launch the build
engine what JVM you're using (since you're starting it yourself on the
command line).

To do certain things in your script, you may need the build engine to be
running under a JDK (not jre). I suggest running the build engine at the
command line like this (assuming a JDK is on the path):

cd /jazz/buildsystem/buildengine/eclipse
jbe -repository http://localhost:9080/jazz -engineId yourEngineId -userId
yourUser -pass yourPass -sleeptime 1
Note: the sleeptime of 1 second is useful for testing, but the default of 30
seconds is probably better in real use.

As far as local vs. remote, if you're invoking the build engine yourself on
the command line, there should be no difference. The build engine app is
just a client.

permanent link
Harry Koehnemann (30115238) | answered Oct 13 '07, 2:38 p.m.
Thanks. I am using the ant task and am on M2, not M3,
which might explain the problem. I said externally because
it looks like the ant javadoc tasks launches javadoc.exe
externally and was concerned because ant tasks for other
tools will likely do the same.

Your ant task didn't work for me - same exception. If I
take the command from the exception and run on the commands
line, it works, though:

javadoc.exe -d C:\java\jazz\workspace-admin\JazzBuildTest\javadoc -classpath C:\java\jazz\buildsystem\junit.jar -version -author C:\java\jazz\workspace-admin\JazzBuildTest\src\hello\*.java.

So it sounds like an env problem and I am guessing it is
related to M2 local build. And that if I used a remote
engine it might work - I'll try that. Thanks for the
information and help.

Your answer

Register or to post your answer.