【已解决】Docker编译时cpu-maven-plugin包问题

Viewed 42

【版本】V2.0.4-rc06

1,编译时会自动下载spring-plugin中的jar包和pom文件,但会报错格式有问题。报错如下:

Downloaded from paic-yun: http://maven.paic.com.cn/repository/maven-public/net/sourceforge/czt/dev/cup-maven-plugin/1.6-cdh/cup-maven-plugin-1.6-cdh.jar (159 kB at 224 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for fe-common 1.2-SNAPSHOT:
[INFO]
[INFO] fe-common .......................................... SUCCESS [ 40.626 s]
[INFO] spark-dpp .......................................... SUCCESS [ 53.855 s]
[INFO] fe-core ............................................ FAILURE [ 1.028 s]
[INFO] hive-udf ........................................... SKIPPED
[INFO] java-common ........................................ SKIPPED
[INFO] hudi-scanner ....................................... SKIPPED
[INFO] java-udf ........................................... SKIPPED
[INFO] jdbc-scanner ....................................... SKIPPED
[INFO] paimon-scanner ..................................... SKIPPED
[INFO] max-compute-scanner ................................ SKIPPED
[INFO] avro-scanner ....................................... SKIPPED
[INFO] preload-extensions ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:36 min
[INFO] Finished at: 2024-03-20T08:42:42Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to parse plugin descriptor for net.sourceforge.czt.dev:cup-maven-plugin:1.6-cdh (/repository/net/sourceforge/czt/dev/cup-maven-plugin/1.6-cdh/cup-maven-plugin-1.6-cdh.jar): error in opening zip file -> [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.

2,如果手动换成spring仓库中的jar包,则会报类找不到:

[INFO] --- maven-clean-plugin:3.1.0:clean (auto-clean) @ fe-core ---
[INFO] Deleting /doris-src/doris/fe/fe-core/target
[INFO]
[INFO] --- cup-maven-plugin:1.6-cdh:generate (cup) @ fe-core ---
[INFO] CUP: Processing 1 cup files
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for fe-common 1.2-SNAPSHOT:
[INFO]
[INFO] fe-common .......................................... SUCCESS [ 43.369 s]
[INFO] spark-dpp .......................................... SUCCESS [ 53.837 s]
[INFO] fe-core ............................................ FAILURE [02:27 min]
[INFO] hive-udf ........................................... SKIPPED
[INFO] java-common ........................................ SKIPPED
[INFO] hudi-scanner ....................................... SKIPPED
[INFO] java-udf ........................................... SKIPPED
[INFO] jdbc-scanner ....................................... SKIPPED
[INFO] paimon-scanner ..................................... SKIPPED
[INFO] max-compute-scanner ................................ SKIPPED
[INFO] avro-scanner ....................................... SKIPPED
[INFO] preload-extensions ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:04 min
[INFO] Finished at: 2024-03-20T08:12:07Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.sourceforge.czt.dev:cup-maven-plugin:1.6-cdh:generate (cup) on project fe-core: Execution cup of goal net.sourceforge.czt.dev:cup-maven-plugin:1.6-cdh:generate failed: A required class was missing while executing net.sourceforge.czt.dev:cup-maven-plugin:1.6-cdh:generate: java_cup/runtime/SymbolFactory
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>net.sourceforge.czt.dev:cup-maven-plugin:1.6-cdh
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/repository/net/sourceforge/czt/dev/cup-maven-plugin/1.6-cdh/cup-maven-plugin-1.6-cdh.jar
[ERROR] urls[1] = file:/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
[ERROR] urls[2] = file:/repository/org/apache/xbean/xbean-reflect/3.4/xbean-reflect-3.4.jar
[ERROR] urls[3] = file:/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
[ERROR] urls[4] = file:/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar
[ERROR] urls[5] = file:/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar
[ERROR] urls[6] = file:/repository/junit/junit/3.8.2/junit-3.8.2.jar
[ERROR] urls[7] = file:/repository/org/codehaus/plexus/plexus-utils/3.0.4/plexus-utils-3.0.4.jar
[ERROR] urls[8] = file:/repository/net/sourceforge/czt/dev/java-cup/0.11-a-czt02-cdh/java-cup-0.11-a-czt02-cdh.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : java_cup.runtime.SymbolFactory
[ERROR] -> [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/PluginContainerException

1 Answers

net.sourceforge.czt.dev 相关 Jar 包下载失败问题,可参考如下方案处理:
1.先更换 mirror 源 url 为如下路径,保存后继续编译,1.6-cdh 下载成功后再恢复至原有 url 完成编译。

<mirror>
        <id>aliyunmaven</id>
        <mirrorOf>central</mirrorOf>
        <name>aliyun maven</name>
        <url>https://repository.cloudera.com/repository/libs-release-local/</url>
    </mirror>

2.通过以下连接下载 pom 及 jar 包,放至 .m2/net/sourceforge/czt/dev 仓库目录下,完成编译
https://repository.cloudera.com/#browse/search=keyword%3Dnet.sourceforge.czt.dev