Re: java-dep-check on ant tasks

Vlastimil Babka <[email protected]> Mon, 31 Jan 2011 02:14:23 +0100
Newsgroups gmane.linux.gentoo.java
Message-ID <[email protected]>
On 01/19/2011 04:03 PM, "Miroslav =A9ulc (fordfrog)" wrote:
> hi,
>
> i was looking at the issues when some classes cannot be found via
> DEPENDS, like http://bugs.gentoo.org/show_bug.cgi?id=3D298689. the prob=
lem
> is that DEPENDS for ant tasks does not contain dependency on ant-core.
> this patch below could fix it (at least it fixed the issue for me and
> testing some junit ant tasks while emerging packages with
> FEATURES=3D"test" worked too):

This could work for ant-tasks themselves, but not for everything else=20
that has ant-core dependency, such as when a package provides some ant=20
task. In that case, the depending classes are needed only when invoked=20
from within ant, in which case they are already on classpath.=20
Registering as dependency would make ant put on classpath in all cases=20
the package is used.
The bottom line is, there should be a way to exclude stuff (such as ant=20
classes) in java-dep-check.

BTW, the mailing list is better than the java alias for this. Seems to=20
get much less spam as I see it :)

Vlastimil

> $ cvs diff ant-tasks.eclass
> Index: ant-tasks.eclass
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /var/cvsroot/gentoo-x86/eclass/ant-tasks.eclass,v
> retrieving revision 1.8
> diff -r1.8 ant-tasks.eclass
> 174a176
>>      java-pkg_register-dependency ant-core ant.jar
>
> any objections against committing this?
>
> miroslav