[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PROPOSAL] dh_ant



Hallo Jan,

* Jan Schulz wrote:
>For the infrastructure: This shouldn't be the problem: We don't have
>to deal with 'runtime' loading, just with adding something 'shortly
>before runtime'. Plugins should be done anyway with seperate dirs and
>classloader (that's at least my experience with eclipse, which has all
>its jars in a different folder(s)). This could be dealt with
>specifying a 'dir' instead of a jar (simple traversing like ant does
>it now) or letting the 'getJavaClasspath' skript figure that out
>(With for example a CONTRIBUTING-TO="ant" and a update-javeclasspath
>skript in post(rm|inst).

done...

-> www.katzien.de/debian/java/java_classpath.tar.gz
-> untar in &HOME and it will unpack into $HOME/tmp/java, which is
currently set as the default 'jars' dir. I've also included my
testfiles.

two scripts:

** getclasspath.sh
-> call with --classpath|--contrib|-all <package> [<package>]...
will echo the classpath for the package(s).
--classpath only the direct line
--contrib only the 'contributed_to' line
--all both, but cleaned of double entries

direct line is:
Jars mentioend with the JARS variable and all JARS of the packages,
which are in DEPENDS variable (recusivly)

'contributed_to' line: 
JARS, which are 'contributed to' a package and their DEPENDS (recusivly)
this can be usefull in case of 'plugin' jars, which the 'parent'
package has no knowledge about, but anyway need to be on the classpath
(ant <-> new tasks)

example: 
jan@snoopy:~$ getclasspath.sh --all libswt2.1-motif-java
/usr/share/java/swt2.1-motif.jar
jan@snoopy:~$ getclasspath.sh --contrib hallo
conributer.jar
...

** update_javaclasspath.sh
updates the 'contributed_to' line -> should be called in
postinst|postrm of plugin packages

see the contrib_* files in $HOME/tmp/java and 'contributer.jars'.

It should be possible to seperate the 'functions' out into a seperate
file, so that the functions can be used in the startscripts directy
(if they are bash...)

Please note, that I did this scripts this afternoon, so don't expect a
bugfree version... I tested it with the example 'jars' files and it
seems to work.

Any comments welcome!

Jan
-- 
Jan Schulz                     jasc@gmx.net
     "Wer nicht fragt, bleibt dumm."



Reply to: