3

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. 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). I do want maven dependency management to be enabled for the projects in Eclipse, so disabling the maven integration completely is not an option. Moving to a different IDE is not an option either since I cannot force all of my coworkers to switch from Eclipse as well.

I would like a solution to either:

  • Make the Doxia integration in (m2)Eclipse recognize or ignore the snippet macro
  • Make Eclipse ignore errors in apt files altogether
sal
  • 23,373
  • 15
  • 66
  • 85
thobe
  • 1,573
  • 1
  • 11
  • 9
  • As of today, the snippet macro seems to work for me if applied correctly (Eclipse >= Mars, Doxia 1.0.0.201301041016). However, I need to specify the _absolute_ path to a file, because `${basedir}` is not evaluated correctly as specified in [the docs](https://maven.apache.org/guides/mini/guide-snippet-macro.html). The need to use `%{snippet|file=C:/my-path/..../snippet.adoc}` makes this pretty useless though, because any collaboration is not possible. – Qw3ry Jun 01 '17 at 12:09

1 Answers1

0

Uninstalling the Doxia support is one solution.

Under the Help menu, click "Install new software", then "Already installed". Select the "Maven Doxia" bundle and click "Uninstall...".

thobe
  • 1,573
  • 1
  • 11
  • 9
  • If anyone can find a solution that would enable me to keep using the Doxia support that would be better, since I quite liked to be able to preview the document right there in Eclipse. – thobe Apr 01 '10 at 12:39