Good idea, I'll give a try.
Thank you Mathias.
2011/1/24 Mathias Kalb <[email protected]>:
> Hi,
>
> you can create a template file for your script and create a CopyTask which
> replace the token (%CLASSPTAH%) with the Classpath from your gradle
> configuration.
>
> Look at 15.6.2 of the Use Guide.
> http://www.gradle.org/0.9.2/docs/userguide/working_with_files.html#sec:copying_files
>
>
> Template:
> set Classpath=%CLASSPATH%
> ...
>
> That's not tested but I think it should work.
>
> regards,
> Mathias Kalb
>
>
> Am 24.01.2011 17:02, schrieb zebulon:
>>
>> Hello
>> Gradle enables to build a jar with a manifest that contains the
>> classpath and the main class, which is just fine if you want to run
>> your program with the -jar option (java -jar mylib.jar). However, I d
>> like to run my jar from a script file that explicitly lists the
>> classpath and the main class to start with. How could we do that in
>> gradle? the output should be typically written in a file that would
>> contain something like that:
>>
>> set Classpath=lib1.jar;lib2.jar; etc...
>> set MainClass="mymainClass"
>> java -cp %claspath% %myMainClass%
>>
>> This is more or less the same but having this written in a file
>> enables easy addition of classpaths or command line options (specific
>> to seploiement environnement) on the fly by overwriting the file,
>> instead of looking deeply inside the Manifest of the jar...
>>
>> Thanks for any hep.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email