Build failure within docker container, 501 HTTPS required
DataAndDeadlifts opened this issue · comments
Describe the bug
I am attempting to run the Karma webserver in a docker container. I have gotten all the way to the build stage before failing on and HTTPS error using maven. I suspect something is not configured in the pom to use https.
To Reproduce
Steps to reproduce the behavior:
- Make a Dockerfile like so;
FROM maven:3-jdk-8
MAINTAINER YOUR-NAME-HERE
# confirm git is installed
RUN apt-get install -y git
RUN git config --global http.proxy http://COMPANY_WEB_PROXY
RUN git config --global https.proxy https://COMPANY_WEB_PROXY
RUN git clone https://github.com/usc-isi-i2/Web-Karma.git
RUN cd Web-Karma \
&& mvn clean install -Dhttp.proxyHost=COMPANY_WEB_PROXY_HOST -Dhttp.proxyPort=COMPANY_WEB_PROXY_PORT \
-Dhttps.proxyHost=COMPANY_WEB_PROXY_HOST -Dhttps.proxyPort=COMPANY_WEB_PROXY_PORT
ENV MAX_MEM="8g"
ENV MAVEN_OPTS="-Xmx$MAX_MEM"
ENV MAVEN_HOME /usr/share/maven
EXPOSE 8080
WORKDIR /Web-Karma/karma-web
ENTRYPOINT ["mvn", "jetty:run"]
- Build the docker container with
docker build -t karma .
- See error at build stage for building karma-util;
[ERROR] Failed to execute goal on project karma-util: Could not resolve dependencies for project edu.isi:karma-util:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at org.json:json:jar:20131018: Failed to read artifact descriptor for org.json:json:jar:20131018: Could not transfer artifact org.json:json:pom:20131018 from/to central (http://repo1.maven.org/maven2/): Transfer failed for http://repo1.maven.org/maven2/org/json/json/20131018/json-20131018.pom 501 HTTPS Required -> [Help 1]
[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] 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] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :karma-util
Expected behavior
I expect the git repo to be cloned, built with maven, then ran with jetty.
Desktop (please complete the following information):
- OS: Windows, using docker
Fixed by changing all repo urls in the pom.xml from http to https.
Hi, I am getting following error while installing this, could you please help
Failed to execute goal on project import-spatial: Could not resolve dependencies for project edu.isi:import-spatial:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: org.geotools:gt-referencing:jar:9.0-M0, org.geotools:gt-epsg-hsql:jar:9.0-M0, org.geotools:gt-epsg-extension:jar:9.0-M0, org.geotools:gt-shapefile:jar:9.0-M0: Could not find artifact org.geotools:gt-referencing:jar:9.0-M0 in central (https://repo1.maven.org/maven2/)