Build Failed on parquet-tools because of relativePath

170 Views Asked by At

I want to get parquet-tools in Docker. It's need to build. But failed with below error message.

root@f413770707af:/opt/parquet-mr# cd parquet-tools 
root@f413770707af:/opt/parquet-mr/parquet-tools# mvn clean package -Plocal
[INFO] Scanning for projects...
Downloading from jitpack.io: https://jitpack.io/org/apache/apache/16/apache-16.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/apache/16/apache-16.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.apache.parquet:parquet:1.12.0-SNAPSHOT: Could not transfer artifact org.apache:apache:pom:16 from/to jitpack.io (https://jitpack.io): Transfer failed for https://jitpack.io/org/apache/apache/16/apache-16.pom and 'parent.relativePath' points at wrong local POM @ org.apache.parquet:parquet:1.12.0-SNAPSHOT, /opt/parquet-mr/pom.xml, line 4, column 11
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.apache.parquet:parquet-tools:1.12.0-SNAPSHOT (/opt/parquet-mr/parquet-tools/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.apache.parquet:parquet:1.12.0-SNAPSHOT: Could not transfer artifact org.apache:apache:pom:16 from/to jitpack.io (https://jitpack.io): Transfer failed for https://jitpack.io/org/apache/apache/16/apache-16.pom and 'parent.relativePath' points at wrong local POM @ org.apache.parquet:parquet:1.12.0-SNAPSHOT, /opt/parquet-mr/pom.xml, line 4, column 11: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

I try this, but didn't work. Internet connection is fine. and try another computer, reproduce it.

This problem maybe pom's relativePath. Maven can't read parent POM and raise ERROR.

This is Dockerfile which reproduce error environment.

FROM python:3.7-stretch

RUN mkdir -p /usr/share/man/man1 \
    && echo 'deb http://ftp.debian.org/debian stretch-backports main' | tee /etc/apt/sources.list.d/stretch-backports.list \
    && apt-get update -yqq \
    && apt-get upgrade -yqq \
    && apt-get install -yqq --no-install-recommends \
        build-essential pv autoconf automake libtool curl make \
        g++ \
        unzip \
        libevent-dev automake libtool flex bison pkg-config xmlstarlet \
        libboost-all-dev \
        libssl-dev \
        openjdk-11-jdk 
RUN wget https://ftp.tsukuba.wide.ad.jp/software/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz \
    && tar -xzvf apache-maven-3.6.3-bin.tar.gz \
    && mv apache-maven-3.6.3 /opt/apache-maven \
    && git clone https://github.com/apache/parquet-mr.git \
    && mv parquet-mr /opt/parquet-mr

ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/
ENV PATH $PATH:/usr/lib/jvm/java-11-openjdk-amd64/bin
ENV PATH $PATH:/opt/apache-maven/bin

RUN java -version && mvn --version\
    && wget -nv http://archive.apache.org/dist/thrift/0.12.0/thrift-0.12.0.tar.gz \
    && tar xzf thrift-0.12.0.tar.gz \
    && mv thrift-0.12.0 /opt/thrift \
    && cd /opt/thrift/ \
    && chmod +x ./configure \
    && ./configure CFLAGS=-fPIC CXXFLAGS=-fPIC -disable-gen-erl -disable-gen-hs -without-ruby -without-haskell -without-erlang -without-php -without-nodejs \
    && make install

Can anyone help me?

1

There are 1 best solutions below

0
SuguruToyohara On

I found solution.

Use OpenJDK-8 and Use this dockerfile code.

FROM maven:3-jdk-8-alpine AS build

RUN apk add --no-cache ca-certificates git
RUN git clone --single-branch --depth=1 --branch=apache-parquet-1.9.0 https://github.com/apache/parquet-mr.git

WORKDIR /parquet-mr/parquet-tools
RUN mvn package -Plocal

FROM something/dockerimage:latest 

COPY --from=build /parquet-mr/parquet-tools/target/parquet-tools-1.9.0.jar /opt/parquet-tools.jar

This error raise when OpenJDK-11. Use OpenJDK-8.