Ben Ripkens

back to blog index

Exclude files from automatic JavaScript documentation generation

In December I wrote an article about the JsDoc toolkit and especially about a Maven plug-in that simplifies the build process. A few days ago the author of this plug-in, i.e. Martin Reurings, contacted me and asked for some feedback. We discussed the issues that I mentioned in my previous article and that the plug-in is missing some exclude / include functionality. Recently he implemented this functionality and released version 2.3.2.

Now to use this plug-in add the plug-in repository


and add the following to the report plug-in section to your pom.


Now I tried to exclude all files using a negative look ahead /^(?!diagram-).+/. This regex means “Ignore everything that does not start with diagram-” (all the JavaScript files for the visualization in my last project have the common prefix diagram-) but unfortunately it’s not working. Maybe I used a wrong syntax for the exclusion but I can’t seem to find more documentation about it. If you know what went wrong or how to realize it without mentioning every JavaScript file that should be excluded please let me know. Anyway this feature may allow more projects to use the plug-in and is generally a great addition to the plug-in.

That's me, Ben.
Hey, I am Ben Ripkens (bripkens) and this is my blog. I live in Düsseldorf (Germany) and I am employed by the codecentric AG as a Software Engineer. Web application frontends are my main area of expertise, but you may also find some other interesting articles on this blog.