3

I was trying to get started with using (not making contributions to) the geotools lib yesterday,but i ended up trying to figure out what purpose does maven serve when it comes to someone that just wants to build a small/medium app based on geotools;At first i thought that using maven spares the dev on writing all the imports ( that's what i recon dependencies are BTW) but after reading a blog that had a somewhat modified version of the quickstart tutorial i'm not that sure anymore..Could someone make clarify what is maven's use for someone that just wants to build some apps and not make contributions?

Trimmer
  • 31
  • 2

2 Answers2

3

Maven has nothing to do with saving you from import declarations in Java source files. It is about handling your whole project and that might include dependencies. But you still have to write imports in Java. If your project is to small for maven to be useful, don't use it. But in larger project a declarative build description, dependency management tool is definitely useful.

jmg
  • 7,308
  • 1
  • 18
  • 22
2

I wouldn't attempt to use the GeoTools library without Maven, it is a large and quite complex project with 10s of jars. Your app will probably only need 5-10 of those jars but without Maven it is almost impossible to work out which 5-10 you'll need. For example you will probably want to read in some data, so you'll need gt-data and at least one specific datastore gt-shapefile or gt-postgis. I'm pretty sure one of those will need to use a coordinate system so gt-referencing (and a specific implementation, say gt-epsg-hsql).

Anyway you should probably work through at least the quick start tutorial to see what Maven does for you.

Ian Turton
  • 10,018
  • 1
  • 28
  • 47
  • I agree. My current assignment is with a customer who can't add Maven to their tool stack at the moment, but did want to use GeoTools. I ended up working through the quick start tutorial and manually copying over all the JARs from the local Maven repository and into an existing project. I felt a little dirty afterward, but it allowed me to introduce GeoTools without Maven. Forget about updating to a new version without Maven though. – Jim Tough May 14 '11 at 00:52