On Mon, Mar 3, 2008 at 8:30 PM, Brown, Carlton < [EMAIL PROTECTED]> wrote:
> > -----Original Message----- > > From: Xavier Hanin [mailto:[EMAIL PROTECTED] > > Sent: Monday, March 03, 2008 2:21 PM > > To: [email protected] > > Subject: Re: Status of ivy repository > > > Ivy is able to parse maven 2 poms and convert it in Ivy > > files. The resulting Ivy files aren't as clean as if they > > were written by hand, no magic here, but it works really > > well, and we are regularly improving our support. So you can > > either use maven 2 repo directly, or use install task to get > > the jars and the converted poms under your control. Isn't > > life beautiful ? ;-) > > Yes, that's good news indeed. Can you explain which Ivy task converts > the pom to ivy.xml ? I don't see any explanation of this in the > documentation, except there is a small hint in the repository tutorial. I thought the repository tutorial was pretty clear, if you look at the example "install a module with dependencies", at the end there is this: "As you can see there is no pom here (pom is the module metadata format used by maven 2, available on the maven 2 repository). Instead you can see there's an ivy file, which is actually the original hibernate pom converted into an ivy file." The adjusting default settings tutorial says this: "the public repository is ibiblio in m2 compatible mode (in other words, the maven 2 public repository). This repository has the advantage of providing a lot of modules, with metadata for most of them." Which means that Ivy is able to leverage metadata found in maven 2 repo, i.e. poms. On the ibiblio resolver doc we have this: "Using the m2compatible attribute, you can benefit from maven 2 repository compatibility (convert dots in organisation in slashes, search for poms, use transitive dependencies of poms)." Sounds pretty clear. Except that I agree we do not explain that poms are actually converted in ivy files, but this is useful only if you want to install modules. So to answer your question there is no documented task to convert a pom to an ivy file. The usual way is to use the install task. Alternatively you can use the ivy:convertpom task, which is not documented :-( Here is an example: <ivy:convertpom pomFile="pom.xml" ivyFile="ivy.xml" /> > I would like to know every case where Ivy can read a Maven pom file and > use this information for resolution, file generation, or any other > purpose. Ivy understand poms as it understands ivy files: you have parser for each, and you can do pretty much everything supported by each format with both. Whenever your file has a pom extension, Ivy will use the pom parser. The only thing we don't support with poms is deliver/publish. Indeed we have no updater/writer for poms, only a parser. But the makepom task can help to generate a pom from your ivy file. HTH, Xavier > > > ----------------------------------------- > ==================================================== > This message contains PRIVILEGED and CONFIDENTIAL > information that is intended only for use by the > named recipient. If you are not the named recipient, > any disclosure, dissemination, or action based on > the contents of this message is prohibited. In such > case please notify us and destroy and delete all > copies of this transmission. Thank you. > ==================================================== > -- Xavier Hanin - Independent Java Consultant http://xhab.blogspot.com/ http://ant.apache.org/ivy/ http://www.xoocode.org/
