From dev-return-92518-archive-asf-public=cust-asf.ponee.io@sling.apache.org Mon Oct 15 15:03:17 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 4406A180674 for ; Mon, 15 Oct 2018 15:03:17 +0200 (CEST) Received: (qmail 29094 invoked by uid 500); 15 Oct 2018 13:03:16 -0000 Mailing-List: contact dev-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list dev@sling.apache.org Received: (qmail 29083 invoked by uid 99); 15 Oct 2018 13:03:16 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Oct 2018 13:03:16 +0000 From: GitBox To: dev@sling.apache.org Subject: [GitHub] simonetripodi commented on issue #7: SLING-8003 - Interpolate Maven variables using the Maven Filtering APIs rather that iterate string replacing operations Message-ID: <153960859560.13132.3428623811944903387.gitbox@gitbox.apache.org> Date: Mon, 15 Oct 2018 13:03:15 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit simonetripodi commented on issue #7: SLING-8003 - Interpolate Maven variables using the Maven Filtering APIs rather that iterate string replacing operations URL: https://github.com/apache/sling-slingfeature-maven-plugin/pull/7#issuecomment-429844637 Hi again @bosschaert as requested, I included an Integration Test that aggregates features and produces a single JSON output; given one feature in the form: ``` { "id": "${project.groupId}:${project.artifactId}:slingfeature:slingtest:${project.version}", "title": "${project.name}", "description": "${project.description}", "vendor": "${project.organization.name}", "variables": { "interpolated_variable": "${interpolated_variable}" }, "framework-properties": { "sling.framework.install.incremental": "${sling.framework.install.incremental}", "sling.framework.install.startlevel": "${sling.framework.install.startlevel}", "sling.ignoreSystemProperties": "${sling.ignoreSystemProperties}" }, "bundles":[ { "id":"org.osgi:org.osgi.framework:${osgi.framework.version}", "start-level":"20" } ] } ``` where POM descriptor is configured as ``` 4.0.0 org.apache.sling slingfeature-maven-plugin-test jar 1.0.0-SNAPSHOT Apache Sling Features Maven plugin test This is just an Apache Sling Features Maven plugin test to verify variables interpolation The Apache Software Foundation https://www.apache.org/ Apache License, Version 2.0 https://www.apache.org/licenses/LICENSE-2.0.txt repo true 1.9.0 true 1 true ``` the resulting output is ``` { "id":"org.apache.sling:slingfeature-maven-plugin-test:slingfeature:slingtest:1.0.0-SNAPSHOT", "title":"Apache Sling Features Maven plugin test", "description":"This is just an Apache Sling Features Maven plugin test to verify variables interpolation", "vendor":"The Apache Software Foundation", "variables":{ "interpolated_variable":"true" }, "bundles":[ { "id":"org.osgi:org.osgi.framework:1.9.0", "start-level":"20" } ], "framework-properties":{ "sling.framework.install.incremental":"true", "sling.framework.install.startlevel":"1", "sling.ignoreSystemProperties":"true" } } ``` once you run `mvn clean install` you can find the resulting JSON Feature under `target/it/variables-interpolator/target/slingtest.json` PS you'll may notice a wrong interpolation for the `licenses/license` item, but it doesn't break the backward compatibility - and I am investigating about it with the Maven team. I hope you'll like that contribution! :) ---------------------------------------------------------------- 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: users@infra.apache.org With regards, Apache Git Services