Hey all,
I am running in a problem when trying to use OSGi DS annotations and Apache
Felix annotations together. I have unit tests that depend on the service xml's
being present (I am using the Apache Sling osgi-mock to run unit tests), but
the problem that I am facing is that when the maven-bundle-plugin:manifest
phase has been executed, the maven-scr-plugin deletes the maven-bundle-plugin
xml's again created by the maven-bundle manifest phase, is there any way to
avoid this and make it that they are merged togheter? All xmls are present in
the JAR file when everything is compiled so in the end it works out, but I need
them for the unit tests too.
The configuration I am currently using at the moment:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<instructions>
...
<_dsannotations>*</_dsannotations>
<_metatypeannotations>*</_metatypeannotations>
</instructions>
<exportScr>true</exportScr>
</configuration>
<executions>
<!--
Configure extra execution of 'manifest' in process-classes phase
to make sure SCR metadata is generated before unit test runs
-->
<execution>
<id>scr-metadata</id>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<supportIncrementalBuild>true</supportIncrementalBuild>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-scr-plugin</artifactId>
<version>1.24.0</version>
<executions>
<execution>
<id>generate-scr-reportDescriptor</id>
<goals>
<goal>scr</goal>
</goals>
</execution>
</executions>
</plugin>
Greetings,
Roy
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]