web-dev-qa-db-ja.com

プラグインorg.Apache.maven.plugins:maven-clean-plugin:2.5またはその依存関係の1つを解決できませんでした

私のマシンにmavenをインストールしました。クラスパスとmavenホームフォルダを適切に設定しました。 mvn clean installを実行するたびに、例外が発生します。 .m2フォルダーも削除しようとしましたが、結果は同じです。

  • mvn -version出力

    Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T19:57:37+08:00)
    Maven home: C:\maven-3
    Java version: 1.7.0_45, vendor: Oracle Corporation
    Java home: D:\jdk170_45\jre
    Default locale: en_US, platform encoding: MS950
    OS name: "windows 7", version: "6.1", Arch: "x86", family: "windows"
    
  • mvn -X clean installのログ

        Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T19:57:37+08:00)
        Maven home: C:\maven-3
        Java version: 1.7.0_45, vendor: Oracle Corporation
        Java home: D:\jdk170_45\jre
        Default locale: en_US, platform encoding: MS950
        OS name: "windows 7", version: "6.1", Arch: "x86", family: "windows"
        [DEBUG] Created new class realm maven.api
        [DEBUG] Importing foreign packages into class realm maven.api
        [DEBUG]   Imported: javax.enterprise.inject.* < plexus.core
        [DEBUG]   Imported: javax.enterprise.util.* < plexus.core
        [DEBUG]   Imported: javax.inject.* < plexus.core
        [DEBUG]   Imported: org.Apache.maven.* < plexus.core
        [DEBUG]   Imported: org.Apache.maven.artifact < plexus.core
        [DEBUG]   Imported: org.Apache.maven.classrealm < plexus.core
        [DEBUG]   Imported: org.Apache.maven.cli < plexus.core
        [DEBUG]   Imported: org.Apache.maven.configuration < plexus.core
        [DEBUG]   Imported: org.Apache.maven.exception < plexus.core
        [DEBUG]   Imported: org.Apache.maven.execution < plexus.core
        [DEBUG]   Imported: org.Apache.maven.execution.scope < plexus.core
        [DEBUG]   Imported: org.Apache.maven.lifecycle < plexus.core
        [DEBUG]   Imported: org.Apache.maven.model < plexus.core
        [DEBUG]   Imported: org.Apache.maven.monitor < plexus.core
        [DEBUG]   Imported: org.Apache.maven.plugin < plexus.core
        [DEBUG]   Imported: org.Apache.maven.profiles < plexus.core
        [DEBUG]   Imported: org.Apache.maven.project < plexus.core
        [DEBUG]   Imported: org.Apache.maven.reporting < plexus.core
        [DEBUG]   Imported: org.Apache.maven.repository < plexus.core
        [DEBUG]   Imported: org.Apache.maven.rtinfo < plexus.core
        [DEBUG]   Imported: org.Apache.maven.settings < plexus.core
        [DEBUG]   Imported: org.Apache.maven.toolchain < plexus.core
        [DEBUG]   Imported: org.Apache.maven.usability < plexus.core
        [DEBUG]   Imported: org.Apache.maven.wagon.* < plexus.core
        [DEBUG]   Imported: org.Apache.maven.wagon.authentication < plexus.core
        [DEBUG]   Imported: org.Apache.maven.wagon.authorization < plexus.core
        [DEBUG]   Imported: org.Apache.maven.wagon.events < plexus.core
        [DEBUG]   Imported: org.Apache.maven.wagon.observers < plexus.core
        [DEBUG]   Imported: org.Apache.maven.wagon.proxy < plexus.core
        [DEBUG]   Imported: org.Apache.maven.wagon.repository < plexus.core
        [DEBUG]   Imported: org.Apache.maven.wagon.resource < plexus.core
        [DEBUG]   Imported: org.codehaus.classworlds < plexus.core
        [DEBUG]   Imported: org.codehaus.plexus.* < plexus.core
        [DEBUG]   Imported: org.codehaus.plexus.classworlds < plexus.core
        [DEBUG]   Imported: org.codehaus.plexus.component < plexus.core
        [DEBUG]   Imported: org.codehaus.plexus.configuration < plexus.core
        [DEBUG]   Imported: org.codehaus.plexus.container < plexus.core
        [DEBUG]   Imported: org.codehaus.plexus.context < plexus.core
        [DEBUG]   Imported: org.codehaus.plexus.lifecycle < plexus.core
        [DEBUG]   Imported: org.codehaus.plexus.logging < plexus.core
        [DEBUG]   Imported: org.codehaus.plexus.personality < plexus.core
        [DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
        [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
        [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
        [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
        [DEBUG]   Imported: org.Eclipse.aether.* < plexus.core
        [DEBUG]   Imported: org.Eclipse.aether.artifact < plexus.core
        [DEBUG]   Imported: org.Eclipse.aether.collection < plexus.core
        [DEBUG]   Imported: org.Eclipse.aether.deployment < plexus.core
        [DEBUG]   Imported: org.Eclipse.aether.graph < plexus.core
        [DEBUG]   Imported: org.Eclipse.aether.impl < plexus.core
        [DEBUG]   Imported: org.Eclipse.aether.installation < plexus.core
        [DEBUG]   Imported: org.Eclipse.aether.internal.impl < plexus.core
        [DEBUG]   Imported: org.Eclipse.aether.metadata < plexus.core
        [DEBUG]   Imported: org.Eclipse.aether.repository < plexus.core
        [DEBUG]   Imported: org.Eclipse.aether.resolution < plexus.core
        [DEBUG]   Imported: org.Eclipse.aether.spi < plexus.core
        [DEBUG]   Imported: org.Eclipse.aether.transfer < plexus.core
        [DEBUG]   Imported: org.Eclipse.aether.version < plexus.core
        [DEBUG]   Imported: org.slf4j.* < plexus.core
        [DEBUG]   Imported: org.slf4j.spi.* < plexus.core
        [DEBUG] Populating class realm maven.api
        [INFO] Error stacktraces are turned on.
        [DEBUG] Reading global settings from C:\maven-3\conf\settings.xml
        [DEBUG] Reading user settings from C:\Users\H1514\.m2\settings.xml
        [DEBUG] Reading global toolchains from C:\maven-3\conf\toolchains.xml
        [DEBUG] Reading user toolchains from C:\Users\H1514\.m2\toolchains.xml
        [DEBUG] Using local repository at C:\Users\H1514\.m2\repository
        [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\H1514\.m2\repository
        [INFO] Scanning for projects...
        [DEBUG] Extension realms for project camel:camel:jar:0.0.1-SNAPSHOT: (none)
        [DEBUG] Looking up lifecyle mappings for packaging jar from ClassRealm[plexus.core, parent: null]
        [DEBUG] === REACTOR BUILD PLAN ================================================
        [DEBUG] Project: camel:camel:jar:0.0.1-SNAPSHOT
        [DEBUG] Tasks:   [clean, install]
        [DEBUG] Style:   Regular
        [DEBUG] =======================================================================
        [INFO]                                                                         
        [INFO] ------------------------------------------------------------------------
        [INFO] Building camel 0.0.1-SNAPSHOT
        [INFO] ------------------------------------------------------------------------
        [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
        [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
        [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
        [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
        [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
        [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
        [DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.Apache.org/maven2
        [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.Apache.org/maven2
        Downloading: https://repo.maven.Apache.org/maven2/org/Apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
    
        [DEBUG] Writing tracking file C:\Users\H1514\.m2\repository\org\Apache\maven\plugins\maven-clean-plugin\2.5\maven-clean-plugin-2.5.pom.lastUpdated
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 22.858 s
        [INFO] Finished at: 2015-05-29T14:11:00+08:00
        [INFO] Final Memory: 5M/15M
        [INFO] ------------------------------------------------------------------------
        [ERROR] Plugin org.Apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.Apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.Apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.Apache.org/maven2): Connect to repo.maven.Apache.org:443 [repo.maven.Apache.org/23.235.47.215] failed: Connection timed out: connect -> [Help 1]
        org.Apache.maven.plugin.PluginResolutionException: Plugin org.Apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.Apache.maven.plugins:maven-clean-plugin:jar:2.5
            at org.Apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.Java:117)
            at org.Apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.Java:179)
            at org.Apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.Java:298)
            at org.Apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.Java:241)
            at org.Apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution(DefaultLifecycleExecutionPlanCalculator.Java:169)
            at org.Apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecutions(DefaultLifecycleExecutionPlanCalculator.Java:155)
            at org.Apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.Java:131)
            at org.Apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.Java:145)
            at org.Apache.maven.lifecycle.internal.builder.BuilderCommon.resolveBuildPlan(BuilderCommon.Java:96)
            at org.Apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.Java:109)
            at org.Apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.Java:80)
            at org.Apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.Java:51)
            at org.Apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.Java:128)
            at org.Apache.maven.DefaultMaven.doExecute(DefaultMaven.Java:307)
            at org.Apache.maven.DefaultMaven.doExecute(DefaultMaven.Java:193)
            at org.Apache.maven.DefaultMaven.execute(DefaultMaven.Java:106)
            at org.Apache.maven.cli.MavenCli.execute(MavenCli.Java:862)
            at org.Apache.maven.cli.MavenCli.doMain(MavenCli.Java:286)
            at org.Apache.maven.cli.MavenCli.main(MavenCli.Java:197)
            at Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:57)
            at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:43)
            at Java.lang.reflect.Method.invoke(Method.Java:606)
            at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.Java:289)
            at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.Java:229)
            at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.Java:415)
            at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.Java:356)
        Caused by: org.Eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.Apache.maven.plugins:maven-clean-plugin:jar:2.5
            at org.Apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.Java:302)
            at org.Apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.Java:218)
            at org.Eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.Java:287)
            at org.Apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.Java:103)
            ... 26 more
        Caused by: org.Eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.Apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.Apache.org/maven2): Connect to repo.maven.Apache.org:443 [repo.maven.Apache.org/23.235.47.215] failed: Connection timed out: connect
            at org.Eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.Java:444)
            at org.Eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.Java:246)
            at org.Eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.Java:223)
            at org.Apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.Java:287)
            ... 29 more
        Caused by: org.Eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.Apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.Apache.org/maven2): Connect to repo.maven.Apache.org:443 [repo.maven.Apache.org/23.235.47.215] failed: Connection timed out: connect
            at org.Eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.Java:43)
            at org.Eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.Java:355)
            at org.Eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.Java:67)
            at org.Eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.Java:581)
            at org.Eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.Java:249)
            at org.Eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.Java:520)
            at org.Eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.Java:421)
            ... 32 more
        Caused by: org.Apache.maven.wagon.TransferFailedException: Connect to repo.maven.Apache.org:443 [repo.maven.Apache.org/23.235.47.215] failed: Connection timed out: connect
            at org.Apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.Java:1066)
            at org.Apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.Java:960)
            at org.Apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.Java:116)
            at org.Apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.Java:88)
            at org.Apache.maven.wagon.StreamWagon.get(StreamWagon.Java:61)
            at org.Eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run(WagonTransporter.Java:560)
            at org.Eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.Java:427)
            at org.Eclipse.aether.transport.wagon.WagonTransporter.get(WagonTransporter.Java:404)
            at org.Eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.Java:447)
            at org.Eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.Java:350)
            ... 37 more
        Caused by: org.Apache.maven.wagon.providers.http.httpclient.conn.HttpHostConnectException: Connect to repo.maven.Apache.org:443 [repo.maven.Apache.org/23.235.47.215] failed: Connection timed out: connect
            at org.Apache.maven.wagon.providers.http.httpclient.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.Java:140)
            at org.Apache.maven.wagon.providers.http.httpclient.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.Java:318)
            at org.Apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.establishRoute(MainClientExec.Java:363)
            at org.Apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.execute(MainClientExec.Java:219)
            at org.Apache.maven.wagon.providers.http.httpclient.impl.execchain.ProtocolExec.execute(ProtocolExec.Java:195)
            at org.Apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec.execute(RetryExec.Java:86)
            at org.Apache.maven.wagon.providers.http.httpclient.impl.execchain.RedirectExec.execute(RedirectExec.Java:108)
            at org.Apache.maven.wagon.providers.http.httpclient.impl.client.InternalHttpClient.doExecute(InternalHttpClient.Java:184)
            at org.Apache.maven.wagon.providers.http.httpclient.impl.client.CloseableHttpClient.execute(CloseableHttpClient.Java:82)
            at org.Apache.maven.wagon.providers.http.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.Java:832)
            at org.Apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.Java:983)
            ... 46 more
        Caused by: Java.net.ConnectException: Connection timed out: connect
            at Java.net.DualStackPlainSocketImpl.connect0(Native Method)
            at Java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.Java:79)
            at Java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.Java:339)
            at Java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.Java:200)
            at Java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.Java:182)
            at Java.net.PlainSocketImpl.connect(PlainSocketImpl.Java:172)
            at Java.net.SocksSocketImpl.connect(SocksSocketImpl.Java:392)
            at Java.net.Socket.connect(Socket.Java:579)
            at org.Apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.Java:239)
            at org.Apache.maven.wagon.providers.http.httpclient.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.Java:123)
            ... 56 more
        [ERROR] 
        [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
    
27
Kartik Jajal

この問題は、Open jdk 8からOracle jdkに切り替えることで解決しました。

$ Java -version Java version "1.8.0_221" Java(TM)SE Runtime Environment(build 1.8.0_221-b11))Java HotSpot(TM)64ビットサーバーVM(ビルド25.221-b11、混合モード)

0
Duncan

私は同じ問題に直面し、私が試したすべてのオプションに関してどれが機能しないかを確認することに苛立ちました、

Settings.xmlを含むすべてを正しく設定すると判明します

ローカルリポジトリフォルダーをクリアしてmvnコマンドを試してみてください。これは非常に役に立ちました

これが他の人を助けることを願っています

0
Dave

私は同様の問題に直面しました。以下の手順に従ってください。m2フォルダーを手動で削除します。 settings.xmlファイルを参照して、idやurlタグなど、リポジトリの詳細が適切かどうかを確認してください。また、同じネットワークに接続していることを確認し、ブラウザからURLにアクセスできるかどうかを確認してください。最後に、mavenプロジェクトを/ home/User /に保存します。

0

私は同じ問題に直面しました。 maven-Assembly-plugin3.1.12.5.3からPOM.xmlに変更しました

提案されたバージョンは、プラグインセクションで行う必要があります。 maven-Assembly-pluginのアーティファクトIDをここにコードを入力してください

私は同じMaven接続タイムアウトの問題に直面し、ウイルス対策とファイアウォールの設定を無効化/ホワイトリストに登録することで解決しました。

問題はすぐに解決されました:

org.Apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.Java:239)
0
Bala Gsk

Deepak Vishwakarmaの回答を参照して、私はそれを試しましたが、url問題で同じ問題に直面していました。インストール済みmaven-3.6.3および内部.m2フォルダを見つけました

settings.xml.bak

ファイルとそのミラーリンクをコピーし、@ Deepakが行ったことをurlに変更しただけです。それは魅力のように働きました!その.bakファイルから取得したミラーリンク

http://local.maven.repo:9081/nexus/content/groups/public

次に実行されます:

mvn clean 
mvn clean install
0
user404