Perhaps your original goal of easily testing RepoInit script could be accomplished by creating some sort of (parameterized) generic integration test?
Imagine a test that starts up an instance of sling by using paxexam (or feature launcher?) with the existing bundle (or a tinybundle created on the fly) configured to be deployed and then let the test do some assertions to make sure it worked. The test automation may be more efficient (and reusable?) than the manual steps you outlined for a webconsole plugin. Regards, Eric On Fri, Aug 6, 2021 at 7:52 AM Bertrand Delacretaz <[email protected]> wrote: > Hi Dan, > > On Fri, Aug 6, 2021 at 3:55 PM Daniel Klco <[email protected]> wrote: > > On Fri, Aug 6, 2021 at 8:40 AM Bertrand Delacretaz < > [email protected]> > > wrote: > > >...I think nowadays we'd rather create command-line > > > utilities for such things,... > > > ...The question I have though is how would I get access to the running > OSGi > > context? I've done JCR over RMI, but I'm not seeing a good way to invoke > > services remotely... > > I think you either need a specific servlet on the Sling side, which > kind of defeats the whole purpose of a command-line tool, or you can > inject code from the client side given the appropriate permissions. > Uploading a Sling script comes to mind, but that won't work if the > target instance uses read-only scripts. > > -Bertrand >
