activityworkshop / GpsPrune

GpsPrune is a map-based application for viewing, editing and converting coordinate data from GPS systems.
GNU General Public License v2.0
68 stars 21 forks source link

Maven build broken #67

Closed pykereaper closed 1 year ago

pykereaper commented 1 year ago

Hi,

I was working on a Gradle build script, as requested in the build documentation. I stumbled upon a problem, which also affects the Maven build.

There are three jar dependencies referenced in the project:

Only the first two are hosted on Maven Central, where the third one is included via http://nexus.talanlabs.com/content/repositories/releases/ . Problem is, that this this repo either isn't public any more (requires authentication) or is completely empty. The dependency can't be fetched from there any more, which breaks the Maven (and the Gradle) build.

Two solutions to tackle this problem come to my mind:

  1. Add the lib to the Git project (in a folder /libs) and use that one in Maven (and Gradle).
  2. Change the include to java3d:j3d-core-utils:1.5.2, which seems to be the same package and is available from https://maven.scijava.org/content/repositories/public/. However, this might only be a temporary fix, as this server neither is guaranteed to stay alive.

I'd be happy to provide a pull request if you name your favorite solution.

PS: I know via the build documentation, that it is also recommended to install the j3d dependencies locally. However, this is a huge hustle in automated builds on a CI/CD server.

activityworkshop commented 1 year ago

Hi, Thanks for helping with this. Those three jars you mention should all be distributed together as part of java3d, so they should definitely all have the same version number. I would expect 1.5.2, but I would also be happy with higher version numbers if they can be made to work. But for sure having a mix of 1.3.1 and 1.5.2 sounds very wrong.

I agree that there should be a Maven/Gradle way of handling these (fairly standard) dependencies as that's kind of all they have to do in this use case. If they require that java3d is installed already then I don't really understand what advantage Maven/Gradle are giving you here.

I don't like the idea of including java3d in the /libs directory of GpsPrune, because:

  1. java3d is a separate project, and distributed separately, and I don't want to duplicate unnecessary code here. It's just a dependency.
  2. java3d is optional for users of GpsPrune, so if they don't want it then they don't have to have it
  3. java3d is as far as I know platform-dependent, as it includes native code. Including java3d with GpsPrune would then remove GpsPrune's platform-independence.
pykereaper commented 1 year ago

I completely agree with all you've written.

You can expect two pull requests:

  1. Fixing of the maven build by referencing a intact nexus repo + uniform usage of the same java3d version (1.5.2 - the most current one)
  2. A Gradle buildscript