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 Jean-Baptiste Quenot <jb...@apache.org> on 2007/05/23 10:08:02 UTC

Ivy file not published when using specific configuration

Hi there,

I'm using <ivy:publish>  to publish the artifacts  generated by my
build to  a local  repository.  This  works well,  until I  had to
specify conf="default" to avoid  publishing for examples WAR files
to  the repository  (belongs to  configuration "webapp").   When I
added this  attribute, Ivy  files stopped  being published  to the
repository, and building other modules depending on this published
artifact failed  with the following error  (with anonymized module
names):

[ivy:resolve] :: problems summary ::
[ivy:resolve] :::: WARNINGS
[ivy:resolve] 	problem while downloading ivy file: /path/to/local/repo/organisation/artifact/1.0-dev-20070523072416/ivy.xml to /var/tmp/ivy51894xml: /path/to/local/repo/organisation/artifact/1.0-dev-20070523072416/ivy.xml (No such file or directory)
[ivy:resolve] 		::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] 		::          UNRESOLVED DEPENDENCIES         ::
[ivy:resolve] 		::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] 		:: [ organisation | artifact | latest.development ]: null
[ivy:resolve] 		::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] 
[ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

Notice the word "null" at the end of the module descriptor.  This is Ivy 1.4.1.

Your help will be appreciated.
-- 
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

Re: Ivy file not published when using specific configuration

Posted by Xavier Hanin <xa...@gmail.com>.
On 5/23/07, Jean-Baptiste Quenot <jb...@apache.org> wrote:
>
> * Xavier Hanin:
>
> > Maybe you  could give Ivy 2.0-alpha1  a try, just to  see if you
> > have the same problem and  a better message? It's supposed to be
> > backward  compatible, so  a  drop in  replacement  for the  test
> > should work.
>
> I installed ivy-core-2.0.0-alpha-1-incubating.jar and had this
> error:
>
> taskdef class org.apache.ivy.ant.IvyConfigure cannot be found
>
> Using ivy-2.0.0-alpha-1-incubating.jar, it works.  A bit
> confusing?  Why do you provide two jars?  Why IvyConfigure is not
> in ivy core's jar?


There is no ant task in ivy-core jar, because ivy-core has been introduced
(can't remember when, maybe 1.3) for this purpose, because we needed such a
packaging for eclipse. The main distribution of Ivy is still the ivy jar
which packages everything. We might review the packaging before 2.0 final,
but we will always provide the ivy jar as a drop in replacement of older
version ivy jar.

I have the beginning of an answer by looking at this deprecation
> message:
>
> DEPRECATED: 'ivyconf' element is deprecated, use 'ivysettings' instead
>
> To be truly backwards compatible, you should include the configure
> task in ivy core.


No, ivy-core-1.4.1 didn't include IvyConfigure task. The deprecation is only
a message and doesn't alter backward compatibility.

Otherwise, the ivy.xml is still not published with the new
> version.  And as you mentioned, the error message is better
> indeed (but there's a NPE not properly handled in Ivy):
>
> [ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve]           ::          UNRESOLVED DEPENDENCIES         ::
> [ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve]           :: [ organisation | artifact | latest.development]:
> java.lang.NullPointerException at
> org.apache.ivy.plugins.resolver.AbstractResourceResolver.findResource(
> AbstractResourceResolver.java:135)
> [ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve]


OK, now it's easier to track down the problem. This is a huge improvement,
isn't it :-)

Could you open a JIRA issue with this details, and we'll try to fix the NPE
and track down the root cause of it. If you can also include some more
details on your ivy file and your call to publish, it could help. Tell us
also a little bit more about your settings, because a first quick check to
the code seems to indicate the problem happens only with a version matcher
requiring module descriptor parsing, like latest.release, or sg like that.

Cheers,

Xavier

Cheers,
> --
>      Jean-Baptiste Quenot
> aka  John Banana   Qwerty
> http://caraldi.com/jbq/
>



-- 
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

Re: Ivy file not published when using specific configuration

Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* Xavier Hanin:

> Maybe you  could give Ivy 2.0-alpha1  a try, just to  see if you
> have the same problem and  a better message? It's supposed to be
> backward  compatible, so  a  drop in  replacement  for the  test
> should work.

I installed ivy-core-2.0.0-alpha-1-incubating.jar and had this
error:

taskdef class org.apache.ivy.ant.IvyConfigure cannot be found

Using ivy-2.0.0-alpha-1-incubating.jar, it works.  A bit
confusing?  Why do you provide two jars?  Why IvyConfigure is not
in ivy core's jar?

I have the beginning of an answer by looking at this deprecation
message:

DEPRECATED: 'ivyconf' element is deprecated, use 'ivysettings' instead

To be truly backwards compatible, you should include the configure
task in ivy core.

Otherwise, the ivy.xml is still not published with the new
version.  And as you mentioned, the error message is better
indeed (but there's a NPE not properly handled in Ivy):

[ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]           ::          UNRESOLVED DEPENDENCIES         ::
[ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]           :: [ organisation | artifact | latest.development ]: java.lang.NullPointerException at org.apache.ivy.plugins.resolver.AbstractResourceResolver.findResource(AbstractResourceResolver.java:135)
[ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] 

Cheers,
-- 
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

Re: Ivy file not published when using specific configuration

Posted by Xavier Hanin <xa...@gmail.com>.
On 5/23/07, Jean-Baptiste Quenot <jb...@apache.org> wrote:
>
> Hi there,


Hi JB,

I'm using <ivy:publish>  to publish the artifacts  generated by my
> build to  a local  repository.  This  works well,  until I  had to
> specify conf="default" to avoid  publishing for examples WAR files
> to  the repository  (belongs to  configuration "webapp").   When I
> added this  attribute, Ivy  files stopped  being published  to the
> repository, and building other modules depending on this published
> artifact failed  with the following error  (with anonymized module
> names):
>
> [ivy:resolve] :: problems summary ::
> [ivy:resolve] :::: WARNINGS
> [ivy:resolve]   problem while downloading ivy file:
> /path/to/local/repo/organisation/artifact/1.0-dev-20070523072416/ivy.xml to
> /var/tmp/ivy51894xml:
> /path/to/local/repo/organisation/artifact/1.0-dev-20070523072416/ivy.xml (No
> such file or directory)
> [ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve]           ::          UNRESOLVED DEPENDENCIES         ::
> [ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve]           :: [ organisation | artifact | latest.development]: null
> [ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve]
> [ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS


It's weird. The message is really strange, even though having a problem with
configuration publication is not that surprising (it was introduced in 1.4.1),
the error reported is strange. I guess you have verified that you have a
file at
/path/to/local/repo/organisation/artifact/1.0-dev-20070523072416/ivy.xml?
Because it's the first diagnostic we can see from the warning.

Notice the word "null" at the end of the module descriptor.  This is Ivy
> 1.4.1.


Yes, if I remember correctly, this is likely to be the getMessage() from the
exception raised. In latest Ivy version, we output the exception itself when
the exception has a null message (like NPE for instance). Maybe you could
give Ivy 2.0-alpha1 a try, just to see if you have the same problem and a
better message? It's supposed to be backward compatible, so a drop in
replacement for the test should work.

Xavier

Your help will be appreciated.
> --
>      Jean-Baptiste Quenot
> aka  John Banana   Qwerty
> http://caraldi.com/jbq/
>



-- 
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/