evgeny-goldin / gradle-plugins

Gradle plugins
http://evgeny-goldin.com/wiki/Gradle_Plugins
Other
27 stars 4 forks source link

AboutPlugin fails on Windows if a module path contains spaces #2

Closed ben-manes closed 12 years ago

ben-manes commented 12 years ago

The AboutPlugin fails to inject the text file on Windows if the Gradle module's directory contains spaces on the path. It fails with the following cause,

* What went wrong:
Execution failed for task ':Addepar Global Aggregator:about'.
> Unable to rename old file (C:\Users\Daniel\Projects\AMP\Addepar Global Aggrega
tor\build\libs\Addepar Global Aggregator.jar) to temporary file

Everything works great under Linux and OS X so this seems to be an escaping issue on Windows.

This legacy project will be deleted in 2 weeks time, so its not a blocker.

evgeny-goldin commented 12 years ago

Hi Ben, thanks for reporting this. Can you run Gradle with "-S" flag to get the stack trace?

ben-manes commented 12 years ago

https://gist.github.com/3102041

Oddly I was able to create the jar in a previous run, so it failed on another module.

I don't think this is your issue anymore, so I'm closing the issue.

The root problem may be an edge case not covered by the fatJar plugin. Due to legacy reasons (originally jar was from Eclipse build; no build system) we have to explode all dependencies and assemble a jar for deployment. On Windows a file copy fails due the lack of case-sensitive file-system (a LICENSE file and license/LICENCE file conflict due to the inability to create the directory). Due to poor AOP hacks the more correct OneJar approach isn't compatible and I haven't cleaned these out yet. I had introduced Maven to provide basic sanity and its assembly plugin (and your copy plugin) warn instead of failing. I'm now finishing a migration to Gradle, which I'm less familiar with, due to its superior multi-module support.

Sorry for the noise.