On 12/11/2010, at 8:58 PM, richardm wrote:

> 
> Hi, 
> 
> I'm running Grade 0.9-rc-1 and have a multi-project build.  One of my
> projects should create a WAR file and an EAR file (which includes the WAR). 
> My ear task (which I copied off another thread in the mail list) always
> fails with the following error: Could not determine the dependencies of task
> ':appletgenerator:ear'.  
> 
> I added dependsOn: 'war' to the ear task but get the same error with or
> without this.  Have I missed something?
> 
> project(':appletgenerator') {  
>    apply plugin: 'war'
>    apply plugin: 'java'
>    dependencies.compile project(':gui')
> 
>    war {
>        from 'gui.war'        

This looks a little suspicious. This will include a file called 'gui.war' from 
the project directory of the 'appletgenerator' project. Is this what you 
intended?


>    }
> 
>   task ear(dependsOn: 'war', type: Zip) {                      
>       archiveName = 'myApp.ear'
>       from war

This actually includes the contents of the war, rather than the war itself. You 
might use something like this instead:

from war.archivePath


>       // include the jars from the runtime classpath
>       from sourceSets.main.runtimeClasspath.collect { it.isFile() }
>   }      
> }
> 
> Thanks.
> -- 
> View this message in context: 
> http://gradle.1045684.n5.nabble.com/Dependancy-error-with-EAR-task-tp3261740p3261740.html
> Sent from the gradle-user mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 


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

Reply via email to