Hi, Thanks everyone for replying.
@Maarten. Yes, ivy (during the publish) sticks an ivy-0.1.xml into the dist/ivys directory. It is almost an exact copy of my current ivy.xml file, except it doesn't have this line: <artifact name="myapp" type="source" ext="jar"/> (it does have the type="jar" entry) @Geoff I removed the "-sources" from the entry in the artifact in the ivy.xml. Still no joy. @Garima Thanks, I removed the chain resolver parent. So, unfortunately, ivy still won't publish my sources jar into my local repo :-( I'm still at a loss as to why not :-( -=david=- On 10 February 2010 22:47, Garima Bathla <[email protected]> wrote: > Also on a curiosity basis. > > You are trying to use local resolver from your ant targer publish-locally > but then the local resolver is hidden inside chain resolver. Not sure why > Ivy is not complaining about it. > > > > On Wed, Feb 10, 2010 at 1:43 PM, Maarten Coene <[email protected]>wrote: > >> My guess is that Ivy doesn't find the ivy.xml file of the module you are >> publishing, so it's creating a default one. >> Could you check that the following file exists before publishing and >> contains the correct information? >> >> dist/ivys/ivy-0.1.xml >> >> cheers, >> Maarten >> >> >> >> >> ----- Original Message ---- >> From: David Harrigan <[email protected]> >> To: [email protected] >> Sent: Wed, February 10, 2010 10:34:45 PM >> Subject: Problem publishing sources to local repository >> >> Hi, >> >> (in case of formatting problems, I've put a copy of this email here: >> http://pastebin.com/m44b795a1) >> >> I'm having a problem publishing my sources to a local repo. This is what I >> have: >> >> ivysettings.xml >> >> <ivysettings> >> <settings defaultResolver="default" /> >> <resolvers m2compatible="true"> >> <chain name="default" returnFirst="true" checkmodified="true"> >> <ibiblio name="ibiblio" m2compatible="true" /> >> <ibiblio name="sourceforge-ehcache" m2compatible="true" >> root="http://oss.sonatype.org/content/groups/sourceforge/" /> >> <filesystem name="local"> >> <ivy >> >> pattern="${ivy.default.ivy.user.dir}/local/[organisation]/[module]/[revision]/[type]s/[artifact]-[revision].xml" >> /> >> <artifact >> >> pattern="${ivy.default.ivy.user.dir}/local/[organisation]/[module]/[revision]/[type]s/[artifact]-[revision].[ext]" >> /> >> </filesystem> >> </chain> >> </resolvers> >> <modules> >> <module organisation="net.sf.ehcache" name=".*" >> resolver="sourceforge-ehcache" /> >> </modules> >> </ivysettings> >> >> my ivy.xml >> >> <publications> >> <artifact name="myapp" type="jar" ext="jar" /> >> <artifact name="myapp-sources" type="source" ext="jar" /> >> </publications> >> >> and in my build.xml, I have this: >> >> <target name="publish-locally"> >> <ivy:publish resolver="local" organisation="fu.bar" >> module="${ant.project.name}" revision="${dist.version}" >> forcedeliver="true" overwrite="true"> >> <artifacts >> pattern="${dist.tmp.dir}/[type]s/[artifact]-[revision].[ext]" /> >> </ivy:publish> >> </target> >> >> When I produce my jars I end up with this: >> >> dist/jars/myapp-0.1.jar >> dist/sources/myapp-sources-0.1.jar >> >> Yet, when I publish, all I end up is with the myapp-0.1.jar >> >> This is the debug output: >> >> publish-locally: >> [ivy:publish] :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/:: >> [ivy:publish] :: loading settings :: file = >> /Users/fubar/Javastuff/eclipse/workspaces/main/myapp/ivysettings.xml >> :: delivering :: fu.bar#myapp;0.1 :: 0.1 :: integration :: Wed Feb 10 >> 22:20:44 CET 2010 >> delivering ivy file to >> >> /Users/fubar/Javastuff/eclipse/workspaces/main/myapp/tmp/dist/ivys/ivy-0.1.xml >> :: publishing :: fu.bar#myapp >> published promoweb to >> /Users/fubar/.ivy2/local/fu.bar/myapp/0.1/jars/myapp-0.1.jar >> published ivy to >> /Users/fubar/.ivy2/local/fu.bar/fu.bar/0.1/ivys/ivy-0.1.xml >> >> Funnily enough, when I examine the ivy-0.1.xml, I only have this under >> publications: >> >> <publications> >> <artifact name="myapp" type="jar" ext="jar" /> >> </publications> >> >> I'm really at a loss to understand why this isn't working. I had a >> look thru the mailing list, tried a few things >> but still no joy :-( >> >> Anyone spot any glaringly obvious error I'm doing? >> >> -=david=- >> >> >> >> >> >
