You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2020/05/25 08:42:37 UTC

[GitHub] [sling-slingfeature-maven-plugin] darshanmahor24 commented on a change in pull request #54: SLING-9469| add configuration to replace manifest properties values

darshanmahor24 commented on a change in pull request #54:
URL: https://github.com/apache/sling-slingfeature-maven-plugin/pull/54#discussion_r429810241



##########
File path: src/main/java/org/apache/sling/feature/maven/mojos/ApisJarMojo.java
##########
@@ -1582,6 +1589,14 @@ private File createArchive(final ApisJarContext ctx,
             archiveConfiguration.addManifestEntry("Specification-Vendor", project.getOrganization().getName());
         }
 
+        // replace manifest entries with the one provided in properties configuration
+        Map<String,String> archiveConfigMap =  archiveConfiguration.getManifestEntries();
+        for (final String name: manifestProperties.stringPropertyNames()){
+            if(archiveConfigMap.containsKey(name))

Review comment:
       Actually this is for replacing only those values in generated Manifest file that are provided in _manifestProperties_ configuration, key/value not provided in configuration will be picked form default one. 
   
   I added this only for purpose where user want to replace the original values generated by internal logic that we have , not to add new one but we can extend this to add new key/value pair too. 
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org