简体   繁体   English

如何使Eclipse与maven doxia文件中的代码段宏一起使用?

[英]How to make Eclipse work with the snippet macro in maven doxia files?

I want to use the snippet macro in my maven site documentation in order to allow for testing of my examples code snippets with JUnit. 我想在我的maven站点文档中使用片段宏,以便允许使用JUnit测试我的示例代码片段。 But I don't want Eclipse to show the red "there is a build error" marker for all of my projects (which it does since m2eclipse does not recognize the snippet macro). 但我不希望Eclipse为我的所有项目显示红色的“有一个构建错误”标记(由于m2eclipse无法识别代码段宏,因此它会这样做)。 I do want maven dependency management to be enabled for the projects in Eclipse, so disabling the maven integration completely is not an option. 我确实希望为Eclipse中的项目启用maven依赖关系管理,因此完全禁用maven集成不是一种选择。 Moving to a different IDE is not an option either since I cannot force all of my coworkers to switch from Eclipse as well. 移动到另一个IDE也不是一个选项,因为我不能强迫我的所有同事也从Eclipse切换。

I would like a solution to either: 我想要一个解决方案:

  • Make the Doxia integration in (m2)Eclipse recognize or ignore the snippet macro 在(m2)Eclipse中进行Doxia集成可识别或忽略代码段宏
  • Make Eclipse ignore errors in apt files altogether 使Eclipse完全忽略apt文件中的错误

Uninstalling the Doxia support is one solution. 卸载Doxia支持是一种解决方案。

Under the Help menu, click "Install new software", then "Already installed". 在“帮助”菜单下,单击“安装新软件”,然后单击“已安装”。 Select the "Maven Doxia" bundle and click "Uninstall...". 选择“Maven Doxia”捆绑包,然后单击“卸载...”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM