Search code examples
mavennetbeans-platformannotation-processing

Maven, NetBeans Platform, Wrapper Modules and Annotation Processors on dependencies


I have a Maven NetBeans platform application. One of its modules is a wrapper to a java project (jar) that exposes some services to the Lookup. In the wrapped project I use the maven-processor-plugin to process the annotations so everything gets registered in the Lookup. I’m unable to see the exposed classes on the wrapped module. I tried running the maven-processor-plugin but it is skipped since there are no source files in the wrapped module. Even if there were it wouldn’t fix the problem.

You can get the code here, in the Marauroa Server Manager project, Module: jWrestling Wrapper.

The code for the wrapped module can be found here. Annotated classes within the modules work fine.

Is there a way to execute the annotation processors on the dependencies of a project? Am I missing something obvious?


Solution

  • the wrapped jar project cannot contain nb.org annotations. these generate META_INF/generated-layer.xml file that is only read from a MODULE jar, not the wrapped non-module jar