Maven创建项目失败,请帮忙看看,谢谢

[root@xx002 project]# mvn -B archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DgroupId=com.mycompany.app -DartifactId=my-app
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.206 s
[INFO] Finished at: 2016-08-16T20:15:45+08:00
[INFO] Final Memory: 4M/28M
[INFO] ------------------------------------------------------------------------
---------------------------------------------------
constituent[0]: file:/root/software/apache-maven-3.3.3/lib/commons-lang-2.6.jar
constituent[1]: file:/root/software/apache-maven-3.3.3/lib/javax.inject-1.jar
constituent[2]: file:/root/software/apache-maven-3.3.3/lib/aether-api-1.0.2.v20150114.jar
constituent[3]: file:/root/software/apache-maven-3.3.3/lib/plexus-component-annotations-1.5.5.jar
constituent[4]: file:/root/software/apache-maven-3.3.3/lib/cdi-api-1.0.jar
constituent[5]: file:/root/software/apache-maven-3.3.3/lib/plexus-sec-dispatcher-1.3.jar
constituent[6]: file:/root/software/apache-maven-3.3.3/lib/maven-compat-3.3.3.jar
constituent[7]: file:/root/software/apache-maven-3.3.3/lib/sisu-guice-3.2.5-no_aop.jar
constituent[8]: file:/root/software/apache-maven-3.3.3/lib/wagon-file-2.9.jar
constituent[9]: file:/root/software/apache-maven-3.3.3/lib/wagon-provider-api-2.9.jar
constituent[10]: file:/root/software/apache-maven-3.3.3/lib/maven-model-3.3.3.jar
constituent[11]: file:/root/software/apache-maven-3.3.3/lib/maven-plugin-api-3.3.3.jar
constituent[12]: file:/root/software/apache-maven-3.3.3/lib/aether-spi-1.0.2.v20150114.jar
constituent[13]: file:/root/software/apache-maven-3.3.3/lib/wagon-http-shared-2.9.jar
constituent[14]: file:/root/software/apache-maven-3.3.3/lib/maven-embedder-3.3.3.jar
constituent[15]: file:/root/software/apache-maven-3.3.3/lib/aopalliance-1.0.jar
constituent[16]: file:/root/software/apache-maven-3.3.3/lib/slf4j-simple-1.7.5.jar
constituent[17]: file:/root/software/apache-maven-3.3.3/lib/wagon-http-2.9-shaded.jar
constituent[18]: file:/root/software/apache-maven-3.3.3/lib/maven-settings-builder-3.3.3.jar
constituent[19]: file:/root/software/apache-maven-3.3.3/lib/plexus-cipher-1.7.jar
constituent[20]: file:/root/software/apache-maven-3.3.3/lib/aether-impl-1.0.2.v20150114.jar
constituent[21]: file:/root/software/apache-maven-3.3.3/lib/aether-transport-wagon-1.0.2.v20150114.jar
constituent[22]: file:/root/software/apache-maven-3.3.3/lib/maven-aether-provider-3.3.3.jar
constituent[23]: file:/root/software/apache-maven-3.3.3/lib/slf4j-api-1.7.5.jar
constituent[24]: file:/root/software/apache-maven-3.3.3/lib/guava-18.0.jar
constituent[25]: file:/root/software/apache-maven-3.3.3/lib/maven-builder-support-3.3.3.jar
constituent[26]: file:/root/software/apache-maven-3.3.3/lib/org.eclipse.sisu.plexus-0.3.0.jar
constituent[27]: file:/root/software/apache-maven-3.3.3/lib/maven-model-builder-3.3.3.jar
constituent[28]: file:/root/software/apache-maven-3.3.3/lib/plexus-interpolation-1.21.jar
constituent[29]: file:/root/software/apache-maven-3.3.3/lib/aether-connector-basic-1.0.2.v20150114.jar
constituent[30]: file:/root/software/apache-maven-3.3.3/lib/maven-repository-metadata-3.3.3.jar
constituent[31]: file:/root/software/apache-maven-3.3.3/lib/commons-io-2.2.jar
constituent[32]: file:/root/software/apache-maven-3.3.3/lib/maven-artifact-3.3.3.jar
constituent[33]: file:/root/software/apache-maven-3.3.3/lib/org.eclipse.sisu.inject-0.3.0.jar
constituent[34]: file:/root/software/apache-maven-3.3.3/lib/plexus-utils-3.0.20.jar
constituent[35]: file:/root/software/apache-maven-3.3.3/lib/maven-core-3.3.3.jar
constituent[36]: file:/root/software/apache-maven-3.3.3/lib/commons-cli-1.2.jar
constituent[37]: file:/root/software/apache-maven-3.3.3/lib/aether-util-1.0.2.v20150114.jar
constituent[38]: file:/root/software/apache-maven-3.3.3/lib/maven-settings-3.3.3.jar
constituent[39]: file:/root/software/apache-maven-3.3.3/lib/jsoup-1.7.2.jar
constituent[40]: file:/root/software/apache-maven-3.3.3/lib/jsr250-api-1.0.jar
constituent[41]: file:/root/software/apache-maven-3.3.3/conf/logging/
---------------------------------------------------
Exception in thread "main" java.lang.InternalError
at sun.security.ec.SunEC.initialize(Native Method)
at sun.security.ec.SunEC.access$000(SunEC.java:49)
at sun.security.ec.SunEC$1.run(SunEC.java:61)
at sun.security.ec.SunEC$1.run(SunEC.java:58)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ec.SunEC.<clinit>(SunEC.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:383)
at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:221)
at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:206)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:206)
at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187)
at sun.security.jca.ProviderList.getProvider(ProviderList.java:233)
at sun.security.jca.ProviderList.getService(ProviderList.java:331)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:157)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
at javax.net.ssl.SSLContext.getDefault(SSLContext.java:97)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:121)
at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:333)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.createConnManager(AbstractHttpClientWagon.java:344)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.<clinit>(AbstractHttpClientWagon.java:270)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:86)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:92)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1044)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:54)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
at org.eclipse.sisu.bean.BeanScheduler$Activator.onProvision(BeanScheduler.java:176)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:46)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1059)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:36)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255)
at org.eclipse.aether.internal.transport.wagon.PlexusWagonProvider.lookup(PlexusWagonProvider.java:58)
at org.eclipse.aether.transport.wagon.WagonTransporter.lookupWagon(WagonTransporter.java:271)
at org.eclipse.aether.transport.wagon.WagonTransporter.<init>(WagonTransporter.java:115)
at org.eclipse.aether.transport.wagon.WagonTransporterFactory.newInstance(WagonTransporterFactory.java:127)
at org.eclipse.aether.internal.impl.DefaultTransporterProvider.newTransporter(DefaultTransporterProvider.java:110)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.<init>(BasicRepositoryConnector.java:115)
at org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory.newInstance(BasicRepositoryConnectorFactory.java:180)
at org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(DefaultRepositoryConnectorProvider.java:113)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:516)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
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)
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)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:179)
at org.apache.maven.plugin.DefaultBuildPluginManager.loadPlugin(DefaultBuildPluginManager.java:83)
at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolveFromProject(DefaultPluginPrefixResolver.java:138)
at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolveFromProject(DefaultPluginPrefixResolver.java:121)
at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:85)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:266)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:220)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:103)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:83)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:89)
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)

wangxiaolei

赞同来自:

jdk配置那个版本的?

fish - Hadooper

赞同来自:

jdk7最近的一个升级有问题,换成使用jdk8。

桎梏

赞同来自:

换成jdk8后出现了下面错误 : [root@xx003 project]# mvn -B archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DgroupId=com.mycompany.app -DartifactId=my-app [INFO] Scanning for projects... [INFO] Downloading: https://repo.maven.apache.org/ ... 5.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: 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 [INFO] Downloading: https://repo.maven.apache.org/ ... 4.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.4: 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 [INFO] Downloading: https://repo.maven.apache.org/ ... 7.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7 [INFO] Downloading: https://repo.maven.apache.org/ ... 3.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.3: Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.3 [INFO] Downloading: https://repo.maven.apache.org/ ... 3.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3 [INFO] Downloading: https://repo.maven.apache.org/ ... 5.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5 [INFO] Downloading: https://repo.maven.apache.org/ ... 8.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.8: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8 [INFO] Downloading: https://repo.maven.apache.org/ ... 2.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.3.2: Plugin org.apache.maven.plugins:maven-release-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:2.3.2 [INFO] Downloading: https://repo.maven.apache.org/ ... a.xml [INFO] Downloading: https://repo.maven.apache.org/ ... a.xml [WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org [WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org [WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org [WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.085 s [INFO] Finished at: 2016-08-17T09:53:50+08:00 [INFO] Final Memory: 7M/29M [INFO] ------------------------------------------------------------------------ [ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/root/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1] [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/conflu ... ption  

fish - Hadooper

赞同来自:

网络问题,无法下载依赖的资源。 可以再多执行几次。   或者,翻看一下课程资料,给自己的机器添加下maven的mirror,指向我们自己的服务器,加速下载过程。

要回复问题请先登录注册