jenkins插件开发之demo断点调试
注:还是用intellij调试更好一点
首先把生成的demo工程导入eclipse,配置好eclipse的maven环境:
eclipse中window-preferences-maven-user settings,选择maven环境的conf/settings.xml
报错:Plugin execution not covered by lifecycle configuration
解决:window-preferences-maven-errors/warnings-Plugin execution not covered by lifecycle configuration-ignore
右键工程-debug as--run configurations
在goals里输入hpi:run,保存后再debug as即相当于运行mvn hpi:run
报错:No compiler is provided in this environment
解决:window-preferences-java-installed jres 确定jdk路径和环境变量路径一致
最后debug as maven build即可,浏览器打开http://localhost:8080/jenkins/
即可断点调试