You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "Wardrip, Paul" <PW...@tandbergtv.com> on 2008/09/18 22:12:16 UTC

Ivy 2.0.0-rc1 PomModuleDescriptorWriter

In PomModuleDescriptorWriter.java would it be possible to change hard
coded "jar" value that is written for packaging to use the artifact
extension? If I publish something that isn't a jar to a maven
repository, ivy expects it to be a jar when I try to use it as a
dependency of another project.

    private static void printModuleId(ModuleDescriptor md, PrintWriter
out) {
        ModuleRevisionId mrid = md.getModuleRevisionId();
        out.println("  <groupId>" + mrid.getOrganisation() +
"</groupId>");
        out.println("  <artifactId>" + mrid.getName() +
"</artifactId>");
        out.println("  <packaging>jar</packaging>");
 
--	to     --
                                   
        out.println("  <packaging>" + artifacts[i].getExt() +
"</packaging>");

------------
Paul Wardrip
Software Engineer, OpenStream
TANDBERG Television | Part of the Ericsson Group
4500 River Green Parkway | Duluth | GA 30096
Mobile: 770-312-2852 | AIM: paulwardrip
Email: pwardrip@tandbergtv.com | www.tandbergtv.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Ivy 2.0.0-rc1 PomModuleDescriptorWriter

Posted by Xavier Hanin <xa...@gmail.com>.
On Thu, Sep 18, 2008 at 10:12 PM, Wardrip, Paul <PW...@tandbergtv.com>wrote:

> In PomModuleDescriptorWriter.java would it be possible to change hard
> coded "jar" value that is written for packaging to use the artifact
> extension? If I publish something that isn't a jar to a maven
> repository, ivy expects it to be a jar when I try to use it as a
> dependency of another project.
>
>    private static void printModuleId(ModuleDescriptor md, PrintWriter
> out) {
>        ModuleRevisionId mrid = md.getModuleRevisionId();
>        out.println("  <groupId>" + mrid.getOrganisation() +
> "</groupId>");
>        out.println("  <artifactId>" + mrid.getName() +
> "</artifactId>");
>        out.println("  <packaging>jar</packaging>");
>
> --      to     --
>
>        out.println("  <packaging>" + artifacts[i].getExt() +
> "</packaging>");


The only problem I see to implement it is that in Ivy you can have multiple
artifacts, while in Maven you have only one (well, you can have more with
qualifiers, but you have one main artifact). So the patch is not that easy,
but it could be at least improved when only one artifact is published by the
Ivy module.

Xavier


>
> ------------
> Paul Wardrip
> Software Engineer, OpenStream
> TANDBERG Television | Part of the Ericsson Group
> 4500 River Green Parkway | Duluth | GA 30096
> Mobile: 770-312-2852 | AIM: paulwardrip
> Email: pwardrip@tandbergtv.com | www.tandbergtv.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


-- 
Xavier Hanin - Independent Java Consultant
BordeauxJUG co leader - http://www.bordeauxjug.org/
Blogger - http://xhab.blogspot.com/
Apache Ivy Creator - http://ant.apache.org/ivy/