simonetripodi edited a comment on issue #16: SLING-8078 - New Analyser task 
which is able to detect Export-Package dependencies between regions
URL: 
https://github.com/apache/sling-slingfeature-maven-plugin/pull/16#issuecomment-436665191
 
 
   Just to give you more background, Given a generic Feature File where 
`api-regions` names are arbitrary:
   
   ```{
     "id":"org.apache.sling:slingfeature-maven-plugin-test:1.0.0-SNAPSHOT",
     "bundles":[
       {
         
"id":"org.apache.aries.versioning:org.apache.aries.versioning.checker:0.3.1",
         "start-level":"20"
       }
     ],
     "api-regions:JSON|false": [
       {
         "name": "my-global",
         "exports": [
           "org.apache.aries.versioning.check"
         ]
       },
       {
         "name": "my-deprecated",
         "exports": [
           "org.objectweb.asm"
         ]
       }
     ]
   }```
   
   the plugin can be now configured in order to handle that two regions:
   
           ```<configuration>
             <scans>
               <scan>
                 <includes>**/*.json</includes>
                 <includeTasks>api-regions-dependencies</includeTasks>
                 <contextConfiguration>
                   <exporting-apis>my-global</exporting-apis>
                   <hiding-apis>my-deprecated</hiding-apis>
                 </contextConfiguration>
               </scan>
             </scans>
           </configuration>
   ```
   
   and produces expected error:
   
   ```[ERROR] Bundle 
'org.apache.aries.versioning:org.apache.aries.versioning.checker:0.3.1' 
(defined in feature 
'org.apache.sling:slingfeature-maven-plugin-test:1.0.0-SNAPSHOT') declares 
'org.apache.aries.versioning.check' in the 'Export-Package' header, enlisted in 
the 'my-global' region, which requires 'org.objectweb.asm' package that is in 
the 'my-deprecated' region```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to