inter project artifact resolving

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

inter project artifact resolving

pieter.smit
hi Hans,

I did the following:

subprojects {
    task("${project.name}_jar").destinationDir = file(distDir)
}

This causes the libs task to output all my subprojects generated jars in a single directory of my choice, which was what I intended. What I didn't intend was the following:

missing artifact com.bla#bla-interface;1.0!bla-interface.jar:
        /home/pieter/development/trunk/bla-interface/build/bla-interface-1.0.jar file does not exist
        /home/pieter/development/trunk/bla-interface/build/distributions/bla-interface-1.0.jar file does not exist
        published ivy to /home/pieter/development/trunk/build-resolver/com.bla/bla-interface/1.0/ivys/ivy.xml

this happens when I try to compile a project with the depency:

 dependencies {
        compile project(':bla-interface'),
 }

How can I tell the resolver to find the project in my new location?

Thanks,
Pieter
Reply | Threaded
Open this post in threaded view
|

Re: inter project artifact resolving

pieter.smit
hi,

To get round this problem, i currently do the following:

subprojects {
  //task("${project.name}_jar").destinationDir = file(distDir)
 
  task('libs').doLast { task ->
    task.project.task('libs').archiveNames.each {archiveName ->
       ant.copy(file: task.project."$archiveName".archivePath, todir: distDir, overwrite:true)
    }
  }
}
Reply | Threaded
Open this post in threaded view
|

Re: inter project artifact resolving

hans_d
Administrator
In reply to this post by pieter.smit
Hi Pieter,

On Jul 10, 2008, at 11:52 AM, pieter.smit wrote:

>
> hi Hans,
>
> I did the following:
>
> subprojects {
>     task("${project.name}_jar").destinationDir = file(distDir)
> }
>
> This causes the libs task to output all my subprojects generated  
> jars in a
> single directory of my choice, which was what I intended. What I  
> didn't
> intend was the following:
>
> missing artifact com.bla#bla-interface;1.0!bla-interface.jar:
>
> /home/pieter/development/trunk/bla-interface/build/bla-
> interface-1.0.jar
> file does not exist
>
> /home/pieter/development/trunk/bla-interface/build/distributions/
> bla-interface-1.0.jar
> file does not exist
>         published ivy to
> /home/pieter/development/trunk/build-resolver/com.bla/bla-interface/
> 1.0/ivys/ivy.xml
>
> this happens when I try to compile a project with the depency:
>
>  dependencies {
>         compile project(':bla-interface'),
>  }
>
> How can I tell the resolver to find the project in my new location?

I gonna have a look into this as soon as possible. Sorry for the delay.

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: inter project artifact resolving

hans_d
Administrator
In reply to this post by pieter.smit
Hi Pieter,

On Jul 10, 2008, at 1:15 PM, pieter.smit wrote:

>
> hi,
>
> To get round this problem, i currently do the following:
>
> subprojects {
>   //task("${project.name}_jar").destinationDir = file(distDir)
>
>   task('libs').doLast { task ->
>     task.project.task('libs').archiveNames.each {archiveName ->
>        ant.copy(file: task.project."$archiveName".archivePath, todir:
> distDir, overwrite:true)
>     }
>   }
> }

Sorry. I had no time yet to have a look at this. Could you please  
file a Jira with fix for 0.3?

BTW: Thanks for your code for generating eclipse files :)

- Hans

> --
> View this message in context: http://www.nabble.com/inter-project- 
> artifact-resolving-tp18379446p18380662.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
>
>

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: inter project artifact resolving

hans_d
Administrator
In reply to this post by pieter.smit
Hi Pieter,

On Jul 10, 2008, at 11:52 AM, pieter.smit wrote:

>
> hi Hans,
>
> I did the following:
>
> subprojects {
>     task("${project.name}_jar").destinationDir = file(distDir)
> }

distDir is a property defined by the Java plugin. This is already of  
type file and points to build/distributions. You might have  
overwritten it with a string property of your own. Than of course the  
file(distDir) statements makes sense.

>
> This causes the libs task to output all my subprojects generated  
> jars in a
> single directory of my choice, which was what I intended. What I  
> didn't
> intend was the following:
>
> missing artifact com.bla#bla-interface;1.0!bla-interface.jar:
>
> /home/pieter/development/trunk/bla-interface/build/bla-
> interface-1.0.jar
> file does not exist
>
> /home/pieter/development/trunk/bla-interface/build/distributions/
> bla-interface-1.0.jar
> file does not exist
>         published ivy to
> /home/pieter/development/trunk/build-resolver/com.bla/bla-interface/
> 1.0/ivys/ivy.xml
>
> this happens when I try to compile a project with the depency:
>
>  dependencies {
>         compile project(':bla-interface'),
>  }
>
> How can I tell the resolver to find the project in my new location?

dependencies {
    artifactPatterns << someRootPath + "/[artifact]-[revision](-
[classifier]).[ext]")
}

Sorry for not having a look at this earlier (never mention that you  
have found a work around ;))

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: inter project artifact resolving

hans_d
Administrator
Hi Pieter,

On Jul 18, 2008, at 7:45 PM, Hans Dockter wrote:

> Hi Pieter,
>
> On Jul 10, 2008, at 11:52 AM, pieter.smit wrote:
>
>>
>> hi Hans,
>>
>> I did the following:
>>
>> subprojects {
>>     task("${project.name}_jar").destinationDir = file(distDir)
>> }
>
> distDir is a property defined by the Java plugin. This is already  
> of type file and points to build/distributions. You might have  
> overwritten it with a string property of your own. Than of course  
> the file(distDir) statements makes sense.
>
>>
>> This causes the libs task to output all my subprojects generated  
>> jars in a
>> single directory of my choice, which was what I intended. What I  
>> didn't
>> intend was the following:
>>
>> missing artifact com.bla#bla-interface;1.0!bla-interface.jar:
>>
>> /home/pieter/development/trunk/bla-interface/build/bla-
>> interface-1.0.jar
>> file does not exist
>>
>> /home/pieter/development/trunk/bla-interface/build/distributions/
>> bla-interface-1.0.jar
>> file does not exist
>>         published ivy to
>> /home/pieter/development/trunk/build-resolver/com.bla/bla-
>> interface/1.0/ivys/ivy.xml
>>
>> this happens when I try to compile a project with the depency:
>>
>>  dependencies {
>>         compile project(':bla-interface'),
>>  }
>>
>> How can I tell the resolver to find the project in my new location?
>
> dependencies {
>    artifactPatterns << someRootPath + "/[artifact]-[revision](-
> [classifier]).[ext]")
> }

Gradle should find archives automatically when they change the  
destination dir. I consider the above still a work around. Could you  
please file a Jira for improving this?

- Hans

>
> Sorry for not having a look at this earlier (never mention that you  
> have found a work around ;))
>
> - Hans
>
> --
> Hans Dockter
> Gradle Project lead
> http://www.gradle.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: inter project artifact resolving

pieter.smit
Thanks,

Jira issue filed, GRADLE-164.

Pieter
Reply | Threaded
Open this post in threaded view
|

Re: inter project artifact resolving

hans_d
Administrator
In reply to this post by hans_d
Hi Pieter,

On Jul 18, 2008, at 7:45 PM, Hans Dockter wrote:
>
>>
>> How can I tell the resolver to find the project in my new location?
>
> dependencies {
>    artifactPatterns << someRootPath + "/[artifact]-[revision](-
> [classifier]).[ext]")
> }
>

has this worked for you?

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





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

    http://xircles.codehaus.org/manage_email