Idea Maven configuration mirroring address the overall problem, check the trouble here! (up to date)

Focus Chan, a habit.
Message exchange, to grow you and me.

First, the problem retroactive

I use the idea, using Maven to download dependencies, always download unsuccessful. I checked the address, replaced Ali mirrored address, but still take a lot of red wavy line package did not download. After checking a variety of materials, various attempts, no solution.

Look at the issue screenshot

To see so many red wavy line, is not very large head.

It is said that you can replace Ali Maven mirror ah, I configure more than one, a number, but that does not work.

My original configuration of the Maven settings.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <mirrors>
        <mirror>
      <id>nexus-aliyun</id>
      <mirrorOf>*</mirrorOf>
      <name>Nexus aliyun</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public</url>
    </mirror>

    <mirror>
      <id>repo1</id>
      <mirrorOf>central</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://repo1.maven.org/maven2/</url>
    </mirror>


    <mirror>
      <id>repo2</id>
      <mirrorOf>central</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://repo2.maven.org/maven2/</url>
    </mirror>

    <mirror>
      <id>alimaven</id>
      <mirrorOf>central</mirrorOf>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
    </mirror>
    </mirrors>
</settings>

Read the above configuration, is not found nothing wrong it.

Some people say, you need to delete the downloaded package failed to find re-maven import operations. Well, I have tried many times, or did not download successfully.

Here the focus here,
the following focus here,
the following focus here,

In my implementation maven install, see the operation log, to find such a line error message

D:\tools\Java\jdk1.8.0_151\bin\java.exe -Dmaven.multiModuleProjectDirectory=E:\fanglei\java\jpress "-Dmaven.home=D:\Program Files\JetBrains\IntelliJ IDEA 2019.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=D:\Program Files\JetBrains\IntelliJ IDEA 2019.1\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2019.1\lib\idea_rt.jar=60913:D:\Program Files\JetBrains\IntelliJ IDEA 2019.1\bin" -Dfile.encoding=GBK -classpath "D:\Program Files\JetBrains\IntelliJ IDEA 2019.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version2019.1 -s C:\Users\fl\.m2\settings.xml install
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for io.jpress:starter-tomcat:war:3.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. @ io.jpress:starter-tomcat:[unknown-version], E:\fanglei\java\jpress\starter-tomcat\pom.xml, line 250, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-resources-plugin is missing. @ io.jpress:starter-tomcat:[unknown-version], E:\fanglei\java\jpress\starter-tomcat\pom.xml, line 215, column 21
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] parent
[INFO] codegen
[INFO] jpress-commons
[INFO] jpress-model
[INFO] jpress-service-api
[INFO] jpress-core
[INFO] jpress-addons
[INFO] jpress-addon-helloworld
[INFO] jpress-web
[INFO] jpress-service-provider
[INFO] jpress-template
[INFO] module-article
[INFO] module-article-model
[INFO] module-article-service-api
[INFO] module-article-search-api
[INFO] module-article-search-db
[INFO] module-article-search-lucene
[INFO] module-article-search-es
[INFO] module-article-search-opensearch
[INFO] module-article-service-provider
[INFO] module-article-web
[INFO] module-page
[INFO] module-page-model
[INFO] module-page-service-api
[INFO] module-page-service-provider
[INFO] module-page-web
[INFO] module-product
[INFO] module-product-model
[INFO] module-product-service-api
[INFO] module-product-search-api
[INFO] module-product-search-db
[INFO] module-product-search-lucene
[INFO] module-product-search-es
[INFO] module-product-search-opensearch
[INFO] module-product-service-provider
[INFO] module-product-web
[INFO] starter
[INFO] starter-tomcat
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building parent 3.0
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] parent ............................................. FAILURE [  1.449 s]
[INFO] codegen ............................................ SKIPPED
[INFO] jpress-commons ..................................... SKIPPED
[INFO] jpress-model ....................................... SKIPPED
[INFO] jpress-service-api ................................. SKIPPED
[INFO] jpress-core ........................................ SKIPPED
[INFO] jpress-addons ...................................... SKIPPED
[INFO] jpress-addon-helloworld ............................ SKIPPED
[INFO] jpress-web ......................................... SKIPPED
[INFO] jpress-service-provider ............................ SKIPPED
[INFO] jpress-template .................................... SKIPPED
[INFO] module-article ..................................... SKIPPED
[INFO] module-article-model ............................... SKIPPED
[INFO] module-article-service-api ......................... SKIPPED
[INFO] module-article-search-api .......................... SKIPPED
[INFO] module-article-search-db ........................... SKIPPED
[INFO] module-article-search-lucene ....................... SKIPPED
[INFO] module-article-search-es ........................... SKIPPED
[INFO] module-article-search-opensearch ................... SKIPPED
[INFO] module-article-service-provider .................... SKIPPED
[INFO] module-article-web ................................. SKIPPED
[INFO] module-page ........................................ SKIPPED
[INFO] module-page-model .................................. SKIPPED
[INFO] module-page-service-api ............................ SKIPPED
[INFO] module-page-service-provider ....................... SKIPPED
[INFO] module-page-web .................................... SKIPPED
[INFO] module-product ..................................... SKIPPED
[INFO] module-product-model ............................... SKIPPED
[INFO] module-product-service-api ......................... SKIPPED
[INFO] module-product-search-api .......................... SKIPPED
[INFO] module-product-search-db ........................... SKIPPED
[INFO] module-product-search-lucene ....................... SKIPPED
[INFO] module-product-search-es ........................... SKIPPED
[INFO] module-product-search-opensearch ................... SKIPPED
[INFO] module-product-service-provider .................... SKIPPED
[INFO] module-product-web ................................. SKIPPED
[INFO] starter ............................................ SKIPPED
[INFO] starter-tomcat ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.735 s
[INFO] Finished at: 2020-02-25T15:55:37+08:00
[INFO] Final Memory: 13M/307M
[INFO] ------------------------------------------------------------------------
(start 重要:这一行报错信息提示)
[ERROR] Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4: 
Could not transfer artifact org.apache.maven.plugins:maven-install-plugin:pom:2.4 
from/to repo1 (http://repo1.maven.org/maven2/): Failed to transfer file: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom.
 Return code is: 501, ReasonPhrase: HTTPS Required. -> [Help 1] 
(end 重要:这一行报错信息提示)
[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/PluginResolutionException

Process finished with exit code 1

From the above we can directly see the error message Return code is: 501, ReasonPhrase: HTTPS Required, since the location of the central bank are now required HTTPSto request succeeds.

Then we find the root of the problem, it is not it can be very quick to resolve.

Second, the solution of the Road

Solution to the problems: the need for the original http协议replaced https协议.

Provide an updated maven settings.xml configuration file is available as follows:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <mirrors>
        <mirror>
      <id>nexus-aliyun</id>
      <mirrorOf>*</mirrorOf>
      <name>Nexus aliyun</name>
      <url>https://maven.aliyun.com/nexus/content/groups/public</url>
    </mirror>

    <mirror>
      <id>repo1</id>
      <mirrorOf>central</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>https://repo1.maven.org/maven2/</url>
    </mirror>


    <mirror>
      <id>repo2</id>
      <mirrorOf>central</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>https://repo2.maven.org/maven2/</url>
    </mirror>

    <mirror>
      <id>alimaven</id>
      <mirrorOf>central</mirrorOf>
      <name>aliyun maven</name>
      <url>https://maven.aliyun.com/nexus/content/repositories/central/</url>
    </mirror>
    </mirrors>
</settings>

See Ali's image library are replaced https://, not right now a lot of information is online accesshttp://

I suggest that you also check, whether the configured address begins with https protocol, the proposed replacement.

Guess you like

Origin www.cnblogs.com/werewolfBoy/p/12362439.html