ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shaikh Almas <eralm...@gmail.com>
Subject Re: Issue while publishing the artifacts (Ivy publishes multiple jars withdifferent name but with same content).
Date Mon, 04 Oct 2010 17:00:36 GMT
Thanks Kirby and Maarten this was the problem and it got resolved. Much
appreciated.

Thanks & Regards,
Almas

On Sat, Oct 2, 2010 at 4:24 PM, Kirby Files <Kfiles@masergy.com> wrote:

> Almas,
>  You have a highly irregular artifact-pattern in your publish task. The
> pattern ${srcRoot}/tmp/jars/[module].[ext] will look for exactly one jar,
> ppm.jar. Since you specify two artifacts in your ivy.xml publications
> section, you force Ivy to take this same jar and publish it twice.
>
> A more typical artifact pattern would be:
> ${srcRoot}/tmp/jars/[artifact].[ext]
>
> Then each artifact name you specify under publications will attempt to find
> a jar matching the above pattern.
>
> Thanks,
> ---
> Kirby Files
> Software Architect
> Masergy Communications
> kfiles@masergy.com
> ________________________________________
> From: Shaikh Almas [eralmas7@gmail.com]
> Sent: Saturday, October 02, 2010 1:50 AM
> To: ivy-user@ant.apache.org
> Subject: Re: Issue while publishing the artifacts (Ivy publishes multiple
> jars withdifferent name but with same content).
>
>  Can sombody (Maarten) please help me. its urgent?
>
>
> Thanks & Regards,
> Almas
>
> On Thu, Sep 30, 2010 at 10:00 PM, Shaikh Almas <eralmas7@gmail.com> wrote:
>
> > Hi,
> >
> > I have a weird issue where in my publish task works perfectly fine of
> > publishing multiple artifacts present within one ivy.xml onto repository
> but
> > the content of those artifact are the same. In short ivy publishes
> multiple
> > artifact with different name as in publish tag of ivy.xml but with same
> > content in each of them. Following are the history of what i did:
> >
> > ppm-ivy.xml
> >
> > <ivy-module version="2.0">
> >  <info organisation="ppm" module="ppm"/>
> >
> >  <configurations>
> >   <conf name="internal" description="found within JP repositories" />
> >  </configurations>
> >
> >  <publications>
> >   <artifact name="ppm" type="jar" ext="jar"/>
> >   <artifact name="xbeancomponent" type="jar" ext="jar"/>
> >  </publications>
> >
> >  <dependencies>
> >   <dependency org="junit" name="junit" rev="latest.integration"
> > conf="internal->*"/>
> >   <dependency org="qpid" name="qpid-client" rev="${qpidVersion}"
> > conf="internal->*"/>
> >   <dependency org="guice" name="guice" rev="${guiceVersion}"
> > conf="internal->*"/>
> >  </dependencies>
> > </ivy-module>
> >
> >
> > build.xml
> >
> >  <target name="publishPPM" description="publish merlin service to shared
> > repo with ivy">
> >                 <ivy:resolve settingsRef="2" file="ppm-ivy.xml"
> > revision="${ppmVersion}" type="jar" />
> >                 <ivy:publish settingsRef="2" resolver="publish"
> > srcivypattern="ppm-ivy.xml" organisation="ppm" module="ppm"
> > revision="${ppmVersion}" pubrevision="${ppmVersion}" forcedeliver="true"
> > status="release" overwrite="true">
> >                         <artifacts
> > pattern="${srcRoot}/tmp/jars/[module].[ext]" />
> >                 </ivy:publish>
> >  </target>
> >
> >
> > My jars that app created
> >
> > ppm-${ppmversion}.jar
> > xbeancomponent-${ppmversion}.jar
> >
> > are in ${srcRoot}/tmp/jars
> >
> >
> >
> > In resolver i am using svnkit provided by google
> > ..
> > ..
> > ..
> >    <typedef name="svn"
> > classname="fm.last.ivy.plugins.svnresolver.SvnResolver"/>
> >
> >  <resolvers>
> >  <svn name="publish" repositoryRoot="
> > http://subversion.myrepo.com/svn/repos/sharedRepo/trunk/ivyRepository"
> > userName="myuser" userPassword="mypass" binaryDiff="false">
> >          <artifact
> > pattern="[organisation]/jars/[revision]/[artifact]-[revision].[ext]"/>
> >        </svn>
> > ..
> > ..
> > ..
> >
> >
> > Problems:
> >
> > 1. Problem with above set up is that when i run publishPPM task, it
> changes
> > my ppm-ivy.xml with the actual versions which i dont want. Its ok if it
> > writes that file to svn (which its not doing) but not in my source code
> > which is committed in the svn.
> > so i tried removing the forcedeliver="true" (i really dont know what this
> > task does) attribute from ivy:publish task which helped but i got
> expected
> > verison internal@.. instead of 1.2.0
> >
> > My new task in build.xml is
> >
> > <target name="publishPPM" description="publish merlin service to shared
> > repo with ivy">
> >                 <ivy:resolve settingsRef="2" file="ppm-ivy.xml"
> > revision="${ppmVersion}" type="jar" />
> >                 <ivy:publish settingsRef="2" resolver="publish"
> > srcivypattern="ppm-ivy.xml" organisation="ppm" module="ppm"
> > revision="${ppmVersion}" pubrevision="${ppmVersion}" status="release"
> > overwrite="true">
> >                         <artifacts
> > pattern="${srcRoot}/tmp/jars/[module].[ext]" />
> >                 </ivy:publish>
> >  </target>
> >
> >
> > What i did to resolve this issue was in the info tag in ppm-ivy.xml i
> added
> > revision attribute so my ppm-ivy.xml looks as below:
> >
> > <ivy-module version="2.0">
> >  <info organisation="ppm" module="ppm" revision="${ppmVersion}"/>
> >
> >  <configurations>
> >   <conf name="internal" description="found within JP repositories" />
> >  </configurations>
> >
> >  <publications>
> >   <artifact name="ppm" type="jar" ext="jar"/>
> >   <artifact name="xbeancomponent" type="jar" ext="jar"/>
> >  </publications>
> >
> >  <dependencies>
> >   <dependency org="junit" name="junit" rev="latest.integration"
> > conf="internal->*"/>
> >   <dependency org="qpid" name="qpid-client" rev="${qpidVersion}"
> > conf="internal->*"/>
> >   <dependency org="guice" name="guice" rev="${guiceVersion}"
> > conf="internal->*"/>
> >  </dependencies>
> > </ivy-module>
> >
> > Now its publishing both the files into repository but the issue is
> > xbeancomponent.jar is exact replica of ppm.jar just the name are
> different.
> > Can you please help me?
> >
> >
> > Thanks & Regards,
> > Almas
> >
>

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