Eclipse集成Maven插件tomcat部署 Debug jar包的源码联结

来源:互联网 发布:大连生态科技城 知乎 编辑:程序博客网 时间:2024/06/06 10:02


在的项目Pom.xml中最后加入:

<build>    <plugins>        <plugin>                <groupId>org.apache.maven.plugins</groupId>                <artifactId>maven-eclipse-plugin</artifactId>                <version>2.9</version>                <configuration>                    <additionalProjectnatures>                        <projectnature>org.eclipse.jdt.core.javanature</projectnature>                        <projectnature>org.eclipse.m2e.core.maven2Nature</projectnature>                        <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>                    </additionalProjectnatures>                    <additionalBuildcommands>                        <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>                        <buildcommand>org.eclipse.m2e.core.maven2Builder</buildcommand>                        <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>                    </additionalBuildcommands>                </configuration>            </plugin>    </plugins></build>

然后再项目目录下执行:

mvn dependency:sources
然后执行:

mvn eclipse:eclipse

再刷新一下eclipse的项目空间. 



=================================



Source not found might be legitimate for dynamically loaded code (e.g. Maven).

There are three workarounds known to me (after months of search):

  1. Connect to a running JVM with the debugger and you will see the code.

  2. Use Dynamic Source Lookup plugin for Eclipse from here:

    https://github.com/ifedorenko/com.ifedorenko.m2e.sourcelookup

  3. Use run-jetty-run Maven plugin

    http://code.google.com/p/run-jetty-run/





原创粉丝点击