I think this is a missing feature. The 'jdk...' classifiers are not supported by Ivy.
Could you open a JIRA issue for this? thanks, Maarten ----- Original Message ---- From: Scott Bonneau <[email protected]> To: [email protected] Sent: Wed, August 18, 2010 5:38:42 PM Subject: ivy:install and TestNG 5.9 Howdy, Apologies if this is a stupid question, I'm a relative Ivy noob. I'm trying to create an enterprise repository and am running into a problem installing TestNG revision 5.9. The issue appears to have something to do with the fact that the source TestNG repository is using classifiers for its JAR artifacts; rather than testng-5.9.jar htere are testng-5.9-jdk14.jar and testng-5.9-jdk15.jar. As such, when I try to run the <ivy:install> task for this module, I get a failed download error. I don't see any way to specify the classifier in the install task itself. I've created a trivial testcase that demonstrates this behavior (see below). I realize that I can resolve this by simply upgrading to a newer version of TestNG (as of rev 5.12.1 they no longer have the split jdk14 and jdk15 artifacts), but now I'm curious as to how (if?) one handles this case generally speaking when trying to build an enterprise repository. Any input is greatly appreciated. ivysettings.xml: -------------------------------------------------- <ivysettings> <settings defaultResolver="maven2"/> <property name="ivy.cache.dir" value="/tmp/ivy/cache"/> <resolvers> <filesystem name="local"> <ivy pattern="/tmp/ivy/repo/[organization]/[module]/[revision]/ivy.xml"/> <artifact pattern="/tmp/ivy/repo/[organization]/[module]/[revision]/[artifact](-[classifier]).[ext]"/> </filesystem> <ibiblio name="maven2" root="http://repo2.maven.org/maven2/" m2compatible="true"/> </resolvers> </ivysettings> -------------------------------------------------- build.xml: --------------------------------------------------- <project xmlns:ivy="antlib:org.apache.ivy.ant" name="ivytest" default="install"> <target name="install"> <ivy:settings id="settings" file="${basedir}/ivysettings.xml"/> <ivy:cleancache settingsRef="settings"/> <ivy:install from="maven2" to="local" organisation="org.testng" module="testng" revision="5.9" overwrite="true"/> </target> </project> --------------------------------------------------- Output from running ant: --------------------------------------------------- Buildfile: build.xml install: [ivy:cleancache] :: Ivy 2.2.0-rc1 - 20100629224905 :: http://ant.apache.org/ivy/ :: [ivy:cleancache] :: loading settings :: file = /Users/bonneau/src/ivytest/ivysettings.xml [ivy:install] DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead [ivy:install] :: loading settings :: file = /Users/bonneau/src/ivytest/ivysettings.xml [ivy:install] :: installing org.testng#testng;5.9 :: [ivy:install] :: resolving dependencies :: [ivy:install] found org.testng#testng;5.9 in maven2 [ivy:install] :: downloading artifacts to cache :: [ivy:install] :: installing in local :: [ivy:install] published ivy to /tmp/ivy/repo/org.testng/testng/5.9/ivy.xml [ivy:install] :: install resolution report :: [ivy:install] :: resolution report :: resolve 0ms :: artifacts dl 2ms --------------------------------------------------------------------- | | modules || artifacts | | conf | number| search|dwnlded|evicted|| number|dwnlded| --------------------------------------------------------------------- | default | 1 | 1 | 1 | 0 || 1 | 0 | --------------------------------------------------------------------- [ivy:install] [ivy:install] :: problems summary :: [ivy:install] :::: WARNINGS [ivy:install] [NOT FOUND ] org.testng#testng;5.9!testng.jar (0ms) [ivy:install] ==== maven2: tried [ivy:install] http://repo2.maven.org/maven2/org/testng/testng/5.9/testng-5.9.jar [ivy:install] :::::::::::::::::::::::::::::::::::::::::::::: [ivy:install] :: FAILED DOWNLOADS :: [ivy:install] :: ^ see resolution messages for details ^ :: [ivy:install] :::::::::::::::::::::::::::::::::::::::::::::: [ivy:install] :: org.testng#testng;5.9!testng.jar [ivy:install] :::::::::::::::::::::::::::::::::::::::::::::: [ivy:install] [ivy:install] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS BUILD FAILED --------------------------------------------------- -Scott
