adobe / adobe/aem-project-archetype

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

Open
#975 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
596
Forks
431
Avg merge
10d 6h
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

Research direction

Start in src/main/archetype/pom.xml around line 237 and inspect the bnd-maven-plugin configuration. Reproduce with a generated project containing a Java interface for a context-aware configuration, then verify that both scanner plugins are configured and the interface is detected in the bundle.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.