AntBuilder fails to create folder with odd name


(Scott Palmer) #1

I have a script that builds a lot of projects. Some of them are NetBeans Ant-based projects, many are custom things that launch Visual Studio to build a VS solution file. When I run my build from my root folder so all of the projects build (these are NOT gradle sub-projects, the subfolders are scanned manually by the build script and builds are fired off via GradleLauncher.newInstance)

Ultimately what fails (after several projects that succeed) is an ant build using Gradle’s built-in Ant support… log shows this: … Task ‘:-do-jar-with-libraries-create-manifest’ has not declared any outputs, assuming that it is out-of-date.

FAILURE: Build failed with an exception.

  • Where: Script ‘C:\Users\scott.palmer\dev\KayakSDK\BuildScripts\Defaults.gradle’ line: 757

  • What went wrong: Execution failed for task ‘:-do-jar-with-libraries-create-manifest’. > Could not create C:\PathToMyProject\SomeJavaProject\build\null1120807625

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

BUILD FAILED

Total time: 8 mins 39.898 secs

If I re-run the build for that project it succeeds. It’s the strange path that it is trying to create in the build folder that I don’t understand: “null1120807625”

The numbers may change, but it always fails this way… but not always on the same project. I’m running Gradle 1.0-rc3


(Scott Palmer) #2

Correction… it seems re-running the build makes it fail the same way.


(Scott Palmer) #3

The ant task that is failing looks like this:

<target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
        <touch file="${tmp.manifest.file}" verbose="false"/>
    </target>

It’s from a standard Netbeans project. So I guess that means that somehow “tmp.manifest.file” isn’t being initialized properly for this project.


(Scott Palmer) #4

“Real” Ant has no problem running the same project. There is no “build” folder yet at the time this target runs, it seems it’s purpose is to create the build folder… but it fails only in Gradle for some reason.