Hi Thomas,
Thanks for your detailed message and multiple scenarios.
The reason i need this kind of folder structure is this is the main build
which is using more than 200 libraries,among them (150 are inhouse-libraries
and rest are third-party libraries.)
I cannot put all 200 jar's in single folder, and i want to put them in
different sub folder so that i can call the folder when ever and where its
necessary.
--Kumar
Laun Thomas (CI/TMP) wrote:
>
> Hello Kumar,
>
> I have a similar use case. I see the following options:
>
> 1. Use two retrieve operations
>
> The first retrieve will download your project stuff, the second retrieve
> will download your third-party stuff:
>
> <ivy:retrieve
> pattern="${build.lib}/project/[conf]/[artifact]-[revision].[ext]
> conf="!third-party" .../>
> <ivy:retrieve
> pattern="${build.lib}/project/[conf]/[artifact]-[revision].[ext]
> conf="third-party".../>
>
> 2. Move the files after download
>
> As an alternative, you download everything with one retrieve to separate
> directories. As a second step, you move all directories that are not
> third-party below the subdir "project".
>
> 3. Extra attribute
>
> If you control the pom/ivy file of the project artifacts and if they are
> always downloaded to the same subdirectory, you could add an extra
> attribute in the module descriptor (aka ivy.xml) which defines the
> directory. You can then use the extra attribute in your retrieve pattern.
>
> <ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
> <info ... e:target="project/inhouse-project1" .../>
> ...
> </ivy-module>
>
> You can then retrieve your artifacts like this (note the missing e: before
> target):
>
> <ivy:retrieve pattern="${build.lib}/[target]/[artifact]-[revision].[ext]
> .../>
>
> This last approach does not need configurations for defining the
> destination.
>
> You can find the documentation for extra attributes here:
> http://ant.apache.org/ivy/history/latest-milestone/concept.html
>
> 4. Simplify your lib directory
>
> Finally, there is the question why do you need the subfolders at all?
> Can't you structure your lib directory in a more simple fashion? At least
> think about if you really need such a complex structure.
>
> Mit freundlichen Grüßen / Best regards
>
> Thomas Laun
>
> Robert Bosch GmbH
> Telemedicine Platform (CI/TMP)
> Postfach 11 27
> 71301 Waiblingen
> GERMANY
> www.bosch.com
>
> Tel. +49 (711) 811-3607689
> PC-Fax +49 (711) 811-51849753
> [email protected]
>
> Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
> Aufsichtsratsvorsitzender: Hermann Scholl; Geschäftsführung: Franz
> Fehrenbach, Siegfried Dais;
> Bernd Bohr, Rudolf Colm, Volkmar Denner, Gerhard Kümmel, Wolfgang Malchow,
> Peter Marks,
> Peter Tyroller; Uwe Raschke
>
>
> -----Ursprüngliche Nachricht-----
> Von: malepati [mailto:[email protected]]
> Gesendet: Wednesday, August 12, 2009 8:42 PM
> An: [email protected]
> Betreff: Re: Design Library Folder Structure
>
>
> I have tired different configurations as follows:
> <configurations>
> <conf name="inhouse-project1.jar" description="lists all
> tcs dependency jars"/>
> <conf name="inhouse-project2.jar" description="lists all
> tcs dependency jars"/>
> <conf name="third-party" description="lists all
> tcs_common
> jars"/>
> <configurations/>
>
> <dependency org="webprojects" name="module1" rev="LATEST"
> conf="inhouse-project1->default"/>
> <dependency org="webprojects" name="module2" rev="LATEST"
> conf="inhouse-project1->default"/>
> <dependency org="apache" name="apache" rev="LATEST"
> conf="third-party->default"/>
>
> now my project library folder structure is:
> .libs
> !
> !_inhouse-project1
> ! !_module1.jar
> !_inhouse-project2
> ! !_module2.jar
> !_third-party
> !_apache.jar
>
> but i am looking for :
> .libs
> !_project
> ! !
> ! !_inhouse-project1
> ! ! !_module1.jar
> ! !_inhouse-project2
> ! !_module2.jar
> !_third-party
> !_apache.jar
>
> Please share your views.
>
> --Kumar
>
>
> topher1120 wrote:
>>
>> Hi Kumar,
>> To me, it depends on if you are talking about a structure in your build,
>> or
>> in the ivy cache. If in the ivy cache, I'm not sure it's possible. If
>> you
>> want that structure in your build, I think it's possible using different
>> configurations and the <ivy:retrieve> Ant task. In my ivy.xml, I have a
>> few
>> different configurations. For example, I have one for compiling the
>> production code (compile), and one for what I need for unit tests (test).
>> Then at different points in my Ant script, I use <ivy:retrieve> to
>> retrieve
>> a specific configuration into a specific directory.
>>
>> My compile retrieve call looks like:
>> <ivy:retrieve
>> pattern="${build.lib}/[artifact]-[revision](-[classifier]).[ext]"
>> sync="true" conf="compile" />
>>
>> My test retrieve call looks like:
>> <ivy:retrieve
>> pattern="${build.unittest.lib}/[artifact]-[revision](-[classifier]).[ext]"
>> sync="true" conf="test" />
>>
>> Hope this helps.
>>
>> Thanks,
>> topher
>>
>>
>> On Wed, Aug 12, 2009 at 8:03 AM, malepati <[email protected]> wrote:
>>
>>>
>>> Hello Every one,
>>>
>>> I have a question:
>>> I want to create a custom library folder structure, is this possible
>>> thru
>>> ivy.xml ?
>>>
>>> Example:
>>> .libs
>>> !
>>> !__Folder1
>>> ! !
>>> ! !__Folder1.a
>>> ! !__Folder1.b
>>> ! !
>>> ! !_Folder1.b.i
>>> !
>>> !__Folder2
>>> !
>>> !__Folder2.a
>>> !__Folder2.b
>>> !
>>> !_Folder2.b.i
>>>
>>> Is this possible with ivy?
>>> because when I am trying to call one library i had to put all <includes>
>>> and
>>> <excludes>.
>>> If i can create such kind of folder structure its easy for me to call a
>>> particular folder when its necessary.
>>> Please share your ideas.
>>>
>>> --Kumar.
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Design-Library-Folder-Structure-tp24937269p24937269.html
>>> Sent from the ivy-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Design-Library-Folder-Structure-tp24937269p24942439.html
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>
>
--
View this message in context:
http://www.nabble.com/Design-Library-Folder-Structure-tp24937269p24954208.html
Sent from the ivy-user mailing list archive at Nabble.com.