On 03/05/2011, at 12:55 AM, StormeHawke wrote:

> This is probably something really simple but I can't find the answer
> anywhere.  I have a project that looks like what I've got at the bottom of
> this post.  I have it set up where certain projects depend on the coreAll
> configuration, others only on the plain jar task.  This is working fine. 
> What I need to know is how to specifically call that configuration from the
> command line, ie something along the lines of "gradle :api:core:jar
> --configuration=coreAll".
> 
> Any suggestions?

You can build the artifacts of a configuration using the build<ConfigName> 
task. For example:

gradle buildCoreAll

Have a look at http://gradle.org/current/docs/userguide/java_plugin.html#N11783 
in the 'lifecycle' tasks table.


> 
> 
> 
>> project(':api:core') {
>>      version = 1.0
>> 
>>      configurations {
>>              coreAll
>>      }
>> 
>>      dependencies {
>>              compile project(':api:util')
>>              compile project(':api:schema')
>> 
>>              runtime 'jaxen:jaxen:1.1.1@jar'
>>              runtime 'mysql:mysql-connector-java:5.1.13@jar'
>>      }
>> 
>>      jar {
>>              baseName = 'core'
>>              dependsOn classes
>>              from sourceSets.main.classes
>>              exclude('net/intellidata/core/**/*Impl*')
>>      }
>>      
>>      task caaJar(type: Jar) {
>>              baseName = 'caa' 
>>              dependsOn classes 
>>              from sourceSets.main.classes
>>              include('net/intellidata/core/**/CAA*Impl*')
>>      }
>> 
>>      task cacJar(type: Jar) {
>>              baseName = 'cac' 
>>              dependsOn classes 
>>              from sourceSets.main.classes
>>              include('net/intellidata/core/**/CAC*Impl*')
>>      }
>> 
>>      task carJar(type: Jar) {
>>              baseName = 'car' 
>>              dependsOn classes 
>>              from sourceSets.main.classes
>>              include('net/intellidata/core/**/CAR*Impl*')
>>      }
>> 
>>      task casJar(type: Jar) {
>>              baseName = 'cas' 
>>              dependsOn classes 
>>              from sourceSets.main.classes
>>              include('net/intellidata/core/**/CAS*Impl*')
>>      }
>> 
>>      artifacts {
>>              coreAll jar, caaJar, cacJar, carJar, casJar
>>      }
>> 
> 
> --
> View this message in context: 
> http://gradle.1045684.n5.nabble.com/how-to-specify-a-jar-configuration-at-command-line-tp4364894p4364894.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 Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to