On Wed, Sep 3, 2008 at 7:45 AM, <[EMAIL PROTECTED]> wrote:

> Ivy resolves dependencies and transitive dependencies.
> If my project P depends on A and B and B on C I will get   P --> A, B
> --> C  and download A,B and C.
> In Java projects these are typically jar-files.
>
> Each of these have a license (Default=unspecified).
> Could I get a list of licenses?
>    <ivy:createlist todir="build/licenses"/>
>
>    build/licenses: P.license, A-1.0.license, B-4.7.license,
> C-3.0.0.alpha.license
>
> (I hope it's clear what I mean ...)
>
> I think it's not possible at the moment as these license information are
> not available in a standardized way.
> But if I set up a company repository I could store these information.
>    //repository/A/1.0 : a.jar  ivy.xml   license.txt


Ivy already defines a way to define one or multiple licenses in your Ivy
file. The license isn't considered as an artifact, but you can have a URL to
the license:
http://ant.apache.org/ivy/history/latest-milestone/ivyfile/license.html

The dependency report collects information on the licenses for each
dependency, so doing what you want based on this report is pretty easy. It
would be interesting to make this part of Ivy since it's probably useful for
many. Could you open an issue for that? And maybe we should find a better
name than createlist for the task, sg more specific to license. Why not
<ivy:licenselist todir="build/licenses" /> ?

One thing I realize is that it seems we don't parse this information in
poms, so you won't get license information when you use poms to describe
your modules. I'll fix this.

Xavier

>
>
>
>
> Jan
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Reply via email to