eclipse 中使用maven的jetty插件进行debug出现Source not found的问题解决方案

28 篇文章 0 订阅
6 篇文章 0 订阅

 

当在eclipse中使用maven的jetty插件进行debug的时候,会出现“Source not found”的问题。你把java项目的文件夹加入到它的搜索路径中,点击确定之后,发现它根本不生效。你多次尝试,依然会有这个问题。

怎么解决呢?停掉jetty服务,然后再次启动jetty服务,问题就解决了。可以进行debug了。

参考了国外的网站,下面有链接和原文。

 

    <build>
    	<defaultGoal>package</defaultGoal>
    	<finalName>dmeta2-api-server</finalName>
    	
        <plugins>
            <!-- web server for jetty begin -->
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>6.1.24</version>
                <configuration>
                    <scanIntervalSeconds>5</scanIntervalSeconds>
                    <contextPath>/dmeta2-api-server</contextPath>
                    <reload>automatic</reload>
                    <connectors>
                        <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
                            <port>8090</port>
                            <headerBufferSize>80000</headerBufferSize>
                        </connector>
                    </connectors>
                </configuration>
            </plugin>
            <!-- web server for jetty end -->
        </plugins>
    </build>

 

 

 

----------------------

地址:http://www.javavids.com/video/how-to-solve-source-not-found-error-during-debug-in-eclipse.html

How to solve Source not found error during debug in Eclipse

If you run your web application using embedded Java EE server in Maven (like Tomcat or Jetty) and try to run it in debug mode, once you hit some breakpoint, you will encounter this error: "Source not found".

If you run your web application using embedded Java EE server and try to run it in debug mode, once you hit some breakpoint, you will encounter this error: "Source not found". Just simply press "Edit Source Lookup Path ...", add your project and restart your web application. And now it works.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值