Hi, I've created a JIRA issue ( https://issues.apache.org/jira/browse/IVY-1069 IVY-1609 ) where we listed our debug output and further findings!
Thanks for your help. Maarten Coene wrote: > > > I don't see right now a reason why it doesn't work. > Could you create a JIRA issue and attach the ant debug output (ant -d ...) > ? > > Maarten > > > > > ----- Original Message ---- > From: Mihael <[email protected]> > To: [email protected] > Sent: Tuesday, April 21, 2009 7:36:10 PM > Subject: ivy:buildnumber 2.1.0 rc1 & sonatype nexus issues > > > Hi all Ivy gurus, Ivy lovers and enthusiasts! > > I'm a part of a SW development team and we decided to use Ivy to manage > our > dependencies. > First i must admit that the learning curve was not as steep as i thought > it > would be, that is a big thumbs up from me... > > Now as for our problem.. > Our setup is: > > Sonatype Nexus Repo for 3rd party libs (from IBiblio or some other) and a > snapshots repo on the same Nexus for publishing our builds. Ivy is 2.1.0 > rc1. > > Everything works with resolving third party and our libs. Publishing works > fine. The only thing that doesn't work (or we don't understand the way it > works which is equally probable) is the ivy:buildnumber task. This is our > setup: > > IvySettings file, used only for buildnumber > [CODE] > <ivysettings> > <resolvers> > <url name="nexus_publish" m2compatible="true"> > <ivy > pattern="http://localhost:8081/nexus/content/repositories/snapshots/[organization]/[module]/[revision]-SNAPSHOT/ivy-[revision].xml" > /> > <artifact > pattern="http://localhost:8081/nexus/content/repositories/snapshots/[organization]/[module]/[revision]-SNAPSHOT/[artifact]-[revision].[ext]" > /> > </url> > </resolvers> > > <modules> > <module organisation="hr.apisit" resolver="nexus_publish" /> > </modules> > > <settings defaultResolver="nexus_publish" /> > > </ivysettings> > [/CODE] > > An ant task that uses ivy:buildnumber just to find out what the new > revision > is > [CODE] > <target name="build_number" depends="init-ivy"> > <ivy:resolve usecacheonly="false" /> > > <ivy:settings file="ivysettings-single.xml" > id="ivysetting-single"> > <!-- we MUST specify credentials and we MUST have > httpclient on > classpath --> > <!-- REALM must also be set!! --> > <credentials host="localhost" realm="Sonatype Nexus > Repository Manager" > username="admin" passwd="password" /> > </ivy:settings> > > > <ivy:resolve > inline="true" > organisation="${ivy.organisation}" > module="${ivy.module}" > transitive="false" > revision="latest.integration" > conf="default" > settingsref="ivysetting-single" > haltonfailure="false" > usecacheonly="false" > checkifchanged="true" > refresh="true" > keep="true" > showprogress="true" > validate="true" > /> > <echo message="${ivy.revision} - ${ivy.new.revision}"></echo> > <ivy:buildnumber settingsref="ivysetting-single" revision="1.0.+" > resolver="nexus_publish" module="${ivy.module}" > organisation="${ivy.organisation}" /> > <echo message="${ivy.revision} - ${ivy.new.revision}"></echo> > </target> > [/CODE] > > And this is what the output looks like: > [CODE] > Buildfile: > /home/mihael/IBM/rationalsdp/B22/B22BusinessServiceJava/ant/build.xml > init-ivy: > build_number: > No ivy:settings found for the default reference 'ivy.instance'. A default > instance will be used > [ivy:resolve] :: Ivy 2.1.0-rc1 - 20090319213629 :: > http://ant.apache.org/ivy/ :: > :: loading settings :: file = > /home/mihael/IBM/rationalsdp/B22/B22BusinessServiceJava/ant/ivysettings.xml > [ivy:resolve] :: resolving dependencies :: > com.myorg#B22BusinessServiceJava;work...@wonderland > [ivy:resolve] confs: [default, compile, sources] > [ivy:resolve] found org.springframework#spring-core;2.5.6 in nexus-all > [ivy:resolve] found commons-logging#commons-logging;1.1.1 in nexus-all > [ivy:resolve] :: resolution report :: resolve 243ms :: artifacts dl 8ms > --------------------------------------------------------------------- > | | modules || artifacts | > | conf | number| search|dwnlded|evicted|| number|dwnlded| > --------------------------------------------------------------------- > | default | 0 | 0 | 0 | 0 || 0 | 0 | > | compile | 2 | 0 | 0 | 0 || 2 | 0 | > | sources | 0 | 0 | 0 | 0 || 0 | 0 | > --------------------------------------------------------------------- > :: loading settings :: file = > /home/mihael/IBM/rationalsdp/B22/B22BusinessServiceJava/ant/ivysettings-single.xml > [ivy:resolve] :: resolving dependencies :: > com.myorg#B22BusinessServiceJava-caller;working [not transitive] > [ivy:resolve] confs: [default] > [ivy:resolve] found com.myorg#B22BusinessServiceJava;1.0.1 in > nexus_publish > [ivy:resolve] [1.0.1] > com.myorg#B22BusinessServiceJava;latest.integration > [ivy:resolve] :: resolution report :: resolve 191ms :: artifacts dl 1ms > --------------------------------------------------------------------- > | | modules || artifacts | > | conf | number| search|dwnlded|evicted|| number|dwnlded| > --------------------------------------------------------------------- > | default | 1 | 1 | 0 | 0 || 1 | 0 | > --------------------------------------------------------------------- > [echo] working - ${ivy.new.revision} > [echo] working - 1.0.1 > BUILD SUCCESSFUL > [/CODE] > > Note the "[ivy:resolve] found com.myorg#B22BusinessServiceJava;1.0.1 > in > nexus_publish" line. > So, ivy knows that there is a 1.0.1 version in the repo...but the > builnumber > task says that the new revision is 1.0.0. > How come? Are we missing something? > > Any help, insight, tip, anything would be greatly appreciated! > > mih...@zagreb, Croatia > -- > View this message in context: > http://www.nabble.com/ivy%3Abuildnumber-2.1.0-rc1---sonatype-nexus-issues-tp23160961p23160961.html > Sent from the ivy-user mailing list archive at Nabble.com. > > > > > -- View this message in context: http://www.nabble.com/ivy%3Abuildnumber-2.1.0-rc1---sonatype-nexus-issues-tp23160961p23173072.html Sent from the ivy-user mailing list archive at Nabble.com.
