amsa-code / risky

Tools for analyzing timestamped position data particularly vessel position reports from AIS.
Apache License 2.0
13 stars 9 forks source link

Failing to build and install on a "fresh" system #2

Closed SvenDowideit closed 6 years ago

SvenDowideit commented 6 years ago

I have a Dockerfile that starts with:

FROM maven:3-jdk-8

# risky isn't released yet
WORKDIR /risky
RUN git clone --depth 1 -b 0.5.20 https://github.com/amsa-code/risky.git \
    && cd risky \
    && mvn clean install

and it consistently fails (in the same way as my Linux desktop):

...
[WARNING] The POM for jgridshift:jgridshift:jar:1.0 is missing, no dependency information available
...
Downloaded from central: https://repo.maven.apache.org/maven2/commons-pool/commons-pool/1.5.4/commons-pool-1.5.4.jar (96 kB at 67 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] parent 0.5.20 ...................................... SUCCESS [02:11 min]
[INFO] streams ............................................ SUCCESS [01:14 min]
[INFO] risky-util ......................................... SUCCESS [  5.483 s]
[INFO] formats ............................................ SUCCESS [01:15 min]
[INFO] ais ................................................ SUCCESS [ 20.417 s]
[INFO] geotools-extras .................................... FAILURE [ 34.575 s]
[INFO] ihs-reader ......................................... SKIPPED
[INFO] behaviour-detector ................................. SKIPPED
[INFO] geo-analyzer ....................................... SKIPPED
[INFO] spark .............................................. SKIPPED
[INFO] craft-analyzer-wms ................................. SKIPPED
[INFO] h2spatial .......................................... SKIPPED
[INFO] mariweb-archive-parser ............................. SKIPPED
[INFO] ais-router 0.5.20 .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:41 min
[INFO] Finished at: 2018-04-10T04:43:38Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project geotools-extras: Could not resolve dependencies for project au.gov.amsa.risky:geotools-extras:jar:0.5.20: The following artifacts could not be resolved: javax.media:jai_core:jar:1.1.3, jgridshift:jgridshift:jar:1.0: Could not find artifact javax.media:jai_core:jar:1.1.3 in osgeo (https://repo.boundlessgeo.com/main), try downloading from https://jai.dev.java.net/binary-builds.html -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :geotools-extras
The command '/bin/sh -c git clone --depth 1 -b 0.5.20 https://github.com/amsa-code/risky.git     && cd risky     && mvn clean install' returned a non-zero code: 1
Makefile:9: recipe for target 'build' failed
make: *** [build] Error 1
davidmoten commented 6 years ago

Yep that's right. I'll sort that out. In the meantime add this to the top level pom.xml:

<repository>
    <id>osgeo</id>
    <name>Open Source Geospatial Foundation Repository</name>
    <url>http://download.osgeo.org/webdav/geotools/</url>
</repository>

I removed this a little while ago because AMSA rejects many http loaded jars with overzealous security checking. Trouble is the https repo (boundless) is incomplete so we cached the missing ones in our private maven repository. Anyway, try adding the above repo and build again.

davidmoten commented 6 years ago

@SvenDowideit I've added it myself, just do a git pull

davidmoten commented 6 years ago

happy to build another release if needed once we know that it works.

davidmoten commented 6 years ago

Travis build is passing now.

davidmoten commented 6 years ago

@SvenDowideit I've added a branch 0.5.20.patched which is 0.5.20 with the extra repository. Try that!

SvenDowideit commented 6 years ago

@davidmoten merci! it works - so long as i don't run mvn dependency:resolve (yup, I'm not a java dev.... yet)

SvenDowideit commented 6 years ago

closing as works for me ;)