Apache-ant-1.10.5를 빌드할 수 없습니다.

Apache-ant-1.10.5를 빌드할 수 없습니다.

BLFS 8.4를 빌드하려고 합니다. fetch.xml ant 빌드 스크립트를 사용하여 런타임 종속성을 다운로드하려고 할 때 오류가 발생합니다. bootstrap/bin/ant -f fetch.xml -Ddest=optional

실수:

BUILD FAILED
/sources/BLFS/apache-ant-1.10.5/fetch.xml:212: The following error occurred while executing this line:
sources/BLFS/apache-ant-1.10.5/fetch.xml:122: Unable to resolve artifact: Missing:
--------
1) org.apache.ant:ant-antunit:jar:1.4

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.ant -DartifactId=ant-antunit -Dversion=1.4 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:

mvn deploy:deploy-file -DgroupId=org.apache.net -DartifactId=ant-antunit -Dversion=1.4 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:pom:2.0
2) org.apache.ant:ant-antunit:jar:1.4

----------
1 required artifact is missing.

for artifact:
org.apache.maven:super-pom:pom:2.0

from the specified remote repositories:
central (http://repo1.maven.org/maven2/)

하드웨어 제한으로 인해 호스트 시스템에 BLFS 8.4를 구축하고 있습니다. 배쉬 5.0을 사용하고 있어요

답변1

다음 지침을 사용하여 수동으로 버전을 빌드해 보았습니다.개미 만들기(개미 매뉴얼) 결합하다Apache Ant 설치(BLFS 8.4)오류가 발생합니다.

$ export JAVA_HOME=/path/to/my/java-11-openjdk-amd64
$ ./bootstrap.sh
$ bootstrap/bin/ant -f fetch.xml -Ddest=optional
...
[artifact:dependencies] Downloading: org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.pom from repository central at http://repo1.maven.org/maven2/
[artifact:dependencies] Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.pom
[artifact:dependencies] [WARNING] Unable to get resource 'org.apache.ant:ant-antunit:pom:1.4' from repository central (http://repo1.maven.org/maven2/): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.pom
[artifact:dependencies] Downloading: org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.jar from repository central at http://repo1.maven.org/maven2/
[artifact:dependencies] Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.jar
[artifact:dependencies] [WARNING] Unable to get resource 'org.apache.ant:ant-antunit:jar:1.4' from repository central (http://repo1.maven.org/maven2/): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.jar
[artifact:dependencies] An error has occurred while processing the Maven artifact tasks.
...

당신이 열면http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.pomhttps가 필요하다는 것을 알 수 있습니다.

해결책

URL을 편집 ./lib/libraries.properties하고 다음으로 변경합니다(라인 29).m2.repohttphttps

# Repository to use by default for fetching dependencies.
m2.repo=https://repo1.maven.org/maven2/

그리고 달리다

bootstrap/bin/ant -f fetch.xml -Ddest=optional

다시.

관련 정보