wake-up-neo.net

Plugin org.Apache.maven.plugins: maven-clean-plugin: 2.5 oder eine seiner Abhängigkeiten konnte nicht aufgelöst werden

Ich habe Maven in meinem Computer installiert. Ich habe den Klassenpfad und den Maven-Home-Ordner richtig eingestellt. Jedes Mal, wenn ich mvn clean install, es gibt mir Ausnahme. Ich habe auch versucht, den Ordner .m2 zu löschen, aber das gleiche Ergebnis.

  • mvn -version Ausgabe

    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"
    
  • log für mvn -X Neuinstallation

        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

Ich habe dieses Problem behoben, indem ich von Open JDK 8 zum Oracle JDK gewechselt bin.

$ Java -version Java Version "1.8.0_221" Java (TM) SE-Laufzeitumgebung (Build 1.8.0_221-b11) Java HotSpot (TM) 64-Bit-Server VM (Build 25.221-b11, gemischter Modus)

0
Duncan

Ich hatte das gleiche Problem und war frustriert, alle Optionen zu sehen, die ich ausprobiert habe, und keine davon funktioniert.

Es stellt sich heraus, dass Sie alles richtig konfiguriert haben, einschließlich settings.xml

Löschen Sie einfach Ihren lokalen Repository-Ordner und versuchen Sie es mit mvn-Befehlen. Das hat mir sehr geholfen

Hoffe das hilft anderen

0
Dave

Ich hatte ein ähnliches Problem. Führen Sie die folgenden Schritte aus: Löschen Sie den Ordner .m2 manuell. Lesen Sie in der Datei settings.xml nach, ob die Repository-Details wie ID- und URL-Tags korrekt sind. Stellen Sie außerdem sicher, dass Sie mit demselben Netzwerk verbunden sind, und überprüfen Sie, ob die URL über den Browser zugänglich ist. Und zuletzt Maven-Projekte in/home/User/behalten.

0

Ich habe das gleiche Problem konfrontiert. Ich habe das maven-Assembly-plugin in 3.1.1 von 2.5.3 in POM.xml geändert.

Die vorgeschlagene Version sollte im Plugin-Bereich erfolgen. Code hier eingeben Artefakt-ID für maven-Assembly-plugin

Ich hatte das gleiche Problem mit dem Zeitlimit für die Maven-Verbindung und wurde durch Deaktivieren/Auflisten der Antiviren- und Firewall-Einstellung behoben.

Das Problem wurde sofort behoben:

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

unter Bezugnahme auf die Antwort von Deepak Vishwakarma habe ich es versucht und hatte das gleiche Problem mit dem URL-Problem. Ich installierte maven-3.6.3 und drinnen .m2 Ordner Ich habe einen gefunden

settings.xml.bak

datei und von diesem kopierte diesen Spiegel Link und änderte nur die URL, was @Deepak tat. Es hat wie Charme funktioniert! Spiegellink, den ich aus dieser .bak-Datei erhalten habe

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

Dann ausgeführt:

mvn clean 
mvn clean install
0
user404