请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

老师我在测试:mybatis-generator-maven-plugin出现了问题,

"C:\Program Files\Java\jdk1.7.0_80\bin\java" -Dmaven.home=C:\apache-maven-3.0.5 -Dclassworlds.conf=C:\apache-maven-3.0.5\bin\m2.conf -Didea.launcher.port=7544 "-Didea.launcher.bin.path=E:\works\IDEA\IntelliJ IDEA 15.0.6\bin" -Dfile.encoding=UTF-8 -classpath "C:\apache-maven-3.0.5\boot\plexus-classworlds-2.4.jar;E:\works\IDEA\IntelliJ IDEA 15.0.6\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=15.0.6 org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate

[INFO] Scanning for projects...

[WARNING] 

[WARNING] Some problems were encountered while building the effective model for com:mmall:war:1.0-SNAPSHOT

[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 264, column 15

[WARNING] 

[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

[WARNING] 

[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

[WARNING] 

[INFO]                                                                         

[INFO] ------------------------------------------------------------------------

[INFO] Building mmall Maven Webapp 1.0-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO] 

[INFO] --- mybatis-generator-maven-plugin:1.3.2:generate (default-cli) @ mmall ---

[INFO] Connecting to the Database

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 22.263s

[INFO] Finished at: Mon Jun 12 22:37:25 CST 2017

[INFO] Final Memory: 7M/121M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project mmall: Communications link failure

[ERROR] 

[ERROR] Last packet sent to the server was 0 ms ago.

[ERROR] -> [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/confluence/display/MAVEN/MojoExecutionException


Process finished with exit code 1


正在回答 回答被采纳积分+3

2回答

苇草May 2018-04-27 19:42:31

在初建工程时会自动生成一个pom.xml里面有

<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.7.0</version>
</plugin>

然后在老师的代码里面加上这个版本,如:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <!-- 下面这一行 -->
  <version>3.7.0</version>
  <configuration>
    <source>1.8</source>
    <target>1.8</target>
    <encoding>UTF-8</encoding>
    <compilerArguments>
      <extdirs>${project.basedir}/src/main/webapp/WEB-INF/lib</extdirs>
    </compilerArguments>
  </configuration>
</plugin>


2 回复 有任何疑惑可以回复我~
  • 没用。。
    回复 有任何疑惑可以回复我~ 2018-08-26 12:44:50
  • 我的加了下面的解决了报错,<version>3.7.0</version>。
    回复 有任何疑惑可以回复我~ 2018-11-22 17:21:20
Geely 2017-06-12 23:04:17

hi 同学 

看提示i

[ERROR] Re-run Maven using the -X switch to enable full debug logging.


可以增加-X参数看全部的debug的日志。可以试试看具体报错在哪里。

另外可以把教程带的xml文件替换一下,试试是否成功,然后对比一下写法看看哪里有问题呢?


因为我看不到你的xml文件。

0 回复 有任何疑惑可以回复我~
  • 同学解决了吗?我也碰到了跟你一样的问题
    回复 有任何疑惑可以回复我~ 2018-02-23 13:09:42
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信