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 07:27:51 UTC

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

darshanmahor24 opened a new pull request #54:
URL: https://github.com/apache/sling-slingfeature-maven-plugin/pull/54


   


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



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

Posted by GitBox <gi...@apache.org>.
cziegeler commented on a change in pull request #54:
URL: https://github.com/apache/sling-slingfeature-maven-plugin/pull/54#discussion_r429812492



##########
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:
       ok, yes, I think it makes sense to allow adding additional key/value pairs 




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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
cziegeler commented on a change in pull request #54:
URL: https://github.com/apache/sling-slingfeature-maven-plugin/pull/54#discussion_r429792850



##########
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:
       Why is this if needed? Without it, you could add properties to the manifest - and not just replace




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



[GitHub] [sling-slingfeature-maven-plugin] cziegeler merged pull request #54: SLING-9469| add configuration to replace manifest properties values

Posted by GitBox <gi...@apache.org>.
cziegeler merged pull request #54:
URL: https://github.com/apache/sling-slingfeature-maven-plugin/pull/54


   


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