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を構築しています。 Bash 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

再び。

おすすめ記事