You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by samlai <sy...@gmail.com> on 2008/03/26 20:18:27 UTC

Ivy2.0.0-beta2 Fail to Resolve

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;working@FOO2000
 [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.


Re: Ivy2.0.0-beta2 Fail to Resolve

Posted by samlai <sy...@gmail.com>.
You are right.  I've played with the source code and finally figure out the
problem is with my web server.

For some reason, my Jetty returns HTTP GET requests just fine, but it always
return status 404 with HTTP HEAD request.
-- 
View this message in context: http://www.nabble.com/Ivy2.0.0-beta2-Fail-to-Resolve-tp16313827p16351018.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: Ivy2.0.0-beta2 Fail to Resolve

Posted by samlai <sy...@gmail.com>.
It looks like this.  The module name matches the publishing ivy.xml.

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="/ivy/ivy-doc.xsl"?>
<ivy-module version="1.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
    <info 
        organisation="KITS"
        module="com.foo.daoClient" />
	<publications>
		<artifact name="DaoClient" type="jar" ext="jar" />
	</publications>
	<dependencies>
                <dependency org="IBM" name="WebServiceThinClient"
rev="6.1.0" />
        </dependencies>
</ivy-module>

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


Re: Ivy2.0.0-beta2 Fail to Resolve

Posted by Jing Xue <ji...@digizenstudio.com>.
On Wed, Mar 26, 2008 at 12:18:27PM -0700, samlai wrote:
>
> 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".

The ivy.xml below is the one used to publish the ibm jar. What does the
ivy.xml declaring the dependency on this ibm jar look like? Does it
reference the ibm jar with "com.ibm.ws.webservices.thinclient" as the
artifact name?

> 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>

--
Jing Xue


Re: Ivy2.0.0-beta2 Fail to Resolve

Posted by Jing Xue <ji...@mindportcorp.com>.
On Wed, Mar 26, 2008 at 12:18:27PM -0700, samlai wrote:
> 
> 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".

The ivy.xml below is the one used to publish the ibm jar. What does the
ivy.xml declaring the dependency on this ibm jar look like? Does it
reference the ibm jar with "com.ibm.ws.webservices.thinclient" as the
artifact name?

> 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>

-- 
Jing Xue

Re: Ivy2.0.0-beta2 Fail to Resolve

Posted by Xavier Hanin <xa...@gmail.com>.
On Wed, Mar 26, 2008 at 8:18 PM, samlai <sy...@gmail.com> wrote:

>
> 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<http://ivy.foo.com/ivy/%5Borganisation%5D/%5Bmodule%5D/%5Brevision%5D/ivy/ivy.xml>
> "
> />
>                        <artifact
> pattern="
> http://ivy.foo.com/ivy/[organisation]/[module]/[revision]/[type]/[artifact].[ext]<http://ivy.foo.com/ivy/%5Borganisation%5D/%5Bmodule%5D/%5Brevision%5D/%5Btype%5D/%5Bartifact%5D.%5Bext%5D>
> "
> />
>                </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;working@FOO2000
>  [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

I think the problem is here: Ivy does not find the ivy.xml for your module,
so it has no chance to know that this module publishes an artifact which has
not the module as name. The following line in the logs:

> <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


only shows that Ivy tries to locate an artifact, just in case you don't have
any metadata (you can disable this by using allownomd="false" on your shared
resolver).

So, could you confirm that the ivy file for this module is available here:

http://ivy.foo.com/ivy/IBM/WebServiceThinClient/6.1.0/ivy/ivy.xml

If it is available, maybe it's a problem of proxy? Or authentication?

Xavier

>
> <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.
>
>


-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/