On 08/01/2011, at 8:59 PM, Ashish Shinde wrote:

> Hi,
> 
> 
> I am using gradle to run a Hadoop map reduce job using JavaExec as
> follows
> 
> 
> task(run, dependsOn: 'jar', type: JavaExec) {
>        classpath sourceSets.main.runtimeClasspath
>        setMain "...."
>        args "$file"
> }
> 
> I need to NOT have build/classes/main in the classpath but rather the
> created jar file. How do I achieve this. 

You could do something like:

classpath jar.archivePath, configurations.runtime


> 
> Also is the the best way to run a java program?

Generally, yes.


--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz

Reply via email to