摘要:本文将带你了解WEBAPP开发使用 IDEA 创建 Maven Web 项目 (异常)- Disconnected from the target VM, address: '127.0.0.1:59770', transport: 'socket',希望本文对大家学WEBAPP有所帮助。
本文将带你了解WEBAPP开发使用 IDEA 创建 Maven Web 项目 (异常)- Disconnected from the target VM, address: '127.0.0.1:59770', transport: 'socket',希望本文对大家学WEBAPP有所帮助。
运行环境:
JDK 版本:1.8
Maven 版本:apache-maven-3.3.3
IDEA 版本:14
maven-jetty-plugin 配置:
<plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <configuration> <webAppSourceDirectory>${project.basedir}/web</webAppSourceDirectory> <scanIntervalSeconds>10</scanIntervalSeconds> <httpConnector> <port>8081</port> </httpConnector> <stopKey>shutdown</stopKey> <stopPort>9966</stopPort> <webApp> <contextPath>/${project.artifactId}</contextPath> </webApp> </configuration></plugin>
控制台输出异常信息:
"C:\Program Files\Java\jdk1.8.0_65\bin\java" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:59770,suspend=y,server=n -Dmaven.home=D:\apache-maven-3.3.3 -Dclassworlds.conf=D:\apache-maven-3.3.3\bin\m2.conf -Dfile.encoding=UTF-8 -classpath "D:\apache-maven-3.3.3\boot\plexus-classworlds-2.5.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0.2\lib\idea_rt.jar" org.codehaus.classworlds.Launcher -Didea.version=14.0.2 jetty:runConnected to the target VM, address: ‘127.0.0.1:59770‘, transport: ‘socket‘Disconnected from the target VM, address: ‘127.0.0.1:59770‘, transport: ‘socket‘-Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match.Process finished with exit code 1
解决方法:
网上说是由于 IDEA 与 Maven 的版本不兼容造成的上述问题(原文地址://bbs.51cto.com/thread-1147659-1.html),把 Maven 改成 apache-maven-3.1.1-bin ,上述问题就成功解决了。
使用 IDEA 创建 Maven Web 项目 (异常)- Disconnected from the target VM, address: '127.0.0.1:59770', transport: 'socket'
本文由职坐标整理并发布,希望对同学们有所帮助。了解更多详情请关注职坐标移动开发之WebApp频道!
您输入的评论内容中包含违禁敏感词
我知道了
请输入正确的手机号码
请输入正确的验证码
您今天的短信下发次数太多了,明天再试试吧!
我们会在第一时间安排职业规划师联系您!
您也可以联系我们的职业规划师咨询:
版权所有 职坐标-一站式IT培训就业服务领导者 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
沪公网安备 31011502005948号