at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:5
1)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfigu
redMojo(DefaultMavenPluginManager.java:519)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:121)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Nativ
e Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Native
MethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(De
legatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.<clinit>(Abstrac
tZipArchiver.java:116)
... 88 more
[WARNING] Error injecting: org.apache.maven.plugin.jar.JarMojo
java.lang.ExceptionInInitializerError
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInsta
nce0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInsta
nce(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newI
nstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:
488)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInsta
nce(DefaultConstructionProxyFactory.java:86)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorI
njector.java:105)
at com.google.inject.internal.ConstructorInjector.access$000(Constructor
Injector.java:32)
at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInje
ctor.java:89)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(P
rovisionListenerStackCallback.java:68)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorI
njector.java:87)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(Constru
ctorBindingImpl.java:267)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:10
16)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.ja
va:1103)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java
:1051)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClas
s.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision(Provider
InternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.prov
ision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInt
ernalFactory.java:65)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(P
rovisionListenerStackCallback.java:68)
at com.google.inject.internal.ProviderInternalFactory.circularGet(Provid
erInternalFactory.java:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(
InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:10
16)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.ja
va:1103)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:5
1)
at org.eclipse.sisu.plexus.PlexusRequirements$RequirementProvider.get(Pl
exusRequirements.java:250)
at org.eclipse.sisu.plexus.ProvidedPropertyBinding.injectProperty(Provid
edPropertyBinding.java:48)
at org.eclipse.sisu.bean.BeanInjector.injectMembers(BeanInjector.java:52
)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersI
njectorImpl.java:140)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorI
njector.java:114)
at com.google.inject.internal.ConstructorInjector.access$000(Constructor
Injector.java:32)
at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInje
ctor.java:89)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(P
rovisionListenerStackCallback.java:68)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorI
njector.java:87)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(Constru
ctorBindingImpl.java:267)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:10
16)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.ja
va:1103)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java
:1051)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClas
s.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision(Provider
InternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.prov
ision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInt
ernalFactory.java:65)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.p
rovision(ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(P
rovisionListenerStackCallback.java:68)
at com.google.inject.internal.ProviderInternalFactory.circularGet(Provid
erInternalFactory.java:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(
InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:10
16)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.ja
va:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:5
1)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfigu
redMojo(DefaultMavenPluginManager.java:519)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:121)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Nativ
e Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Native
MethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(De
legatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.<clinit>(Abstrac
tZipArchiver.java:116)
... 88 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.688 s
[INFO] Finished at: 2017-10-01T07:43:16-07:00
[INFO] Final Memory: 29M/97M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.6:jar
(default-jar) on project java-getting-started: Execution default-jar of goal or
g.apache.maven.plugins:maven-jar-plugin:2.6:jar failed: An API incompatibility w
as encountered while executing org.apache.maven.plugins:maven-jar-plugin:2.6:jar
: java.lang.ExceptionInInitializerError: null
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-jar-plugin:2.6
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/Umair/.m2/repository/org/apache/maven/plugins/m
aven-jar-plugin/2.6/maven-jar-plugin-2.6.jar
[ERROR] urls[1] = file:/C:/Users/Umair/.m2/repository/org/slf4j/slf4j-jdk14/1.5.
6/slf4j-jdk14-1.5.6.jar
[ERROR] urls[2] = file:/C:/Users/Umair/.m2/repository/org/slf4j/jcl-over-slf4j/1
.5.6/jcl-over-slf4j-1.5.6.jar
[ERROR] urls[3] = file:/C:/Users/Umair/.m2/repository/org/apache/maven/reporting
/maven-reporting-api/2.2.1/maven-reporting-api-2.2.1.jar
[ERROR] urls[4] = file:/C:/Users/Umair/.m2/repository/org/apache/maven/doxia/dox
ia-sink-api/1.1/doxia-sink-api-1.1.jar
[ERROR] urls[5] = file:/C:/Users/Umair/.m2/repository/org/apache/maven/doxia/dox
ia-logging-api/1.1/doxia-logging-api-1.1.jar
[ERROR] urls[6] = file:/C:/Users/Umair/.m2/repository/junit/junit/3.8.1/junit-3.
8.1.jar
[ERROR] urls[7] = file:/C:/Users/Umair/.m2/repository/commons-cli/commons-cli/1.
2/commons-cli-1.2.jar
[ERROR] urls[8] = file:/C:/Users/Umair/.m2/repository/org/codehaus/plexus/plexus
-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[9] = file:/C:/Users/Umair/.m2/repository/backport-util-concurrent/b
ackport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[10] = file:/C:/Users/Umair/.m2/repository/org/sonatype/plexus/plexu
s-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[11] = file:/C:/Users/Umair/.m2/repository/org/sonatype/plexus/plexu
s-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[12] = file:/C:/Users/Umair/.m2/repository/org/codehaus/plexus/plexu
s-interpolation/1.11/plexus-interpolation-1.11.jar
[ERROR] urls[13] = file:/C:/Users/Umair/.m2/repository/org/apache/maven/maven-ar
chiver/2.6/maven-archiver-2.6.jar
[ERROR] urls[14] = file:/C:/Users/Umair/.m2/repository/org/apache/maven/shared/m
aven-shared-utils/0.7/maven-shared-utils-0.7.jar
[ERROR] urls[15] = file:/C:/Users/Umair/.m2/repository/com/google/code/findbugs/
jsr305/2.0.1/jsr305-2.0.1.jar
[ERROR] urls[16] = file:/C:/Users/Umair/.m2/repository/org/codehaus/plexus/plexu
s-utils/3.0.20/plexus-utils-3.0.20.jar
[ERROR] urls[17] = file:/C:/Users/Umair/.m2/repository/org/codehaus/plexus/plexu
s-archiver/2.9/plexus-archiver-2.9.jar
[ERROR] urls[18] = file:/C:/Users/Umair/.m2/repository/org/codehaus/plexus/plexu
s-io/2.4/plexus-io-2.4.jar
[ERROR] urls[19] = file:/C:/Users/Umair/.m2/repository/commons-io/commons-io/2.2
/commons-io-2.2.jar
[ERROR] urls[20] = file:/C:/Users/Umair/.m2/repository/org/apache/commons/common
s-compress/1.9/commons-compress-1.9.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContaine
rException
'cmd' is not recognized as an internal or external command,
operable program or batch file.
我一直关注java https://devcenter.heroku.com/articles/getting-started-with-java#declare-app-dependencies的heroku教程。我安装了java 9和maven 3.5.0。现在我收到了这个错误。善意的帮助。我看到很多解决方案,但没有一个对我有用。我也尝试删除m2.repository,因为它是许多帖子中的常见解决方案,但它不起作用。
答案 0 :(得分:1)
将maven-jar-plugin更新为最新版本,例如(日期:2017-10-02):
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
答案 1 :(得分:0)
日志行
引起:java.lang.ArrayIndexOutOfBoundsException:1 at org.codehaus.plexus.archiver.zip.AbstractZipArchiver。(AbstractZipArchiver.java:116)
让我假设你项目中的一个罐子被损坏了。当maven启动的下载失败时,有时会发生这种情况。由于你的日志不完整,所以不可能损坏哪一个。
你应该试试
mvn clean install -U
将强制更新所有快照。
如果这不起作用,请检查您的maven存储库。一种快速但无效的方法是删除本地存储库。