personally i'm using eclipse, which has incremental build support which is used by bnd-maven-plugin to automatically update the metadata files on each class change and works very well. not sure if Intellij IDE supports something similar.
doing this automatically with the osgi-mock/sling-mock logic is not trivial: detecting missing metadata is easy, but invoking a bnd process out of the unit test context respecting all custom project settings from the POM is either very difficult to do it right, or very expensive e.g. if you just trigger a full maven call. stefan > -----Original Message----- > From: Roy Teeuwen <[email protected]> > Sent: Monday, March 6, 2023 10:05 PM > To: Sling Developers <[email protected]> > Subject: Re: Unable to solve "No OSGi SCR metadata found for class" > > @Stefan, is there any way that it is feasible for Intellij IDE to run the > sling mock unit tests without first doing a compile with maven (and thus > triggering the bnd-maven-plugin to create the OSG-INF files)? It would be > handy if SlingContext could compile them "at runtime" of the junit test if > they aren't available
