无法编译Artifactory 7.10.2。

huangapple go评论81阅读模式
英文:

Can't compile Artifactory 7.10.2

问题

JFrog发布了Artifactory 7.10.2的源代码后,我尝试构建它,但未成功。

该项目似乎是一个Maven项目(根项目中有一个pom.xml,所以我认为是这样的)。
从项目的根目录开始,我执行了常规的mvn package命令,但出现了错误:

$ mvn package
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.artifactory:artifactory-parent:7.10.2: Failure to find org.jfrog.common:jfrog-parent-pom:pom:7.10.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 21, column 13
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.artifactory:artifactory-parent:7.10.2 (/tmp/jfrog-artifactory-7.10.2/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.artifactory:artifactory-parent:7.10.2: Failure to find org.jfrog.common:jfrog-parent-pom:pom:7.10.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 21, column 13 -> [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

看起来项目本身需要一个本地依赖项,但似乎不包含在发布的tar.gz文件中。
查看6.23.x源代码,发现这里有一个缺失的artifactory-parent引用,但我认为不会使用旧依赖项编译。

最后,我检查了build/ci文件夹,其中有一个pipelines_build.sh脚本,但运行它时我遇到了另一个错误:

./pipelines_build.sh
./pipelines_build.sh: line 6: /tmp/build/ci/scripts/lib/buildInfoUtils.sh: No such file or directory

似乎在这里也没有足够的信息来构建产品。

就这些问题而言,我从这个答案中找到了源代码:https://stackoverflow.com/q/43481238/9306378

我做错了什么吗?有人可以帮我构建Artifactory吗?

英文:

After JFrog released the source code for Artifactory 7.10.2, I tried to build it, without success.

The project seems to be a maven one (there is a pom.xml in the root project, so I guess so).
From the root of the project I gave the usual mvn package, but this resulted in an error:

$ mvn package
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.artifactory:artifactory-parent:7.10.2: Failure to find org.jfrog.common:jfrog-parent-pom:pom:7.10.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 21, column 13
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.artifactory:artifactory-parent:7.10.2 (/tmp/jfrog-artifactory-7.10.2/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.artifactory:artifactory-parent:7.10.2: Failure to find org.jfrog.common:jfrog-parent-pom:pom:7.10.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 21, column 13 -> [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

It seems that the project itself requires a local dependency, that it is not available to the tar.gz released though.
Looking at the 6.23.x source code there is a reference to artifactory-parent that is missing here, but I don't think it will compile using the old dependency.

Finally, I checked the build/ci folder, where there is a pipelines_build.sh script, but when launching it I have another error:

./pipelines_build.sh
./pipelines_build.sh: line 6: /tmp/build/ci/scripts/lib/buildInfoUtils.sh: No such file or directory

It seems that also here the tarball doesn't contain all the information in order to build the product.

For what it matters, I found the source code from this answer: https://stackoverflow.com/q/43481238/9306378

I'm doing something wrong? Can anyone help me building Artifactory?

答案1

得分: 1

你需要使用JCenter而不是Maven中央仓库。前往jcenter下载settings.xml,然后重试。

英文:

You need to use JCenter not Maven central. Goto jcenter and download the settings.xml and then try again.

huangapple
  • 本文由 发表于 2020年10月26日 17:08:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/64534185.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定