On Thu May 03 10:02, Florian Weimer wrote:
> * Michael Koch:
>
> > On Thu, May 03, 2007 at 03:51:11AM +0200, Florian Weimer wrote:
> >> * Matthew Johnson:
> >>
> >> > Two subjects to this mail. Firstly, I had a go at writing a dh_javadeps
> >> > which will search for jar files, find the classes they reference and
> >> > find the packages they are in. This can be found at
> >> > http://mjj29.matthew.ath.cx/dh_javadeps It updates $package.substvars so
> >> > you can use ${java:Depends} in control files.
> >>
> >> I assume that nowadays, you want to set the Classpath: attribute in
> >> JARs, so that you don't have to list all dependencies recursively in
> >> wrapper scripts. This means that the dependency information is
> >> already needed when building the JAR file.
> >
> > This is no replacement for package dependencies. And its not very
> > optimal.
>
> What I meant is that you need to determine the dependencies earlier in
> the process, not just when writing the control file.
>
OK, so as an alternative, I have a version which reads the Class-Path:
variable from the jar. This is rather more efficient as well. I assume
upstream's build should set this to sensible values and that therefore
the packaging can just include a call to make or ant then dh_javadeps
and doesn't need to list them anywhere.
This also solves the problem of 'which jar containing the same class to
use'; there should never be two packages providing the same jar.
new version at http://mjj29.matthew.ath.cx/dh_javadeps
Matt
--
Matthew Johnson
Attachment:
signature.asc
Description: Digital signature