Pregunta

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?

¿Fue útil?

Solución

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

Otros consejos

the binary dependency contains some netbeans-originating annotations? and you want to process it through the maven plugin? that won't work. Most if not all netbeans annotations are compile-time only, meaning that they are processed at compile time and not retained in the bytecode. so only su Besides for Netbeans annotations (which are based on jdk 1.6 annotation processors, you don't need the processor plugin, compile plugin should be sufficient.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top