adobe / aem-project-archetype

Maven template to create best-practice websites on AEM.
https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/archetype/overview.html
Apache License 2.0
544 stars 419 forks source link

bnd-maven-plugin -plugin can't work with multiple plugins #975

Open arunpatidar02 opened 2 years ago

arunpatidar02 commented 2 years ago

When context aware configurations are created as java interface, the bnd-maven-plugin is not able to scan the class, hence no context aware configurations are detected. https://github.com/adobe/aem-project-archetype/blob/d02bbda3853a5168c6b95406bb914a544246dbf8/src/main/archetype/pom.xml#L237

Expected Behaviour

java interface context aware configurations must be detected

Actual Behaviour

java interface context aware configurations are not detected hence classes are not available in the bundle.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

  1. Create a project using archtype
  2. Create java interface for context aware configurations e.g. https://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration.html#describe-configurations-via-annotation-classes-1
  3. deploy the project and check configuration, there is a Context-Aware Configuration web console at https://:/system/console/slingcaconfig, which allows querying context-aware configurations in the repository and viewing their properties. e.g. https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/developing/configurations.html?lang=en#context-aware-web-console

Platform and Version

AEMaaCS

Fix

Add multiple plugins as comma separated values i.e. https://bnd.bndtools.org/instructions/plugin.html example -plugin org.apache.sling.caconfig.bndplugin.ConfigurationClassScannerPlugin,org.apache.sling.bnd.models.ModelsScannerPlugin

Sample Code that illustrates the problem

N/A

Logs taken while reproducing problem

N/A

kwin commented 2 years ago

This is a duplicate of #971