Details
Description
We tried to remove the "gt2-" prefix in module names, in order to have <artifactID> matching exactly the directory name. Such match allowed us to remove the <scm> section in all pom.xml files. We also though that a "gt-" prefix was redundant with the <groupId>org.geotools</groupId> declaration. However experience show that it leads to two problems:
- The "gt-" prefix do not appears in the manifest classpath when building a single module (MJAR-61).
- Name clash in eclipse projects when two projects are mounted using maven-eclipse-plugin (
MECLIPSE-119)
The path of less resistance seems to reinsert the "gt2-" prefix back in all module names. We would have to reinsert the <scm> section in all modules too, which is error prone. However we would revisit this issue if the above-cited Maven issue are fixed.
Issue Links
- depends upon
-
MJAR-61
Manifest classpath ignores the "real" JAR filenames specified in <finalName>
-
-
MECLIPSE-119
Allow custom project name for eclipse projects
-
-
MECLIPSE-251
Allows prefixing of eclipse project name
-
- is related to
-
GEOT-982
Reorganize the source directory structure for Maven 2 standard compliance
-
Everything work well for Maven builds using the dependencies declared in the pom.xml file. The problem happen in the META-INF/MANIFEST.MF file generated automatically by Maven, more specifically in the "Class-path" entry.
Lets use the "brewer" module as an example (because it is a small one). If you run "mvn install" from the Geotools root, you get:
Class-Path: concurrent-1.3.4.jar jsr108-0.01.jar gt-api-2.4-SNAPSHOT.j
ar gt-coverage-2.4-SNAPSHOT.jar vecmath-1.3.1.jar gt-referencing-2.4-
SNAPSHOT.jar jts-1.7.1.jar gt-main-2.4-SNAPSHOT.jar geoapi-nogenerics
-2.1-SNAPSHOT.jar
Note the "gt-" prefix in front of Geotools JAR filename. This is what we want. The JAR deployed on the repository is like that as well. But if you chdir in modules/extension/brewer and run "mvn install" from that directory, then you get:
Class-Path: concurrent-1.3.4.jar jsr108-0.01.jar referencing-2.4-SNAPS
HOT.jar main-2.4-SNAPSHOT.jar api-2.4-SNAPSHOT.jar vecmath-1.3.1.jar
jdom-1.0.jar coverage-2.4-SNAPSHOT.jar jts-1.7.1.jar geoapi-nogeneric
s-2.1-SNAPSHOT.jar
The "gt-" prefix are gone! The same happen if a user run "mvn install" from his own module. The consequence is that if he drops his JAR file into a directory containing all Geotools JARs, the Geotools JARs will not be found automatically anymore.