[Jenkins] Sling » Modules » sling-org-apache-sling-starter » master #1071 is FIXED
Please see https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-starter/job/master/1071/ for details. No further emails will be sent until the status of the build is changed.
[jira] [Commented] (SLING-12088) Update to Felix HTTP 5.x
[ https://issues.apache.org/jira/browse/SLING-12088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774330#comment-17774330 ] Carsten Ziegeler commented on SLING-12088: -- Fixed the HC servlert in https://github.com/apache/sling-org-apache-sling-starter/commit/5e559dfad84c3854032d292f105c65633afcb5e2 > Update to Felix HTTP 5.x > > > Key: SLING-12088 > URL: https://issues.apache.org/jira/browse/SLING-12088 > Project: Sling > Issue Type: Improvement > Components: Starter >Reporter: Robert Munteanu >Assignee: Robert Munteanu >Priority: Major > Labels: Sling-13-Release-Notes > Fix For: Starter 13 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
Re: [PR] SLING-12038 add support for reified OSGi config annotations as test parameters [sling-org-apache-sling-testing-osgi-mock]
adamcin commented on PR #31: URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/31#issuecomment-1758809026 > 2. but it think it's very important that this new way of defining OSGi configurations also works together with the current approach of OSGi mock using registerInjectActivateService & co. so it should be possible to define a configuration using the new annotations, and than creating the osgi component instance using registerInjectActivateService without explicitly passing the config data as argument. looking at the unit tests i think this is possible, but only if using the @UpdateConfig annotation, not the @ApplyConfig annotation, and not using the config annotation class itself as annotation? would be good to flesh this out in detail in the documentation/examples. The effects of `@UpdateConfig` are fully reflected in the service component created by `registerInjectActivateService`. Injected config parameters (reflected annotations and values constructed from `@ConfigType` ~~`@ApplyConfig`~~ annotations) don't currently have a way to be fed to `registerInjectActivateService`, but I think it can be done. > 3. what i do not like about the current registerInjectActivateService approach and passing in configuration data is that you have to remember the actual configuration property names and duplicate them as strings in the testing code. that's ugly as there is nice typed annotation class at hand. i would really love to combine registerInjectActivateService with the annotation approach of using the OSGi config annotation directly as annotation of the test class (but without having to inject the configuration than manually!). I think this can also be done elegantly if I add an `@AutoConfig` annotation that just takes a `Class value()` for inferring a component pid. When it is present, any other annotations that are valid component property types are converted to maps and merged into a single dictionary to update the config for the component pid before each test execution. > i'm not so fond of having to place and explicit @Retention(RetentionPolicy.RUNTIME) to the annotation class, though - changing the production code only for unit test purposes is always a red flag for me. I had to convince myself to get over the same kind of resistance to it. But it is an unavoidable necessity if we want to use the config types as annotations, unless we want to get into the business of rewriting bytecode. I haven't been able to come up with any reason why using runtime retention for config annotations would be unsafe or insecure, or have any other kind of observable effect on the code that actually goes to production. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] SLING-12038 add support for reified OSGi config annotations as test parameters [sling-org-apache-sling-testing-osgi-mock]
sonarcloud[bot] commented on PR #31: URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/31#issuecomment-1758764292 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-testing-osgi-mock=31) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=CODE_SMELL) [![99.8%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/90-16px.png '99.8%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=31=new_coverage=list) [99.8% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=31=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=31=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=31=new_duplicated_lines_density=list) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] SLING-12038 add support for reified OSGi config annotations as test parameters [sling-org-apache-sling-testing-osgi-mock]
adamcin commented on PR #31: URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/31#issuecomment-1758743454 > 1. you propose to use this new features as lightweight alternative to the SCR metadata-based approach, making it easy to construct OSGI annotations filled with the configured data in the testing code. i'm worrying a bit about the approach to directly instantiate the OSGi component which effectively ignores all SCR annotations. this is fine for simple services as in your example, but if more stuff is used o.g. references to other services with complex reference mappings it will be left to the test developer to inject all of this properly, and it's easy to overlook something. still, if there is a need for such a simple approach and the test developer knows what he is doing, that's fine. a warning should be put for that in the documentation around the limitations of this approach. @stefanseifert I removed the javadoc text that you are referencing because of the confusion. The words "lightweight alternative" probably don't make any sense with how this feature has evolved. The initial and primary purpose for this extension is to support unit testing of service component constructors and activation methods with pure java types with the same granularity that other component methods can currently be tested. The secondary purposes that have evolved during development are to support verifying the expected mapping between config property names and annotation attributes, and to make it clearer when defining OSGi configurations for use in `registerInjectActivateService`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] SLING-12038 add documentation for OSGi Mocks Config Annotations [sling-site]
adamcin commented on code in PR #135: URL: https://github.com/apache/sling-site/pull/135#discussion_r1355897991 ## src/main/jbake/content/documentation/development/osgi-mock.md: ## @@ -231,3 +235,192 @@ More examples: [mockito-junit5-extension]: https://www.javadoc.io/page/org.mockito/mockito-junit-jupiter/latest/org/mockito/junit/jupiter/MockitoExtension.html [caconfig-mock-plugin]: https://github.com/apache/sling-org-apache-sling-testing-caconfig-mock-plugin/blob/master/src/main/java/org/apache/sling/testing/mock/caconfig/ContextPlugins.java [caconfig-mock-plugin-test]: https://github.com/apache/sling-org-apache-sling-testing-caconfig-mock-plugin/blob/master/src/test/java/org/apache/sling/testing/mock/caconfig/ContextPluginsTest.java + +## Config Annotations + +Since osgi-mock 3.4.0, it is possible to use the provided `@UpdateConfig` and `@ApplyConfig` annotations to directly construct component property type ("Config") annotations for use as first-class values in unit tests. Both osgi-mock.junit4 and osgi-mock.junit5 provide different approaches for convenient reflection and injection of these annotations. Review Comment: @stefanseifert I decided to rename `@ApplyConfig` to `@ConfigType` after spending time on the javadocs and refactoring the related logic out of OsgiContextImpl. I've added the guidance to the page. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (SLING-12088) Update to Felix HTTP 5.x
[ https://issues.apache.org/jira/browse/SLING-12088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774226#comment-17774226 ] Robert Munteanu commented on SLING-12088: - HealthCheck servlets are no longer mounted, see FELIX-6659 . > Update to Felix HTTP 5.x > > > Key: SLING-12088 > URL: https://issues.apache.org/jira/browse/SLING-12088 > Project: Sling > Issue Type: Improvement > Components: Starter >Reporter: Robert Munteanu >Assignee: Robert Munteanu >Priority: Major > Labels: Sling-13-Release-Notes > Fix For: Starter 13 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
Re: [PR] SLING-12038 add support for reified OSGi config annotations as test parameters [sling-org-apache-sling-testing-osgi-mock]
adamcin commented on PR #31: URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/31#issuecomment-1758297579 @stefanseifert in reply to: > 4. you added a couple of methods to `OsgiContextImpl`. this class is the primary API class developers interact with when writing unit tests, so we should only add public methods that are useful for them in this job. it looks to me that the methods added there are only helper methods to support the junit5/4 handling of the annotations? if this is the case, the code should be moved to another class which itself interacts with `OsgiContext` to get the `ConfigurationAdmin` instance. I have addressed this point by moving all the new methods from `OsgiContextImpl` to a new `config.ConfigTypeContext` class as you recommended. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump org.apache.sling.servlets.post from 2.3.0 to 2.3.8 [sling-org-apache-sling-launchpad-integration-tests]
sonarcloud[bot] commented on PR #7: URL: https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests/pull/7#issuecomment-1758225696 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-launchpad-integration-tests=7) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=7=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=7=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=7=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=7=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=7=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=7=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=7=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=7=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=7=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=7=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=7=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=7=false=CODE_SMELL) [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=7) No Coverage information [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=7=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=7=new_duplicated_lines_density=list) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump commons-io from 2.5 to 2.7 [sling-org-apache-sling-launchpad-integration-tests]
sonarcloud[bot] commented on PR #14: URL: https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests/pull/14#issuecomment-1758225785 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-launchpad-integration-tests=14) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=14=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=14=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=14=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=14=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=14=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=14=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=14=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=14=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=14=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=14=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=14=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=14=false=CODE_SMELL) [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=14) No Coverage information [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=14=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=14=new_duplicated_lines_density=list) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump plexus-utils from 3.0.9 to 3.0.16 [sling-org-apache-sling-launchpad-integration-tests]
sonarcloud[bot] commented on PR #6: URL: https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests/pull/6#issuecomment-1758223036 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-launchpad-integration-tests=6) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=6=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=6=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=6=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=6=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=6=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=6=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=6=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=6=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=6=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=6=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=6=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=6=false=CODE_SMELL) [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=6) No Coverage information [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=6=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=6=new_duplicated_lines_density=list) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump logback-classic from 1.1.2 to 1.2.0 [sling-org-apache-sling-launchpad-integration-tests]
sonarcloud[bot] commented on PR #12: URL: https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests/pull/12#issuecomment-1758221583 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-launchpad-integration-tests=12) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=12=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=12=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=12=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=12=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=12=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=12=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=12=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=12=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=12=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=12=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=12=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=12=false=CODE_SMELL) [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=12) No Coverage information [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=12=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=12=new_duplicated_lines_density=list) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump org.apache.sling.jcr.base from 3.0.2 to 3.1.12 [sling-org-apache-sling-launchpad-integration-tests]
sonarcloud[bot] commented on PR #11: URL: https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests/pull/11#issuecomment-1758221431 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-launchpad-integration-tests=11) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=11=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=11=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=11=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=11=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=11=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=11=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=11=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=11=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=11=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=11=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=11=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=11=false=CODE_SMELL) [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=11) No Coverage information [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=11=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=11=new_duplicated_lines_density=list) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [SLING-9417] Added test for an nt:file child of a versioned node [sling-org-apache-sling-launchpad-integration-tests]
sonarcloud[bot] commented on PR #1: URL: https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests/pull/1#issuecomment-1758223520 SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-launchpad-integration-tests=1) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=false=CODE_SMELL) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=new_coverage=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=1=new_duplicated_lines_density=list) ![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png 'idea') Catch issues before they fail your Quality Gate with our IDE extension ![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png 'sonarlint') [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump org.apache.sling.api from 2.3.0 to 2.25.4 [sling-org-apache-sling-launchpad-integration-tests]
sonarcloud[bot] commented on PR #8: URL: https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests/pull/8#issuecomment-1758221895 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-launchpad-integration-tests=8) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=8=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=8=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=8=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=8=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=8=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=8=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=8=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=8=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-launchpad-integration-tests=8=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=8=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=8=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-launchpad-integration-tests=8=false=CODE_SMELL) [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=8) No Coverage information [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=8=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-launchpad-integration-tests=8=new_duplicated_lines_density=list) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Updated] (SLING-12091) [RESOURCE MERGER] NullPointerException when creating new Resource Provider
[ https://issues.apache.org/jira/browse/SLING-12091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Konrad Windszus updated SLING-12091: Fix Version/s: Resource Merger 1.4.6 > [RESOURCE MERGER] NullPointerException when creating new Resource Provider > -- > > Key: SLING-12091 > URL: https://issues.apache.org/jira/browse/SLING-12091 > Project: Sling > Issue Type: Bug >Affects Versions: Resource Merger 1.4.2, Resource Merger 1.4.4 >Reporter: Guillaume Douillet >Priority: Major > Fix For: Resource Merger 1.4.6 > > > Hello, > We have a custom implementation of MergedResourcePicker2, and after applying > a patch bumping Sling Resource Merger bundle to 1.4.2 the creation of our > ResourceProvider service was failing in MergedResourcePickerWhiteboard with > the following exception : > {code:java} > java.lang.NullPointerException: null > at > org.apache.sling.resourcemerger.impl.MergedResourcePickerWhiteboard.registerMergingResourceProvider(MergedResourcePickerWhiteboard.java:100) > at > org.apache.sling.resourcemerger.impl.MergedResourcePickerWhiteboard.bindMergedResourcePicker2(MergedResourcePickerWhiteboard.java:77) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:566) {code} > Looking at the source of MergedResourcePickerWhiteboard, it could be related > to bundleContext being null. > It could happen because after applying the patch, the Sling Merge Resource > bundle is started after the bundle containing our MergedResourcePicker2 > implementation. > On a test instance where our bundle starts after Sling Merge Resource bundle, > there is no such exception and our custom Resource Provider service is > properly registered. > As a temporary workaround we added some fake dependencies to force our > Resource Picker service to start after Sling OOTB implementations : > {code:java} > reference = { > // fake references to make sure this service starts only after Sling > MergedResourcePickerWhiteboard is available > @Reference(service = ResourceProvider.class, > target = "(provider.root=/mnt/override)", > name = "$$scr$$ResourceProvider1", > policyOption = ReferencePolicyOption.GREEDY), > @Reference(service = ResourceProvider.class, > target = "(provider.root=/mnt/overlay)", > name = "$$scr$$ResourceProvider2", > policyOption = ReferencePolicyOption.GREEDY)}{code} > However it's not sustainable on the long run as these OOTB implementations > can changed or be removed in the future. > Thanks a lot -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (SLING-12091) [RESOURCE MERGER] NullPointerException when creating new Resource Provider
[ https://issues.apache.org/jira/browse/SLING-12091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774159#comment-17774159 ] Konrad Windszus commented on SLING-12091: - Switching to constructor injection seems to be the best fix: https://stackoverflow.com/a/61103406/5155923. [~gdouillet] Would you be able to come up with a PR? > [RESOURCE MERGER] NullPointerException when creating new Resource Provider > -- > > Key: SLING-12091 > URL: https://issues.apache.org/jira/browse/SLING-12091 > Project: Sling > Issue Type: Bug >Affects Versions: Resource Merger 1.4.2, Resource Merger 1.4.4 >Reporter: Guillaume Douillet >Priority: Major > > Hello, > We have a custom implementation of MergedResourcePicker2, and after applying > a patch bumping Sling Resource Merger bundle to 1.4.2 the creation of our > ResourceProvider service was failing in MergedResourcePickerWhiteboard with > the following exception : > {code:java} > java.lang.NullPointerException: null > at > org.apache.sling.resourcemerger.impl.MergedResourcePickerWhiteboard.registerMergingResourceProvider(MergedResourcePickerWhiteboard.java:100) > at > org.apache.sling.resourcemerger.impl.MergedResourcePickerWhiteboard.bindMergedResourcePicker2(MergedResourcePickerWhiteboard.java:77) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:566) {code} > Looking at the source of MergedResourcePickerWhiteboard, it could be related > to bundleContext being null. > It could happen because after applying the patch, the Sling Merge Resource > bundle is started after the bundle containing our MergedResourcePicker2 > implementation. > On a test instance where our bundle starts after Sling Merge Resource bundle, > there is no such exception and our custom Resource Provider service is > properly registered. > As a temporary workaround we added some fake dependencies to force our > Resource Picker service to start after Sling OOTB implementations : > {code:java} > reference = { > // fake references to make sure this service starts only after Sling > MergedResourcePickerWhiteboard is available > @Reference(service = ResourceProvider.class, > target = "(provider.root=/mnt/override)", > name = "$$scr$$ResourceProvider1", > policyOption = ReferencePolicyOption.GREEDY), > @Reference(service = ResourceProvider.class, > target = "(provider.root=/mnt/overlay)", > name = "$$scr$$ResourceProvider2", > policyOption = ReferencePolicyOption.GREEDY)}{code} > However it's not sustainable on the long run as these OOTB implementations > can changed or be removed in the future. > Thanks a lot -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (SLING-12091) [RESOURCE MERGER] NullPointerException when creating new Resource Provider
[ https://issues.apache.org/jira/browse/SLING-12091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774155#comment-17774155 ] Konrad Windszus edited comment on SLING-12091 at 10/11/23 5:42 PM: --- It seems that we incorrectly assume that bind is called after activate... which is not true (https://stackoverflow.com/questions/15782740/which-one-is-called-first-activate-function-or-bind-function-in-scr-runtime). was (Author: kwin): According to https://github.com/apache/sling-org-apache-sling-resourcemerger/blob/a1a9fda3d0231e0c6ee5eeda10567bb2625099b4/src/main/java/org/apache/sling/resourcemerger/impl/MergedResourcePickerWhiteboard.java#L100, the NPE occurs because the passed {{properties}} is {{null}}. According to https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.component.html#service.component-method.injection the bind method may have two parameters where the one with type {{Map}} will receive the service properties. It is unclear how that can be {{null}}. You are not supposed to call {{bindMergedResourcePicker2}} manually but rather let Felix SCR deal with it. Can you debug further and also provide the full stack trace to see why the {{properties}} argument is {{null}}? > [RESOURCE MERGER] NullPointerException when creating new Resource Provider > -- > > Key: SLING-12091 > URL: https://issues.apache.org/jira/browse/SLING-12091 > Project: Sling > Issue Type: Bug >Affects Versions: Resource Merger 1.4.2, Resource Merger 1.4.4 >Reporter: Guillaume Douillet >Priority: Major > > Hello, > We have a custom implementation of MergedResourcePicker2, and after applying > a patch bumping Sling Resource Merger bundle to 1.4.2 the creation of our > ResourceProvider service was failing in MergedResourcePickerWhiteboard with > the following exception : > {code:java} > java.lang.NullPointerException: null > at > org.apache.sling.resourcemerger.impl.MergedResourcePickerWhiteboard.registerMergingResourceProvider(MergedResourcePickerWhiteboard.java:100) > at > org.apache.sling.resourcemerger.impl.MergedResourcePickerWhiteboard.bindMergedResourcePicker2(MergedResourcePickerWhiteboard.java:77) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:566) {code} > Looking at the source of MergedResourcePickerWhiteboard, it could be related > to bundleContext being null. > It could happen because after applying the patch, the Sling Merge Resource > bundle is started after the bundle containing our MergedResourcePicker2 > implementation. > On a test instance where our bundle starts after Sling Merge Resource bundle, > there is no such exception and our custom Resource Provider service is > properly registered. > As a temporary workaround we added some fake dependencies to force our > Resource Picker service to start after Sling OOTB implementations : > {code:java} > reference = { > // fake references to make sure this service starts only after Sling > MergedResourcePickerWhiteboard is available > @Reference(service = ResourceProvider.class, > target = "(provider.root=/mnt/override)", > name = "$$scr$$ResourceProvider1", > policyOption = ReferencePolicyOption.GREEDY), > @Reference(service = ResourceProvider.class, > target = "(provider.root=/mnt/overlay)", > name = "$$scr$$ResourceProvider2", > policyOption = ReferencePolicyOption.GREEDY)}{code} > However it's not sustainable on the long run as these OOTB implementations > can changed or be removed in the future. > Thanks a lot -- This message was sent by Atlassian Jira (v8.20.10#820010)
Re: [VOTE] Release Apache Sling JCR Maintenance v1.1.0, Apache Sling JCR Oak Server v1.4.0
+1 Am Di., 10. Okt. 2023 um 01:15 Uhr schrieb Eric Norman : > Hi, > > These releases are needed to be compatible with the latest production > version of oak (1.56.0 or later). > > We solved 2 issues in the JCR Maintenance release: > > https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310710=12350102=Text > > We solved 5 issues in the JCR Oak Server release: > > https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310710=12351767=Text > > Staging repository: > https://repository.apache.org/content/repositories/orgapachesling-2795/ > > You can use this UNIX script to download the release and verify the > signatures: > > https://raw.githubusercontent.com/apache/sling-tooling-release/master/check_staged_release.sh > > Usage: > sh check_staged_release.sh 2795 /tmp/sling-staging > > Please vote to approve this release: > > [ ] +1 Approve the release > [ ] 0 Don't care > [ ] -1 Don't release, because ... > > This majority vote is open for at least 72 hours. > -- Cheers, Jörg Hoh, https://cqdump.joerghoh.de Twitter: @joerghoh
[jira] [Commented] (SLING-12091) [RESOURCE MERGER] NullPointerException when creating new Resource Provider
[ https://issues.apache.org/jira/browse/SLING-12091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774155#comment-17774155 ] Konrad Windszus commented on SLING-12091: - According to https://github.com/apache/sling-org-apache-sling-resourcemerger/blob/a1a9fda3d0231e0c6ee5eeda10567bb2625099b4/src/main/java/org/apache/sling/resourcemerger/impl/MergedResourcePickerWhiteboard.java#L100, the NPE occurs because the passed {{properties}} is {{null}}. According to https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.component.html#service.component-method.injection the bind method may have two parameters where the one with type {{Map}} will receive the service properties. It is unclear how that can be {{null}}. You are not supposed to call {{bindMergedResourcePicker2}} manually but rather let Felix SCR deal with it. Can you debug further and also provide the full stack trace to see why the {{properties}} argument is {{null}}? > [RESOURCE MERGER] NullPointerException when creating new Resource Provider > -- > > Key: SLING-12091 > URL: https://issues.apache.org/jira/browse/SLING-12091 > Project: Sling > Issue Type: Bug >Affects Versions: Resource Merger 1.4.2, Resource Merger 1.4.4 >Reporter: Guillaume Douillet >Priority: Major > > Hello, > We have a custom implementation of MergedResourcePicker2, and after applying > a patch bumping Sling Resource Merger bundle to 1.4.2 the creation of our > ResourceProvider service was failing in MergedResourcePickerWhiteboard with > the following exception : > {code:java} > java.lang.NullPointerException: null > at > org.apache.sling.resourcemerger.impl.MergedResourcePickerWhiteboard.registerMergingResourceProvider(MergedResourcePickerWhiteboard.java:100) > at > org.apache.sling.resourcemerger.impl.MergedResourcePickerWhiteboard.bindMergedResourcePicker2(MergedResourcePickerWhiteboard.java:77) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:566) {code} > Looking at the source of MergedResourcePickerWhiteboard, it could be related > to bundleContext being null. > It could happen because after applying the patch, the Sling Merge Resource > bundle is started after the bundle containing our MergedResourcePicker2 > implementation. > On a test instance where our bundle starts after Sling Merge Resource bundle, > there is no such exception and our custom Resource Provider service is > properly registered. > As a temporary workaround we added some fake dependencies to force our > Resource Picker service to start after Sling OOTB implementations : > {code:java} > reference = { > // fake references to make sure this service starts only after Sling > MergedResourcePickerWhiteboard is available > @Reference(service = ResourceProvider.class, > target = "(provider.root=/mnt/override)", > name = "$$scr$$ResourceProvider1", > policyOption = ReferencePolicyOption.GREEDY), > @Reference(service = ResourceProvider.class, > target = "(provider.root=/mnt/overlay)", > name = "$$scr$$ResourceProvider2", > policyOption = ReferencePolicyOption.GREEDY)}{code} > However it's not sustainable on the long run as these OOTB implementations > can changed or be removed in the future. > Thanks a lot -- This message was sent by Atlassian Jira (v8.20.10#820010)
Re: [PR] SLING-12038 add support for reified OSGi config annotations as test parameters [sling-org-apache-sling-testing-osgi-mock]
adamcin commented on code in PR #31: URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/31#discussion_r1355415498 ## junit5/pom.xml: ## @@ -47,6 +47,25 @@ tests test + +org.apache.sling + org.apache.sling.testing.osgi-mock.test-services +3.3.11-SNAPSHOT +test + + + +org.apache.sling +org.apache.sling.testing.sling-mock.junit5 Review Comment: I'm satisfied that it demonstrated the necessary compatibility for the purpose of the PR, so I've removed it. I'm happy to add a similar test to sling-mock in the future. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Created] (SLING-12091) [RESOURCE MERGER] NullPointerException when creating new Resource Provider
Guillaume Douillet created SLING-12091: -- Summary: [RESOURCE MERGER] NullPointerException when creating new Resource Provider Key: SLING-12091 URL: https://issues.apache.org/jira/browse/SLING-12091 Project: Sling Issue Type: Bug Affects Versions: Resource Merger 1.4.4, Resource Merger 1.4.2 Reporter: Guillaume Douillet Hello, We have a custom implementation of MergedResourcePicker2, and after applying a patch bumping Sling Resource Merger bundle to 1.4.2 the creation of our ResourceProvider service was failing in MergedResourcePickerWhiteboard with the following exception : {code:java} java.lang.NullPointerException: null at org.apache.sling.resourcemerger.impl.MergedResourcePickerWhiteboard.registerMergingResourceProvider(MergedResourcePickerWhiteboard.java:100) at org.apache.sling.resourcemerger.impl.MergedResourcePickerWhiteboard.bindMergedResourcePicker2(MergedResourcePickerWhiteboard.java:77) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) {code} Looking at the source of MergedResourcePickerWhiteboard, it could be related to bundleContext being null. It could happen because after applying the patch, the Sling Merge Resource bundle is started after the bundle containing our MergedResourcePicker2 implementation. On a test instance where our bundle starts after Sling Merge Resource bundle, there is no such exception and our custom Resource Provider service is properly registered. As a temporary workaround we added some fake dependencies to force our Resource Picker service to start after Sling OOTB implementations : {code:java} reference = { // fake references to make sure this service starts only after Sling MergedResourcePickerWhiteboard is available @Reference(service = ResourceProvider.class, target = "(provider.root=/mnt/override)", name = "$$scr$$ResourceProvider1", policyOption = ReferencePolicyOption.GREEDY), @Reference(service = ResourceProvider.class, target = "(provider.root=/mnt/overlay)", name = "$$scr$$ResourceProvider2", policyOption = ReferencePolicyOption.GREEDY)}{code} However it's not sustainable on the long run as these OOTB implementations can changed or be removed in the future. Thanks a lot -- This message was sent by Atlassian Jira (v8.20.10#820010)
Re: [PR] SLING-12088 - Update to Felix HTTP 5.x [sling-org-apache-sling-starter]
rombert merged PR #252: URL: https://github.com/apache/sling-org-apache-sling-starter/pull/252 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] jSLING-12088 - Update to Felix HTTP 5.x [sling-org-apache-sling-starter]
rombert opened a new pull request, #252: URL: https://github.com/apache/sling-org-apache-sling-starter/pull/252 Add back missing webconsole plugins -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Reopened] (SLING-12088) Update to Felix HTTP 5.x
[ https://issues.apache.org/jira/browse/SLING-12088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Munteanu reopened SLING-12088: - We are now missing the two new webconsole plugins moved out as part of FELIX-6583 . > Update to Felix HTTP 5.x > > > Key: SLING-12088 > URL: https://issues.apache.org/jira/browse/SLING-12088 > Project: Sling > Issue Type: Improvement > Components: Starter >Reporter: Robert Munteanu >Assignee: Robert Munteanu >Priority: Major > Labels: Sling-13-Release-Notes > Fix For: Starter 13 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
Re: [PR] SLING-12038 add documentation for OSGi Mocks Config Annotations [sling-site]
adamcin commented on code in PR #135: URL: https://github.com/apache/sling-site/pull/135#discussion_r1355177562 ## src/main/jbake/content/documentation/development/osgi-mock.md: ## @@ -231,3 +235,192 @@ More examples: [mockito-junit5-extension]: https://www.javadoc.io/page/org.mockito/mockito-junit-jupiter/latest/org/mockito/junit/jupiter/MockitoExtension.html [caconfig-mock-plugin]: https://github.com/apache/sling-org-apache-sling-testing-caconfig-mock-plugin/blob/master/src/main/java/org/apache/sling/testing/mock/caconfig/ContextPlugins.java [caconfig-mock-plugin-test]: https://github.com/apache/sling-org-apache-sling-testing-caconfig-mock-plugin/blob/master/src/test/java/org/apache/sling/testing/mock/caconfig/ContextPluginsTest.java + +## Config Annotations + +Since osgi-mock 3.4.0, it is possible to use the provided `@UpdateConfig` and `@ApplyConfig` annotations to directly construct component property type ("Config") annotations for use as first-class values in unit tests. Both osgi-mock.junit4 and osgi-mock.junit5 provide different approaches for convenient reflection and injection of these annotations. Review Comment: @stefanseifert I've honestly had the hardest time naming the `@ApplyConfig` annotation throughout its development, so I'm still open to suggestions as long as that PR is open. My first choice was to call it `@ComponentPropertyType`, but this annotation is already defined by the OSGi spec for use as a marker annotation on the same config annotations I'm trying to construct, which would just invite confusion when one is accidentally used in place of the other. I also tried `@DynamicConfig` and `@ConfigMapping`, but I ultimately decided on `@ApplyConfig` when it became clear I should create a separate `@UpdateConfig` annotation. Maybe either `@GetConfig` or `@MapConfigType` would be better? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] SLING-12038 add documentation for OSGi Mocks Config Annotations [sling-site]
stefanseifert commented on code in PR #135: URL: https://github.com/apache/sling-site/pull/135#discussion_r1355154305 ## src/main/jbake/content/documentation/development/osgi-mock.md: ## @@ -231,3 +235,192 @@ More examples: [mockito-junit5-extension]: https://www.javadoc.io/page/org.mockito/mockito-junit-jupiter/latest/org/mockito/junit/jupiter/MockitoExtension.html [caconfig-mock-plugin]: https://github.com/apache/sling-org-apache-sling-testing-caconfig-mock-plugin/blob/master/src/main/java/org/apache/sling/testing/mock/caconfig/ContextPlugins.java [caconfig-mock-plugin-test]: https://github.com/apache/sling-org-apache-sling-testing-caconfig-mock-plugin/blob/master/src/test/java/org/apache/sling/testing/mock/caconfig/ContextPluginsTest.java + +## Config Annotations + +Since osgi-mock 3.4.0, it is possible to use the provided `@UpdateConfig` and `@ApplyConfig` annotations to directly construct component property type ("Config") annotations for use as first-class values in unit tests. Both osgi-mock.junit4 and osgi-mock.junit5 provide different approaches for convenient reflection and injection of these annotations. + +### JUnit 5: OSGi Config Parameters JUnit Extension + +Given an OSGi component class that looks like this: + +#!java +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Component(service = MyService.class) +public class MyService { + +// specify runtime retention to allow for direct usage in unit tests +@Retention(RetentionPolicy.RUNTIME) +public @interface Config { +String path() default "/"; +} + +private final String path; + +@Activate +public MyService(Config config) { +this.path = config.path(); +} + +public String getPath() { +return path; +} +} + +A companion unit test in JUnit 5 might look like this: + +#!java +import org.apache.sling.testing.mock.osgi.config.annotations.ApplyConfig; +import org.apache.sling.testing.mock.osgi.config.annotations.UpdateConfig; +import org.apache.sling.testing.mock.osgi.junit5.OsgiConfigParametersExtension; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +@ExtendWith(OsgiConfigParametersExtension.class) +class MyServiceTest { + +@Test +@MyService.Config(path = "/apps") // requires @Retention(RetentionPolicy.RUNTIME) +void getPath(MyService.Config config) { +MyService myService = new MyService(config); +assertEquals("/apps", myService.getPath()); +} + +@Test +@ApplyConfig(type = MyService.Config.class, property = "path=/libs") +void getPath_applyConfig(MyService.Config config) { +MyService myService = new MyService(config); +assertEquals("/libs", myService.getPath()); +} + +@Test +@UpdateConfig(pid = "new-pid", property = "path=/content") +@ApplyConfig(pid = "new-pid", type = MyService.Config.class) +void getPath_updateConfig(MyService.Config config) { +MyService myService = new MyService(config); +assertEquals("/content", myService.getPath()); +} +} + + +### JUnit 4: Config Collector JUnit Rule + +Given the same example OSGi component from before: + +#!java +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Component(service = MyService.class) +public class MyService { + +// specify runtime retention to allow for direct usage in unit tests +@Retention(RetentionPolicy.RUNTIME) +public @interface Config { +String path() default "/"; +} + +private final String path; + +@Activate +public MyService(Config config) { +this.path = config.path(); +} + +public String getPath() { +return path; +} +} + + +A companion unit test in JUnit 4 might look like this: + +#!java +import org.apache.sling.testing.mock.osgi.config.annotations.ApplyConfig; +import org.apache.sling.testing.mock.osgi.config.annotations.UpdateConfig; +import org.apache.sling.testing.mock.osgi.junit.ConfigCollector; +import org.apache.sling.testing.mock.osgi.junit.OsgiContext; +import org.apache.sling.testing.mock.osgi.junit.OsgiContextBuilder; +import org.junit.Rule; + +import static org.junit.Assert.assertEquals; + +public class MyServiceTest { + +@Rule +public OsgiContext context = new
Re: [PR] SLING-12038 add documentation for OSGi Mocks Config Annotations [sling-site]
adamcin commented on code in PR #135: URL: https://github.com/apache/sling-site/pull/135#discussion_r1355134428 ## src/main/jbake/content/documentation/development/osgi-mock.md: ## @@ -231,3 +235,192 @@ More examples: [mockito-junit5-extension]: https://www.javadoc.io/page/org.mockito/mockito-junit-jupiter/latest/org/mockito/junit/jupiter/MockitoExtension.html [caconfig-mock-plugin]: https://github.com/apache/sling-org-apache-sling-testing-caconfig-mock-plugin/blob/master/src/main/java/org/apache/sling/testing/mock/caconfig/ContextPlugins.java [caconfig-mock-plugin-test]: https://github.com/apache/sling-org-apache-sling-testing-caconfig-mock-plugin/blob/master/src/test/java/org/apache/sling/testing/mock/caconfig/ContextPluginsTest.java + +## Config Annotations + +Since osgi-mock 3.4.0, it is possible to use the provided `@UpdateConfig` and `@ApplyConfig` annotations to directly construct component property type ("Config") annotations for use as first-class values in unit tests. Both osgi-mock.junit4 and osgi-mock.junit5 provide different approaches for convenient reflection and injection of these annotations. + +### JUnit 5: OSGi Config Parameters JUnit Extension + +Given an OSGi component class that looks like this: + +#!java +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Component(service = MyService.class) +public class MyService { + +// specify runtime retention to allow for direct usage in unit tests +@Retention(RetentionPolicy.RUNTIME) +public @interface Config { +String path() default "/"; +} + +private final String path; + +@Activate +public MyService(Config config) { +this.path = config.path(); +} + +public String getPath() { +return path; +} +} + +A companion unit test in JUnit 5 might look like this: + +#!java +import org.apache.sling.testing.mock.osgi.config.annotations.ApplyConfig; +import org.apache.sling.testing.mock.osgi.config.annotations.UpdateConfig; +import org.apache.sling.testing.mock.osgi.junit5.OsgiConfigParametersExtension; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +@ExtendWith(OsgiConfigParametersExtension.class) +class MyServiceTest { + +@Test +@MyService.Config(path = "/apps") // requires @Retention(RetentionPolicy.RUNTIME) +void getPath(MyService.Config config) { +MyService myService = new MyService(config); +assertEquals("/apps", myService.getPath()); +} + +@Test +@ApplyConfig(type = MyService.Config.class, property = "path=/libs") +void getPath_applyConfig(MyService.Config config) { +MyService myService = new MyService(config); +assertEquals("/libs", myService.getPath()); +} + +@Test +@UpdateConfig(pid = "new-pid", property = "path=/content") +@ApplyConfig(pid = "new-pid", type = MyService.Config.class) +void getPath_updateConfig(MyService.Config config) { +MyService myService = new MyService(config); +assertEquals("/content", myService.getPath()); +} +} + + +### JUnit 4: Config Collector JUnit Rule + +Given the same example OSGi component from before: + +#!java +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Component(service = MyService.class) +public class MyService { + +// specify runtime retention to allow for direct usage in unit tests +@Retention(RetentionPolicy.RUNTIME) +public @interface Config { +String path() default "/"; +} + +private final String path; + +@Activate +public MyService(Config config) { +this.path = config.path(); +} + +public String getPath() { +return path; +} +} + + +A companion unit test in JUnit 4 might look like this: + +#!java +import org.apache.sling.testing.mock.osgi.config.annotations.ApplyConfig; +import org.apache.sling.testing.mock.osgi.config.annotations.UpdateConfig; +import org.apache.sling.testing.mock.osgi.junit.ConfigCollector; +import org.apache.sling.testing.mock.osgi.junit.OsgiContext; +import org.apache.sling.testing.mock.osgi.junit.OsgiContextBuilder; +import org.junit.Rule; + +import static org.junit.Assert.assertEquals; + +public class MyServiceTest { + +@Rule +public OsgiContext context = new
[jira] [Resolved] (SLING-12090) sling-mock: Make compatible with ResourceResolver 1.11.0
[ https://issues.apache.org/jira/browse/SLING-12090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Seifert resolved SLING-12090. Resolution: Fixed https://github.com/apache/sling-org-apache-sling-testing-sling-mock/commit/852f247e0c6ef7ed92f8e2684ea1d15c41e1a672 > sling-mock: Make compatible with ResourceResolver 1.11.0 > > > Key: SLING-12090 > URL: https://issues.apache.org/jira/browse/SLING-12090 > Project: Sling > Issue Type: Bug > Components: Testing >Affects Versions: Testing Sling Mock 3.4.12 >Reporter: Stefan Seifert >Assignee: Stefan Seifert >Priority: Major > Fix For: Testing Sling Mock 3.4.14 > > > SLING-12019 introduced a change in ResourceResolverFactoryActivator which > changes the registration of ResourceResolverFactory services into an > asynchronous process - which breaks most of the sling-mock based unit tests. -- This message was sent by Atlassian Jira (v8.20.10#820010)
Re: [PR] SLING-12090 Make compatible with ResourceResolver 1.11.0 [sling-org-apache-sling-testing-sling-mock]
stefanseifert merged PR #30: URL: https://github.com/apache/sling-org-apache-sling-testing-sling-mock/pull/30 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] SLING-12090 Make compatible with ResourceResolver 1.11.0 [sling-org-apache-sling-testing-sling-mock]
sonarcloud[bot] commented on PR #30: URL: https://github.com/apache/sling-org-apache-sling-testing-sling-mock/pull/30#issuecomment-1757692025 SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-testing-sling-mock=30) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock=30=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock=30=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock=30=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock=30=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock=30=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock=30=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-sling-mock=30=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-sling-mock=30=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-sling-mock=30=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock=30=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock=30=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock=30=false=CODE_SMELL) [![47.1%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/40-16px.png '47.1%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-sling-mock=30=new_coverage=list) [47.1% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-sling-mock=30=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-sling-mock=30=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-sling-mock=30=new_duplicated_lines_density=list) ![idea](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png 'idea') Catch issues before they fail your Quality Gate with our IDE extension ![sonarlint](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png 'sonarlint') [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] chore: correct link to bnd-indexer-maven-plugin [sling-org-apache-sling-starter]
rombert merged PR #251: URL: https://github.com/apache/sling-org-apache-sling-starter/pull/251 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] SLING-12090 Make compatible with ResourceResolver 1.11.0 [sling-org-apache-sling-testing-sling-mock]
stefanseifert opened a new pull request, #30: URL: https://github.com/apache/sling-org-apache-sling-testing-sling-mock/pull/30 by waiting for completion of the asynchronous registration introduced with SLING-12019 also switch usage of Hashtable to HashMap https://issues.apache.org/jira/browse/SLING-12090 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [VOTE] Release Apache Sling JCR Maintenance v1.1.0, Apache Sling JCR Oak Server v1.4.0
+1 On Wed, Oct 11, 2023 at 6:56 AM Stefan Seifert wrote: > > +1 > > stefan
[jira] [Created] (SLING-12090) sling-mock: Make compatible with ResourceResolver 1.11.0
Stefan Seifert created SLING-12090: -- Summary: sling-mock: Make compatible with ResourceResolver 1.11.0 Key: SLING-12090 URL: https://issues.apache.org/jira/browse/SLING-12090 Project: Sling Issue Type: Bug Components: Testing Affects Versions: Testing Sling Mock 3.4.12 Reporter: Stefan Seifert Assignee: Stefan Seifert Fix For: Testing Sling Mock 3.4.14 SLING-12019 introduced a change in ResourceResolverFactoryActivator which changes the registration of ResourceResolverFactory services into an asynchronous process - which breaks most of the sling-mock based unit tests. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (SLING-12040) Support Jakarta Servlet APIs
[ https://issues.apache.org/jira/browse/SLING-12040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Munteanu updated SLING-12040: Description: Third party library updates branch: https://github.com/apache/sling-org-apache-sling-starter/tree/issue/SLING-12040 This taks covers only the ability to deploy 'plain' servlets using Jakarta Servlet APIs, not allowing registering Sling servlets using the Jakarta Servlet APIs. was:Third party library updates branch: https://github.com/apache/sling-org-apache-sling-starter/tree/issue/SLING-12040 > Support Jakarta Servlet APIs > > > Key: SLING-12040 > URL: https://issues.apache.org/jira/browse/SLING-12040 > Project: Sling > Issue Type: Sub-task > Components: Starter >Reporter: Robert Munteanu >Assignee: Robert Munteanu >Priority: Major > > Third party library updates branch: > https://github.com/apache/sling-org-apache-sling-starter/tree/issue/SLING-12040 > This taks covers only the ability to deploy 'plain' servlets using Jakarta > Servlet APIs, not allowing registering Sling servlets using the Jakarta > Servlet APIs. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (SLING-12040) Support Jakarta Servlet APIs
[ https://issues.apache.org/jira/browse/SLING-12040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Munteanu updated SLING-12040: Component/s: Starter (was: API) (was: Engine) > Support Jakarta Servlet APIs > > > Key: SLING-12040 > URL: https://issues.apache.org/jira/browse/SLING-12040 > Project: Sling > Issue Type: Sub-task > Components: Starter >Reporter: Robert Munteanu >Assignee: Robert Munteanu >Priority: Major > > Third party library updates branch: > https://github.com/apache/sling-org-apache-sling-starter/tree/issue/SLING-12040 -- This message was sent by Atlassian Jira (v8.20.10#820010)
Re: [PR] chore(deps): update dependency biz.aqute.bnd:bnd-indexer-maven-plugin to v7 [sling-org-apache-sling-starter]
rombert commented on PR #250: URL: https://github.com/apache/sling-org-apache-sling-starter/pull/250#issuecomment-1757666938 Requires Java 17 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] chore: correct link to bnd-indexer-maven-plugin [sling-org-apache-sling-starter]
rombert opened a new pull request, #251: URL: https://github.com/apache/sling-org-apache-sling-starter/pull/251 (no comment) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] chore(deps): update dependency biz.aqute.bnd:bnd-indexer-maven-plugin to v7 [sling-org-apache-sling-starter]
renovate-bot opened a new pull request, #250: URL: https://github.com/apache/sling-org-apache-sling-starter/pull/250 [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [biz.aQute.bnd:bnd-indexer-maven-plugin](https://bnd.bndtools.org/) ([source](https://togithub.com/bndtools/bnd)) | `6.4.0` -> `7.0.0` | [![age](https://developer.mend.io/api/mc/badges/age/maven/biz.aQute.bnd:bnd-indexer-maven-plugin/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/biz.aQute.bnd:bnd-indexer-maven-plugin/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/biz.aQute.bnd:bnd-indexer-maven-plugin/6.4.0/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/biz.aQute.bnd:bnd-indexer-maven-plugin/6.4.0/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes bndtools/bnd (biz.aQute.bnd:bnd-indexer-maven-plugin) ### [`v7.0.0`](https://togithub.com/bndtools/bnd/releases/tag/7.0.0): Bnd/Bndtools 7.0.0 [Compare Source](https://togithub.com/bndtools/bnd/compare/6.4.0...7.0.0) This is the first release on Java 17. See [Release Notes](https://togithub.com/bndtools/bnd/wiki/Changes-in-7.0.0). --- ### Configuration **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/apache/sling-org-apache-sling-starter). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] chore(deps): update dependency org.ow2.asm:asm to v9.6 [sling-org-apache-sling-starter]
rombert merged PR #249: URL: https://github.com/apache/sling-org-apache-sling-starter/pull/249 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] chore(deps): update dependency org.codehaus.woodstox:stax2-api to v4.2.2 [sling-org-apache-sling-starter]
rombert merged PR #248: URL: https://github.com/apache/sling-org-apache-sling-starter/pull/248 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] chore(deps): update dependency org.ow2.asm:asm to v9.6 [sling-org-apache-sling-starter]
renovate-bot opened a new pull request, #249: URL: https://github.com/apache/sling-org-apache-sling-starter/pull/249 [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.ow2.asm:asm](http://asm.ow2.io/) ([source](https://gitlab.ow2.org/asm/asm/)) | `9.5` -> `9.6` | [![age](https://developer.mend.io/api/mc/badges/age/maven/org.ow2.asm:asm/9.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.ow2.asm:asm/9.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.ow2.asm:asm/9.5/9.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.ow2.asm:asm/9.5/9.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/apache/sling-org-apache-sling-starter). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Resolved] (SLING-12040) Support Jakarta Servlet APIs
[ https://issues.apache.org/jira/browse/SLING-12040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Munteanu resolved SLING-12040. - Assignee: Robert Munteanu Resolution: Fixed > Support Jakarta Servlet APIs > > > Key: SLING-12040 > URL: https://issues.apache.org/jira/browse/SLING-12040 > Project: Sling > Issue Type: Sub-task > Components: API, Engine >Reporter: Robert Munteanu >Assignee: Robert Munteanu >Priority: Major > > Third party library updates branch: > https://github.com/apache/sling-org-apache-sling-starter/tree/issue/SLING-12040 -- This message was sent by Atlassian Jira (v8.20.10#820010)
Re: [PR] SLING-12040 - Support Jakarta Servlet APIs [sling-org-apache-sling-starter]
rombert merged PR #239: URL: https://github.com/apache/sling-org-apache-sling-starter/pull/239 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Resolved] (SLING-12088) Update to Felix HTTP 5.x
[ https://issues.apache.org/jira/browse/SLING-12088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Munteanu resolved SLING-12088. - Resolution: Fixed > Update to Felix HTTP 5.x > > > Key: SLING-12088 > URL: https://issues.apache.org/jira/browse/SLING-12088 > Project: Sling > Issue Type: Improvement > Components: Starter >Reporter: Robert Munteanu >Assignee: Robert Munteanu >Priority: Major > Labels: Sling-13-Release-Notes > Fix For: Starter 13 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[PR] chore(deps): update dependency org.codehaus.woodstox:stax2-api to v4.2.2 [sling-org-apache-sling-starter]
renovate-bot opened a new pull request, #248: URL: https://github.com/apache/sling-org-apache-sling-starter/pull/248 [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.codehaus.woodstox:stax2-api](https://togithub.com/FasterXML/stax2-api) | `4.2.1` -> `4.2.2` | [![age](https://developer.mend.io/api/mc/badges/age/maven/org.codehaus.woodstox:stax2-api/4.2.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.codehaus.woodstox:stax2-api/4.2.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.codehaus.woodstox:stax2-api/4.2.1/4.2.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.codehaus.woodstox:stax2-api/4.2.1/4.2.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/apache/sling-org-apache-sling-starter). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] chore(deps): update apache felix http (major) [sling-org-apache-sling-starter]
rombert merged PR #147: URL: https://github.com/apache/sling-org-apache-sling-starter/pull/147 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] chore(deps): update apache felix http (major) [sling-org-apache-sling-starter]
rombert commented on PR #147: URL: https://github.com/apache/sling-org-apache-sling-starter/pull/147#issuecomment-1757486414 Should pass as soon as new artifacts built with https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests/pull/15 are deployed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] SLING-12088 - Update to Felix HTTP 5.x [sling-org-apache-sling-launchpad-integration-tests]
rombert merged PR #15: URL: https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests/pull/15 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] SLING-12089 Jenkins: Generate javadocs to spot illegal javadoc markup in sources [sling-tooling-jenkins]
kwin commented on PR #19: URL: https://github.com/apache/sling-tooling-jenkins/pull/19#issuecomment-1757457850 > this is a very simplistic approach. how is it possible to test this before actually merging it? Testing is described in https://github.com/apache/sling-tooling-jenkins#test-changes -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] SLING-12089 Jenkins: Generate javadocs to spot illegal javadoc markup in sources [sling-tooling-jenkins]
stefanseifert commented on PR #19: URL: https://github.com/apache/sling-tooling-jenkins/pull/19#issuecomment-1757451916 this is a very simplistic approach. how is it possible to test this before actually merging it? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
RE: jenkins builds: include javadoc:javadoc goal
i've created https://issues.apache.org/jira/browse/SLING-12089 with a very simplistic PR - maybe it could be written better. (never looked into our Jenkins tooling before) stefan > -Original Message- > From: Konrad Windszus > Sent: Wednesday, October 11, 2023 11:30 AM > To: dev@sling.apache.org > Subject: Re: jenkins builds: include javadoc:javadoc goal > > Hi, > Makes sense to me. Can you create a PR? That should only be done though > with the main OS/JDK. No need to build javadoc with every OS/JDK > combination. > Konrad > > > Am 11.10.2023 um 11:11 schrieb Stefan Seifert e.com.invalid>: > > > > if often happens that releases fail due to small javadoc errors, which > get obvious when the "javadoc:javadoc" goal is executed on the command > line. but this does not fail our CI builds, that's why it often goes > unnoticed for quite some time (also in PRs). > > > > we should add that goal to our default build goals in jenkins. > > > > WDYT? > > > > stefan
[jira] [Created] (SLING-12089) Jenkins: Generate javadocs to spot illegal javadoc markup in sources
Stefan Seifert created SLING-12089: -- Summary: Jenkins: Generate javadocs to spot illegal javadoc markup in sources Key: SLING-12089 URL: https://issues.apache.org/jira/browse/SLING-12089 Project: Sling Issue Type: Improvement Components: Tooling Reporter: Stefan Seifert if often happens that releases fail due to small javadoc errors, which get obvious when the "javadoc:javadoc" goal is executed on the command line. but this does not fail our CI builds, that's why it often goes unnoticed for quite some time (also in PRs). we should add that goal to our default build goals in jenkins. -- This message was sent by Atlassian Jira (v8.20.10#820010)
RE: [VOTE] Release Apache Sling JCR Maintenance v1.1.0, Apache Sling JCR Oak Server v1.4.0
+1 stefan
RE: [VOTE] Release Apache Sling Testing Clients version 3.0.20
+1 please note that the ticket SLING-11748 is missing from the changelog. for SLING-11748 also a new PR is proposed [1], which completely changes the approach and removes the logging of headers completely (for security reasons). i assume that's not a blocker for this release, but a new ticket should be created for this new PR. stefan [1] https://github.com/apache/sling-org-apache-sling-testing-clients/pull/43 > -Original Message- > From: Andrei Dulvac > Sent: Monday, October 9, 2023 5:44 PM > To: dev@sling.apache.org > Subject: [VOTE] Release Apache Sling Testing Clients version 3.0.20 > > Hi, > > We solved 1 issue in this release: > https://issues.apache.org/jira/projects/SLING/versions/12353697 > > Staging repository: > https://repository.apache.org/content/repositories/orgapachesling-2794/ > > You can use this UNIX script to download the release and verify the > signatures: > https://raw.githubusercontent.com/apache/sling-tooling- > release/master/check_staged_release.sh > > Usage: > sh check_staged_release.sh 2794 /tmp/sling-staging > > Please vote to approve this release: > > [ ] +1 Approve the release > [ ] 0 Don't care > [ ] -1 Don't release, because ... > > This majority vote is open for at least 72 hours. > > Cheers,
Re: jenkins builds: include javadoc:javadoc goal
Hi, Makes sense to me. Can you create a PR? That should only be done though with the main OS/JDK. No need to build javadoc with every OS/JDK combination. Konrad > Am 11.10.2023 um 11:11 schrieb Stefan Seifert > : > > if often happens that releases fail due to small javadoc errors, which get > obvious when the "javadoc:javadoc" goal is executed on the command line. but > this does not fail our CI builds, that's why it often goes unnoticed for > quite some time (also in PRs). > > we should add that goal to our default build goals in jenkins. > > WDYT? > > stefan
Re: [PR] SLING-12038 add documentation for OSGi Mocks Config Annotations [sling-site]
stefanseifert commented on code in PR #135: URL: https://github.com/apache/sling-site/pull/135#discussion_r1354537308 ## src/main/jbake/content/documentation/development/osgi-mock.md: ## @@ -231,3 +235,192 @@ More examples: [mockito-junit5-extension]: https://www.javadoc.io/page/org.mockito/mockito-junit-jupiter/latest/org/mockito/junit/jupiter/MockitoExtension.html [caconfig-mock-plugin]: https://github.com/apache/sling-org-apache-sling-testing-caconfig-mock-plugin/blob/master/src/main/java/org/apache/sling/testing/mock/caconfig/ContextPlugins.java [caconfig-mock-plugin-test]: https://github.com/apache/sling-org-apache-sling-testing-caconfig-mock-plugin/blob/master/src/test/java/org/apache/sling/testing/mock/caconfig/ContextPluginsTest.java + +## Config Annotations + +Since osgi-mock 3.4.0, it is possible to use the provided `@UpdateConfig` and `@ApplyConfig` annotations to directly construct component property type ("Config") annotations for use as first-class values in unit tests. Both osgi-mock.junit4 and osgi-mock.junit5 provide different approaches for convenient reflection and injection of these annotations. + +### JUnit 5: OSGi Config Parameters JUnit Extension + +Given an OSGi component class that looks like this: + +#!java +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Component(service = MyService.class) +public class MyService { + +// specify runtime retention to allow for direct usage in unit tests +@Retention(RetentionPolicy.RUNTIME) +public @interface Config { +String path() default "/"; +} + +private final String path; + +@Activate +public MyService(Config config) { +this.path = config.path(); +} + +public String getPath() { +return path; +} +} + +A companion unit test in JUnit 5 might look like this: + +#!java +import org.apache.sling.testing.mock.osgi.config.annotations.ApplyConfig; +import org.apache.sling.testing.mock.osgi.config.annotations.UpdateConfig; +import org.apache.sling.testing.mock.osgi.junit5.OsgiConfigParametersExtension; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +@ExtendWith(OsgiConfigParametersExtension.class) +class MyServiceTest { + +@Test +@MyService.Config(path = "/apps") // requires @Retention(RetentionPolicy.RUNTIME) +void getPath(MyService.Config config) { +MyService myService = new MyService(config); +assertEquals("/apps", myService.getPath()); +} + +@Test +@ApplyConfig(type = MyService.Config.class, property = "path=/libs") +void getPath_applyConfig(MyService.Config config) { +MyService myService = new MyService(config); +assertEquals("/libs", myService.getPath()); +} + +@Test +@UpdateConfig(pid = "new-pid", property = "path=/content") +@ApplyConfig(pid = "new-pid", type = MyService.Config.class) +void getPath_updateConfig(MyService.Config config) { +MyService myService = new MyService(config); +assertEquals("/content", myService.getPath()); +} +} + + +### JUnit 4: Config Collector JUnit Rule + +Given the same example OSGi component from before: + +#!java +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Component(service = MyService.class) +public class MyService { + +// specify runtime retention to allow for direct usage in unit tests +@Retention(RetentionPolicy.RUNTIME) +public @interface Config { +String path() default "/"; +} + +private final String path; + +@Activate +public MyService(Config config) { +this.path = config.path(); +} + +public String getPath() { +return path; +} +} + + +A companion unit test in JUnit 4 might look like this: + +#!java +import org.apache.sling.testing.mock.osgi.config.annotations.ApplyConfig; +import org.apache.sling.testing.mock.osgi.config.annotations.UpdateConfig; +import org.apache.sling.testing.mock.osgi.junit.ConfigCollector; +import org.apache.sling.testing.mock.osgi.junit.OsgiContext; +import org.apache.sling.testing.mock.osgi.junit.OsgiContextBuilder; +import org.junit.Rule; + +import static org.junit.Assert.assertEquals; + +public class MyServiceTest { + +@Rule +public OsgiContext context = new
Re: [PR] SLING-12038 add support for reified OSGi config annotations as test parameters [sling-org-apache-sling-testing-osgi-mock]
stefanseifert commented on code in PR #31: URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/31#discussion_r1354569056 ## core/src/main/java/org/apache/sling/testing/mock/osgi/config/package-info.java: ## @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +@org.osgi.annotation.versioning.Version("1.0.0") Review Comment: cosmetic: please add a package comment (for nicer javadocs) - also in the other new `package-info.java` files ## junit5/pom.xml: ## @@ -47,6 +47,25 @@ tests test + +org.apache.sling + org.apache.sling.testing.osgi-mock.test-services +3.3.11-SNAPSHOT +test + + + +org.apache.sling +org.apache.sling.testing.sling-mock.junit5 Review Comment: this introduces a sort-of cyclic dependency between osgi-mock and [sling-mock][sling-mock] it would rather avoid. the only purpose seems to be the unit test `org.apache.sling.testing.mock.osgi.junit5.OsgiConfigParametersWithSlingContextExtensionTest` - i would rather move this test class to [sling-mock][sling-mock] itself? [sling-mock]: https://github.com/apache/sling-org-apache-sling-testing-sling-mock -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] SLING-12038 add support for reified OSGi config annotations as test parameters [sling-org-apache-sling-testing-osgi-mock]
sonarcloud[bot] commented on PR #31: URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/31#issuecomment-1757303111 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-testing-osgi-mock=31) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=CODE_SMELL) [3 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=CODE_SMELL) [![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png '100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=31=new_coverage=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=31=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=31=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=31=new_duplicated_lines_density=list) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] SLING-12038 add support for reified OSGi config annotations as test parameters [sling-org-apache-sling-testing-osgi-mock]
sonarcloud[bot] commented on PR #31: URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/31#issuecomment-1757228224 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-testing-osgi-mock=31) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=CODE_SMELL) [3 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-osgi-mock=31=false=CODE_SMELL) [![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png '100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=31=new_coverage=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=31=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=31=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-osgi-mock=31=new_duplicated_lines_density=list) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
jenkins builds: include javadoc:javadoc goal
if often happens that releases fail due to small javadoc errors, which get obvious when the "javadoc:javadoc" goal is executed on the command line. but this does not fail our CI builds, that's why it often goes unnoticed for quite some time (also in PRs). we should add that goal to our default build goals in jenkins. WDYT? stefan
Re: [PR] SLING-12038 add support for reified OSGi config annotations as test parameters [sling-org-apache-sling-testing-osgi-mock]
stefanseifert commented on PR #31: URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/31#issuecomment-1757216063 the goal `javadoc:javadoc` fails on this PR due to malformed javadocs in some places - please check and fix (we should include this in our jenkins checks) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Assigned] (SLING-12038) [osgi-mock] add support for reified OSGi config annotations as test parameters
[ https://issues.apache.org/jira/browse/SLING-12038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Seifert reassigned SLING-12038: -- Assignee: Stefan Seifert thanks for the contribution! i will have a look at the PRs as well > [osgi-mock] add support for reified OSGi config annotations as test parameters > -- > > Key: SLING-12038 > URL: https://issues.apache.org/jira/browse/SLING-12038 > Project: Sling > Issue Type: Improvement > Components: Testing >Affects Versions: Testing OSGi Mock 3.3.10 >Reporter: Mark Adamcin >Assignee: Stefan Seifert >Priority: Major > Labels: has-pr > > This PR adds a JUnit 5 extension and JUnit 4 rule for unit testing OSGi > components which leverage R7 spec configuration annotations and [Component > Property > Types|https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-component.property.types]. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Assigned] (SLING-11723) Expose more authentication information from ResourceResolver
[ https://issues.apache.org/jira/browse/SLING-11723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Konrad Windszus reassigned SLING-11723: --- Assignee: Konrad Windszus > Expose more authentication information from ResourceResolver > > > Key: SLING-11723 > URL: https://issues.apache.org/jira/browse/SLING-11723 > Project: Sling > Issue Type: Improvement > Components: API >Reporter: Konrad Windszus >Assignee: Konrad Windszus >Priority: Major > > Currently ResourceResolver only exposes the {{getUserID()}} for debugging > authorization related issues. With the addition of SLING-6963 it would be > helpful to additionally expose: > - if a resource resolver is a service resource resolver (applies to all > providers) > - if it is based on principal names or regular authorizable ids (JCR provider > specific, although the configuration format is agnostic) > This information is crucial to figure out why a particular resource cannot be > resolved (due to missing permissions). -- This message was sent by Atlassian Jira (v8.20.10#820010)