Hans,

On Mon, Oct 6, 2008 at 9:38 PM, Hans Dockter <[EMAIL PROTECTED]> wrote:
[...]
> See the build.gradle file (from line 199):
>
> http://svn.gradle.codehaus.org/browse/gradle/gradle-core/tags/REL-0.4/build.gradle?r=901

Ok, I see what the issue is, in line 210:     jre(minVersion: "1.5.0",
jdkPreference: 'jdkOnly')
As I have only JREs installed, and never JDKs [after install I 7zip
them, uninstall them and then unpack the 7zip archive where needed,
different versions don't mess with each other, development and runtime
don't mix and windows stays clean], Launch4J doesn't find in the
registry any JDK and fails. From L4J docs: "jdkOnly: Always use a
private JDK runtime (fails if there is no JDK installed)". I suggest
setting "jdkPreference" to either "preferJre" or "preferJdk".

>From the L4J docs I conclude that L4J will never use java.exe from
PATH or environment variables.


[...]
> This is interesting. I wanted to write that we have tried all this and it
> was of no avail (see http://jira.codehaus.org/browse/GRADLE-58). But in fact
> it seems to work yet certain things are still confusing to me.
>
> If I call from my shell 'ant unknownTask', calling echo %ERRORLEVEL%
> afterwards give me 1. If I do the following, an exit value of 0 is printed
> by this Groovy script.
>
> String command = 'ant unknownTask'
> ByteArrayOutputStream outStream = new ByteArrayOutputStream()
> ByteArrayOutputStream errStream = new ByteArrayOutputStream()
> Process proc = ['cmd', '/c', command].execute()
> proc.consumeProcessOutput(outStream, errStream)
> proc.waitFor()
> String output = outStream
> String error = errStream
> println proc.exitValue()
> println "Output"
> println output
> println "Error"
> println error
[...]

Oh no, not ant... that is black magic. ~ four years ago I tried (under
WinXP) to retrieve reliably the result code from ant, without success.
I'll take a look tomorrow on it, as I'm on OSX now. Maybe ant has
improved in the meantime, maybe I've learned more magic in the
meantime.

PS
I've downloaded ant 1.7.1, looked at ant.bat and it hasn't improved.
Tomorrow more.
Beware: ant.cmd from ant distribution is for OS/2, not Windows!

Victor

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to