Jody Garnett a écrit :
Any other ideas? Any wisdom? Any magic spells to restore sanity to the
class loader mechanism?
Ant!
Not needed, provided that next geotools-bin*.zip zipball are produced with Maven 2 (in which case
the user would not be required to use Maven 2 himself). The trick is:
- All JARs (including dependencies external to the Geotools project) are in the
same directory.
- Every Geotools JAR contains a "Class-path" entry in their
META-INF/MANIFEST.MF file.
This means that users need to put nothing else that the JAR he is directly using in his classpath.
Java will find automatically all other required JAR thanks to the informations provided in the
MANIFEST.MF file, which is filled automatically by Maven 2. Note that the "Class-path" entry in
META-INF/MANIFEST.MF exists since J2SE 1.2 if I remember right.
For example, if the user just want to read shapefile but doesn't need rendering (for example) at
this time, then he can write:
java -classpath /pathToGtLibraries/gt2-shapefile-2.3-SNAPSHOT.jar MyApplication
All other required dependencies like gt2-main-2.3-SNAPSHOT.jar, gt2-referencing-2.3-SNAPSHOT.jar,
jts-1.7.jar, vecmath-1.3.1.jar, etc. are inferred automatically. The only constraint is that those
files must live in the same directory than gt2-shapefile-2.3-SNAPSHOT.jar and the files can't be
renamed (actually, renaming them require a new Maven 2 build).
Note: is is also possible to instruct Maven 1 to fill the "Class-path" entry in META-INF/MANIFEST.MF
file, but it is a little bit more complicated than Maven 2. Do we want to put more energy into Maven
1 build, or just try to finish the switch to Maven 2?
Martin.
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel