Home > database >  Error: maven-site-plugin:3.7.1 or one of its dependencies could not be resolved
Error: maven-site-plugin:3.7.1 or one of its dependencies could not be resolved

Time:06-01

This is my first maven program. I have succeeded to run "mvn compile", "mvn test", "mvn clean" but this error appears when I "mvn site."

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7.1:site (default-site) on project Hello: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.7.1:site failed: Plugin org.apache.maven.plugins:maven-site-plugin:3.7.1 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-site-plugin:jar:3.7.1 -> org.apache.maven.doxia:doxia-module-markdown:jar:1.8 -> com.vladsch.flexmark:flexmark-all:jar:0.18.4 -> com.vladsch.flexmark:flexmark-html-parser:jar:0.18.4: Failed to read artifact descriptor for com.vladsch.flexmark:flexmark-html-parser:jar:0.18.4: Could not transfer artifact com.vladsch.flexmark:flexmark-html-parser:pom:0.18.4 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.52.215] failed: Connection timed out: connect -> [Help 1]

I'm using jdk-12.0.2 and apache-maven-3.6.0 The following is my pom.xml and setting.xml.

pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
                             http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com._520it.maven</groupId>
  <artifactId>Hello</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>Hello</name>
  <dependencies>
    <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.9</version>
          <scope>test</scope>
      </dependency>           
  </dependencies>
  
  <build>
      <plugins>
        <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-site-plugin</artifactId>
              <version>3.7.1</version>
          </plugin>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-project-info-reports-plugin</artifactId>
              <version>3.0.0</version>
          </plugin>
      </plugins>
  </build>
</project>

For setting.xml, I didn't change anything but indicating my jdk version.

CodePudding user response:

Big thank you to @khmarbaise! The issue is due to a "Connection timed out." I quit my proxy and tried it again, it worked!!

  • Related