When I used Ivy 1.4, I have no problem resolving modules, but I never had
success with Ivy 2.0.0 including the latest version.  It seems like Ivy
2.0.0 is not pulling the artifact name from the resolved Ivy file.
For example:

It tries to retrieve file with URL: 
http://ivy.foo.com/ivy/IBM/WebServiceThinClient/6.1.0/jar/WebServiceThinClient.jar.

But if you read the ivy.xml, it clearly states the artifact name is
"com.ibm.ws.webservices.thinclient" not the module name
"WebServiceThinClient".  Is my settings wrong or is this a bug?  I want to
mention again, with the exactly the same settings, ant build file, ivy file,
and ivy repository structure, it works fine with ivy 1.4.  Thanks.

Settings:

<ivysettings>
        <settings defaultResolver="default-resolver" />
        <resolvers>
                <url name="shared">
                        <ivy
pattern="http://ivy.foo.com/ivy/[organisation]/[module]/[revision]/ivy/ivy.xml";
/>
                        <artifact
pattern="http://ivy.foo.com/ivy/[organisation]/[module]/[revision]/[type]/[artifact].[ext]";
/>
                </url>

                <filesystem name="local">
                        <ivy
pattern="${ivy.default.ivy.user.dir}/local/[organisation]/[module]/[revision]/ivy/ivy.xml"
/>

                        <artifact
pattern="${ivy.default.ivy.user.dir}/local/[organisation]/[module]/[revision]/[type]/[artifact].[ext]"
/>
                </filesystem>

                <filesystem name="publish">
                        <ivy
pattern="/usr/lib/jetty-1.6.5/ivy/[organisation]/[module]/[revision]/ivy/ivy.xml"
/>
                        <artifact
pattern="/usr/lib/jetty-1.6.5/ivy/[organisation]/[module]/[revision]/[type]/[artifact].[ext]"
/>
                </filesystem>

                <chain name="default-resolver">
                        <resolver ref="local"/>
                        <resolver ref="shared"/>
                </chain>
        </resolvers>
        <modules>
                <module organisation="*" name=".*" resolver="default-resolver" 
/>
        </modules>
</ivysettings>


Ant Target:

    <target name="publish">
        <input message="Please enter build version:" addproperty="revision"
/>
        <ivy:settings url="http://ivy.foo.com/ivy/ivysettings.xml"; />
        <ivy:resolve/>
        <ivy:publish artifactspattern="${dist.dir}/[artifact].[ext]"
                     resolver="local"
                     pubrevision="${revision}"
                     status="release"
                     update="true" />
        <echo message="project ${ant.project.name} released with version
${revision}" />
    </target>

Log:

publish:
:: Ivy 2.0.0-beta2 - 20080225093827 :: http://ant.apache.org/ivy/ ::
[ivy:settings] :: loading settings :: url =
http://ivy.foo.com/ivy/ivysettings.xml
 [ivy:resolve] :: resolving dependencies ::
FOO#com.foo.daoClient;[EMAIL PROTECTED]
 [ivy:resolve]  confs: [default]
 [ivy:resolve] :: resolution report :: resolve 281ms :: artifacts dl 0ms
        ---------------------------------------------------------------------
        |                  |            modules            ||   artifacts   |
        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
        ---------------------------------------------------------------------
        |      default     |   1   |   0   |   0   |   0   ||   0   |   0   |
        ---------------------------------------------------------------------
 [ivy:resolve] :: problems summary ::
 [ivy:resolve] :::: WARNINGS
 [ivy:resolve]          module not found: IBM#WebServiceThinClient;6.1.0
 [ivy:resolve]  ==== local: tried
 [ivy:resolve]    C:\Documents and
Settings\sam.lai\.ivy2/local/IBM/WebServiceThinClient/6.1.0/ivy/ivy.xml
 [ivy:resolve]    -- artifact
IBM#WebServiceThinClient;6.1.0!WebServiceThinClient.jar:
 [ivy:resolve]    C:\Documents and
Settings\sam.lai\.ivy2/local/IBM/WebServiceThinClient/6.1.0/jar/WebServiceThinClient.jar
 [ivy:resolve]  ==== shared: tried
 [ivy:resolve]   
http://ivy.foo.com/ivy/IBM/WebServiceThinClient/6.1.0/ivy/ivy.xml
 [ivy:resolve]    -- artifact
IBM#WebServiceThinClient;6.1.0!WebServiceThinClient.jar:
 [ivy:resolve]   
http://ivy.foo.com/ivy/IBM/WebServiceThinClient/6.1.0/jar/WebServiceThinClient.jar
 [ivy:resolve]          ::::::::::::::::::::::::::::::::::::::::::::::
 [ivy:resolve]          ::          UNRESOLVED DEPENDENCIES         ::
 [ivy:resolve]          ::::::::::::::::::::::::::::::::::::::::::::::
 [ivy:resolve]          :: IBM#WebServiceThinClient;6.1.0: not found
 [ivy:resolve]          ::::::::::::::::::::::::::::::::::::::::::::::
 [ivy:resolve] 
 [ivy:resolve] 
 [ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

Ivy.xml:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/ivy/ivy-doc.xsl"?>
<ivy-module version="1.4">
  <info organisation="IBM" module="WebServiceThinClient" revision="6.1.0"
status="release" publication="20080321132408">
    <description>IBM web service thin client.</description>
  </info>
  <publications>
    <artifact name="com.ibm.ws.webservices.thinclient" type="jar" ext="jar"
/>
  </publications>
  <dependencies>

  </dependencies>
</ivy-module>

-- 
View this message in context: 
http://www.nabble.com/Ivy2.0.0-beta2-Fail-to-Resolve-tp16313827p16313827.html
Sent from the ivy-user mailing list archive at Nabble.com.

Reply via email to