views:

361

answers:

3

Hello!

My automated build and tests are up and running, everything works fine. Im am using hudson and the pde build (configured with pluginbuilder).

When the build succeeds everything is fine, the hudson ball turns blue and so on.

But when something goes wrong and the build or tests fail - the Hudson job does NOT end. I am invoking the headless pde build using this batch command:

cd\
cd %ECLIPSEDIR%

echo START PDE BUILD!

eclipsec -data %ECLIPSEWS% -application org.eclipse.ant.core.antRunner -buildfile %BUILDFILE%

Why does it not stop when the antRun is over?

A: 

You might want to check the raw job output to see if the batch file is waiting for command line input.

sal
A: 

We use an ant file to launch antrunner through Hudson and it fails the way you would expect it to when there is a problem.

Here is a simple example that should do what you want:

<target name="antrunner">
    <java classname="org.eclipse.core.launcher.Main" fork="true" failonerror="true">
        <classpath>
            <fileset dir="${env.ECLIPSEDIR}/plugins" includes="org.eclipse.equinox.launcher_*.jar" />
        </classpath>
        <arg value="-application" />
        <arg value="org.eclipse.ant.core.antRunner" />
        <arg value="-buildfile" />
        <arg value="${env.BUILDFILE}" />
        <arg value="-data" />
        <arg value="${env.ECLIPSEWS}" />
    </java>
</target>

rancidfishbreath
A: 

Which Eclipse version do you use? Eclipse 3.6 has bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=299327. Antrunner exits always with 0, even when it fails. Thus, build failures are not detected.

Martin