You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Oliver Lietz (JIRA)" <ji...@apache.org> on 2017/03/06 09:45:33 UTC

[jira] [Closed] (SLING-6572) Generate SCR metadata required for mock-based unit tests

     [ https://issues.apache.org/jira/browse/SLING-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Lietz closed SLING-6572.
-------------------------------

> Generate SCR metadata required for mock-based unit tests
> --------------------------------------------------------
>
>                 Key: SLING-6572
>                 URL: https://issues.apache.org/jira/browse/SLING-6572
>             Project: Sling
>          Issue Type: Improvement
>          Components: General
>    Affects Versions: Parent 29
>            Reporter: Stefan Seifert
>            Assignee: Stefan Seifert
>             Fix For: Parent 30
>
>
> 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:
> {code:xml}
> <?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>
> {code}
> we should add it by default to the global parent pom.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)