ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: Can filesystem resolver support usePOMs?
Date Tue, 10 Jul 2007 15:30:52 GMT
On 7/10/07, Jing Xue <jingxue@digizenstudio.com> wrote:
>
>
> Quoting Xavier Hanin <xavier.hanin@gmail.com>:
>
> > On 7/7/07, Jing Xue <jingxue@digizenstudio.com> wrote:
> >>
> >> I have this chain (returnFirst=true): cache -> local filesystem ->
> >> official ibiblio.
> >>
> >> The local filesystem repository hosts my own artifacts _and_ some open
> >> source ones whose poms are broken in ibiblio. Now the problem is since
> >> FileSystemResolver doesn't support usePoms, whatever artifacts I copy
> >> over from ibiblio lose their transitive dependencies.
> >
> >
> > You can use poms with a filesystem resolver if you specify the pom
> extension
> > in your "ivy" pattern, instead of using [ext].
>
> Hi Xavier,
>
> Is this what you meant?
> <filesystem name="local-m2" m2compatible="true" local="true">
>    <ivy
> pattern="${local.m2.repo.root
> }/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).pom"
> />
>    <artifact
> pattern="${local.m2.repo.root
> }/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
> />
> </filesystem>
>
> I'm having some problem getting that to work, because the [artifact]
> in the ivy pattern actually gets substituted with "ivy". So it would
> always look for something like ivy-2.0.pom, whereas it should be
> looking for therealthing-2.0.pom that goes along with
> therealthing-2.0.jar. 8-)


I think you can use something like that:
<filesystem name="local-m2" m2compatible="true" local="true">
   <ivy pattern="${local.m2.repo.root
}/[organisation]/[module]/[revision]/[module]-[revision](-[classifier]).pom"/>
   <artifact pattern="${local.m2.repo.root
}/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
</filesystem>

Using the module token in the ivy pattern for the file name should fix the
problem. But I agree this is far from easy, so implementing usepoms in file
system resolvers would definitely be a good idea.

Xavier

Thanks.
> --
> Jing
>
>
>


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message