wechaty / java-wechaty-getting-started

Java Wechaty Starter Project Template that Works Out-of-the-Box
https://gitpod.io/#https://github.com/wechaty/java-wechaty-getting-started
Apache License 2.0
46 stars 41 forks source link

Connect to repo.maven.apache.org:443 failed: Operation timed out #10

Open huan opened 4 years ago

huan commented 4 years ago

When I'm running make install on my MacBook Pro with my China Mobile phone hotspot, I got the following networking error and can not install successfully.

$ make install
mvn clean install -f examples/pom.xml
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------< io.github.wechaty:wechaty-examples >-----------------
[INFO] Building wechaty-examples 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.pom
Downloading from central: https://repo.maven.apache.org/maven2/io/perfmark/perfmark-api/0.19.0/perfmark-api-0.19.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:32 min
[INFO] Finished at: 2020-05-24T15:18:38+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project wechaty-examples: Could not resolve dependencies for project io.github.wechaty:wechaty-examples:jar:1.0.0-SNAPSHOT: Failed to collect dependencies at io.github.wechaty:wechaty:jar:1.0.0-SNAPSHOT -> io.github.wechaty:wechaty-puppet-hostie:jar:1.0.0-SNAPSHOT -> io.github.wechaty:grpc:jar:0.11.25 -> io.grpc:grpc-netty-shaded:jar:1.25.0 -> io.grpc:grpc-core:jar:1.25.0 -> com.google.android:annotations:jar:4.1.1.4: Failed to read artifact descriptor for com.google.android:annotations:jar:4.1.1.4: Could not transfer artifact com.google.android:annotations:pom:4.1.1.4 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.pom: Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.196.215] failed: Operation timed out -> [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/DependencyResolutionException
make: *** [install] Error 1

It would be better if we can use a China mirror for the installation, and add the howto into the README so that our developers can use it with just copy/paste.

huan commented 4 years ago

After PR #9 (use aliyun maven mirror):

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project wechaty-examples: Execution default-clean of goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean failed: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-clean-plugin:jar:2.5 -> org.apache.maven:maven-plugin-api:jar:2.0.6: Failed to read artifact descriptor for org.apache.maven:maven-plugin-api:jar:2.0.6: Could not transfer artifact org.apache.maven:maven-plugin-api:pom:2.0.6 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.pom: Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.52.215] failed: Operation timed out -> [Help 1]

It seems that we are still download something from the maven.apache.org server instead of the aliyun.