繁体   English   中英

在集成maven和eclipse之后获取MojoExecutor.execute异常

[英]Getting MojoExecutor.execute exception after integrating integrating maven and eclipse

我从eclipse执行maven安装时收到以下错误,当我手动执行它时,我没有得到这个错误(在不使用eclipse的命令行中)

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project pconIvr: Compilation failure
[ERROR] \PCX\PCX\release\pcx\core\pconIvr\src\main\java\com\anexsys\epay\ivr\IvrHostServlet.java:[355,48] cannot find symbol
[ERROR] symbol  : method extractContentAsDocument()
[ERROR] location: interface javax.xml.soap.SOAPBody
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal         org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project pconIvr: Compilation failure
\PCX\PCX\release\pcx\core\pconIvr\src\main\java\com\anexsys\epay\ivr\IvrHostServlet.java:[355,48] cannot find symbol
symbol  : method extractContentAsDocument()
location: interface javax.xml.soap.SOAPBody

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure

我有同样的问题。 我注意到在我的pom文件中版本设置为3.0。

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0</version>

我把它改回2.0,一切都开始编译了。

Eclipse是否设置为使用与命令行相同的JDK? 您可以通过查看控制台顶部(它将具有java可执行文件的路径)来检查前者,后者使用java -version

如果你坚持使用java 1.5(这是非常老的,并且最新版本更新22的方式),不要尝试使用v1.6 extractContentAsDocument方法,因为它不会编译。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM