Ошибка сборки на parquet-tools из-за relativePath - PullRequest
0 голосов
/ 05 августа 2020

Я хочу получить паркетный инструмент в Docker. Это нужно построить. Но не удалось с сообщением об ошибке ниже.

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

Я пробую это , но не сработало. Inte rnet соединение в порядке. и попробуйте другой компьютер, воспроизведите его.

Эта проблема, возможно, pom's relativePath. Maven не может прочитать родительский POM и вызвать ОШИБКУ.

Это Dockerfile, который воспроизводит среду ошибки.

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

Кто-нибудь может мне помочь?

1 Ответ

0 голосов
/ 06 августа 2020

Я нашел решение.

Используйте OpenJDK-8 и используйте этот код файла докеров .

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

Эта ошибка возникает, когда OpenJDK-11. Используйте OpenJDK-8.

...