Skip to content

Register all transitive interfaces as services as well#120

Draft
kwin wants to merge 1 commit into
masterfrom
bugfix/service-values-in-scr-skill
Draft

Register all transitive interfaces as services as well#120
kwin wants to merge 1 commit into
masterfrom
bugfix/service-values-in-scr-skill

Conversation

@kwin

@kwin kwin commented May 9, 2026

Copy link
Copy Markdown
Member

No description provided.

@kwin kwin requested a review from cziegeler May 9, 2026 10:08
@kwin kwin marked this pull request as draft May 9, 2026 10:09
paren_count += self.lines[j].count('(') - self.lines[j].count(')')
j += 1

# Extract interfaces from "implements Interface1, Interface2, ..."

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also needs to consider interfaces implemented by base classes.

@kwin kwin May 9, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also needs a broader search for the base class/interface declaration (without necessarily evaluating the full Maven classpath....). Maybe some commons base classes can be added here like SlingSafeMethodsServlet, SlingAllMethodsServlet or javax.servlet.GenericServlet with their implemented interfaces.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of checking the source code one can instead evaluate the generated component descriptors generated by Felix SCR plugin.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's probably the better option, I guess this should be done anyway to compare old vs new

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some notes about comparing the new and old descriptors in https://github.com/apache/sling-whiteboard/blob/master/skills/update-sling-parent-pom/references/osgi-annotations.md#validation , they might be useful here.

Maybe we can convince @jsedding to release that tool to Maven Central :-)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kwin I hear he is working on it ...

@kwin kwin force-pushed the bugfix/service-values-in-scr-skill branch from b918f46 to f162d69 Compare May 9, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants