web-dev-qa-db-fra.com

Plugin org.Apache.maven.plugins: maven-clean-plugin: 2.5 ou l'une de ses dépendances n'a pas pu être résolue

J'ai installé maven sur ma machine. J'ai correctement défini le chemin d'accès aux classes et le dossier de départ de maven. Chaque fois que j'exécute mvn clean install, ça me donne une exception. J'ai également essayé de supprimer le dossier .m2 mais le même résultat.

  • mvn -version sortie

    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"
    
  • journal pour 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

J'ai résolu ce problème en passant au jdk Oracle à partir du jdk 8 ouvert.

$ Java -version Java version "1.8.0_221" Java (TM) SE Runtime Environment (build 1.8.0_221-b11) Java Serveur HotSpot (TM) 64 bits VM (build 25.221-b11, mode mixte)

0
Duncan

J'ai fait face au même problème et j'étais frustré de voir toutes les options que j'ai essayées et aucune ne fonctionnait,

S'avère une fois que vous avez tout configuré correctement, y compris settings.xml

effacez simplement votre dossier de dépôt local et essayez les commandes mvn. Cela m'a beaucoup aidé

J'espère que cela aide les autres

0
Dave

J'ai fait face à un problème similaire. Essayez de suivre les étapes ci-dessous: Supprimez manuellement le dossier .m2. Reportez-vous au fichier settings.xml et vérifiez si les détails du référentiel sont corrects, comme les balises id et url. Assurez-vous également que vous êtes connecté au même réseau et vérifiez si l'URL est accessible à partir du navigateur. Et enfin, gardez les projets maven dans/home/User /.

0
prasad dongrekar

J'ai fait face au même problème. J'ai changé le maven-Assembly-plugin à 3.1.1 de 2.5.3 dans POM.xml

La version proposée doit être faite dans la section plugin. entrez le code ici ID d'artefact pour maven-Assembly-plugin

J'ai rencontré le même problème de délai d'expiration de la connexion Maven et résolu en désactivant/en mettant en liste blanche le paramètre antivirus et pare-feu.

Le problème a été résolu immédiatement:

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

se référant à la réponse de Deepak Vishwakarma , j'ai essayé avec cela et je faisais face au même problème avec le problème url. J'ai installé maven-3.6.3 et à l'intérieur .m2 dossier j'ai trouvé un

settings.xml.bak

fichier et à partir de ce copié ce lien miroir et juste changé l'URL ce que @Deepak a fait. Cela a fonctionné comme par enchantement! Lien miroir que j'ai obtenu à partir de ce fichier .bak

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

Puis exécuté:

mvn clean 
mvn clean install
0
user404