Description
when unit tests are based on osgi-mock the SCR metadata generated for the OSGi components of the project itself needs to be present in the generated classpath before the unit test run.
the following maven-bundle-plugin configuration is required for this:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <!-- Export SCR metadata to classpath to have them available in unit tests --> <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>
we should add it by default to the global parent pom.
Attachments
Issue Links
- breaks
-
SLING-6746 Remove and ban maven-scr-plugin
- Closed