Re: Release Sling Feature Model related components soon

2019-07-26 Thread Andreas Schaefer
Hi Carsten

I updated the Ticket SLING-8541 and my branch of the Slingfeature Maven Plugin 
(merge-cpconverter-plugin) has a solution for it.
Let me know if that works for you.
I tested it with Sling 11 and Peregrine CMS and it works for me (Converting 
both PMs and CPs, building it and launching Sling).

Cheers - Andy

> On Jul 26, 2019, at 9:34 AM, Carsten Ziegeler  wrote:
> 
> 
> +1 for a release.
> 
> The analyser, modelconverter, launcher have open issues. Not sure how 
> important they are.
> 
> Both extensions (apiregions and content) have no issues at all, so I don't 
> think we need a release. Unless the issues are not in jira of course.
> 
> The slingstart plugin has no issues for the upcoming release either. But I 
> assume it depends on some of the other modules?
> 
> The slingfeature plugin has one open issue, SLING-8541, which I would like to 
> get resolved before a release. As soon as the proposed solution is agreed on, 
> I can implement it.
> 
> Regards
> 
> Carsten
> 
> 
> David Bosschaert wrote
>> Hi all,
>> I would like to release the following feature model related components some
>> soon, possibly next week.
>> org.apache.sling.feature
>> org.apache.sling.feature.io
>> org.apache.sling.feature.analyser
>> org.apache.sling.feature.modelconverter
>> org.apache.sling.feature.launcher
>> org.apache.sling.feature.extension.apiregions
>> org.apache.sling.feature.extension.content
>> slingfeature-maven-plugin
>> slingstart-maven-plugin
>> Does this work for everyone? Or are there any additional changes that I
>> should wait for?
>> Best regards,
>> David
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziege...@apache.org



[jira] [Commented] (SLING-8541) slingfeature-maven-plugin should allow for generated feature model files

2019-07-26 Thread Andreas Schaefer (JIRA)


[ 
https://issues.apache.org/jira/browse/SLING-8541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16894051#comment-16894051
 ] 

Andreas Schaefer commented on SLING-8541:
-

Not sure I want another folder to deal with.

I uploaded a solution in my branch of 
[https://github.com/apache/sling-slingfeature-maven-plugin/tree/merge-cpconverter-plugin.]
 This moved the code into the ProjectHelper which will do the checks. Then I 
created an abstract base mojo that all mojos here implement and in there 
provide a method to check the project if a re-parsing is needed. It also checks 
if the execution order is correct. If a FM generation Mojo is called after a 
Handling Mojo (aggregate, attach etc) is executed then it throws an exception.

I tried to put the Environment instance onto the Maven Project but that fails 
because of class loading issues between the DLP and the Mojo execute() method.

Let me know if that works for you.

> slingfeature-maven-plugin should allow for generated feature model files
> 
>
> Key: SLING-8541
> URL: https://issues.apache.org/jira/browse/SLING-8541
> Project: Sling
>  Issue Type: New Feature
>  Components: Feature Model
>Affects Versions: slingfeature-maven-plugin 1.0.4
>Reporter: Andreas Schaefer
>Priority: Major
> Fix For: slingfeature-maven-plugin 1.0.6
>
>
> The Sling Feature Maven Plugin is checking that the feature model folder is 
> containing feature model files when the plugin is started.
> This fails when the FM are generated prior to the execution of the Sling 
> Feature Maven Plugin. This check should be either made optional or moved 
> prior to the actual execution of the Plugin's goal.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


Re: Release Sling Feature Model related components soon

2019-07-26 Thread Carsten Ziegeler



+1 for a release.

The analyser, modelconverter, launcher have open issues. Not sure how 
important they are.


Both extensions (apiregions and content) have no issues at all, so I 
don't think we need a release. Unless the issues are not in jira of course.


The slingstart plugin has no issues for the upcoming release either. But 
I assume it depends on some of the other modules?


The slingfeature plugin has one open issue, SLING-8541, which I would 
like to get resolved before a release. As soon as the proposed solution 
is agreed on, I can implement it.


Regards

Carsten


David Bosschaert wrote

Hi all,

I would like to release the following feature model related components some
soon, possibly next week.

org.apache.sling.feature
org.apache.sling.feature.io
org.apache.sling.feature.analyser
org.apache.sling.feature.modelconverter
org.apache.sling.feature.launcher
org.apache.sling.feature.extension.apiregions
org.apache.sling.feature.extension.content
slingfeature-maven-plugin
slingstart-maven-plugin

Does this work for everyone? Or are there any additional changes that I
should wait for?

Best regards,

David


--
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


[jira] [Updated] (SLING-8167) Using sling.home as a variable leads to runtime errors

2019-07-26 Thread Carsten Ziegeler (JIRA)


 [ 
https://issues.apache.org/jira/browse/SLING-8167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler updated SLING-8167:

Fix Version/s: (was: slingfeature-maven-plugin 1.0.6)

> Using sling.home as a variable leads to runtime errors
> --
>
> Key: SLING-8167
> URL: https://issues.apache.org/jira/browse/SLING-8167
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model
>Affects Versions: slingfeature-maven-plugin 0.8.0
>Reporter: Robert Munteanu
>Priority: Major
>
> I tried using ${sling.home} as a variable but replacement did not work and 
> ended up failing at runtime when the property was used to try and create a 
> directory, e.g. - failed creating directory "/${sling.home}/foo".
> I was able to work around by declaring a ${sling.home}: null variable but I 
> wonder whether we can have better handling of such scenarios.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


Release Sling Feature Model related components soon

2019-07-26 Thread David Bosschaert
Hi all,

I would like to release the following feature model related components some
soon, possibly next week.

org.apache.sling.feature
org.apache.sling.feature.io
org.apache.sling.feature.analyser
org.apache.sling.feature.modelconverter
org.apache.sling.feature.launcher
org.apache.sling.feature.extension.apiregions
org.apache.sling.feature.extension.content
slingfeature-maven-plugin
slingstart-maven-plugin

Does this work for everyone? Or are there any additional changes that I
should wait for?

Best regards,

David


[jira] [Resolved] (SLING-8600) should fail if the classifier isn't found

2019-07-26 Thread David Bosschaert (JIRA)


 [ 
https://issues.apache.org/jira/browse/SLING-8600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Bosschaert resolved SLING-8600.
-
Resolution: Fixed

Fixed with 
https://gitbox.apache.org/repos/asf?p=sling-slingfeature-maven-plugin.git;a=commitdiff;h=fe1875d9ec7ec14b3a5ab57c6f674830a214a02e

>  should fail if the classifier isn't found
> -
>
> Key: SLING-8600
> URL: https://issues.apache.org/jira/browse/SLING-8600
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model, Maven Plugins and Archetypes
>Affects Versions: slingfeature-maven-plugin 1.0.4
>Reporter: David Bosschaert
>Assignee: David Bosschaert
>Priority: Major
> Fix For: slingfeature-maven-plugin 1.0.6
>
>
> {{}} can be used to include aggregates generated earlier 
> in the current maven project.
> If a classifier is specified here that doesn't exist, the plugin silently 
> ignores this. 
> It should fail instead and point out the misconfiguration at the user.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Resolved] (SLING-8601) Analyser for package exports/imports reports about regions even if regions are not used

2019-07-26 Thread David Bosschaert (JIRA)


 [ 
https://issues.apache.org/jira/browse/SLING-8601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Bosschaert resolved SLING-8601.
-
Resolution: Fixed

Fixed in 
https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-feature-analyser.git;a=commitdiff;h=c3107047e603ac7b799b56606340784ae7171029

> Analyser for package exports/imports reports about regions even if regions 
> are not used
> ---
>
> Key: SLING-8601
> URL: https://issues.apache.org/jira/browse/SLING-8601
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model Analyser
>Affects Versions: Feature Model Analyser 1.0.4
>Reporter: Carsten Ziegeler
>Assignee: David Bosschaert
>Priority: Major
> Fix For: Feature Model Analyser 1.0.6
>
>
> I have a feature project which is not using regions. A bundle is importing a 
> package (logging) in a version which is higher as the exporter version (from 
> another bundle) I correctly get this message:
> [ERROR] Bundle org.apache.aries.cdi.extender:1.0.2 is importing package(s) 
> Package org.osgi.service.log;version=[1.4,1.5) in start level 10 but no 
> visible bundle is exporting these for that start level in the required 
> version range.
> Followed by:
> org.osgi.service.log is exported in regions [] but it is imported in regions 
> []
> The second message should not be outputted as the project is not using 
> regions at all



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Created] (SLING-8601) Analyser for package exports/imports reports about regions even if regions are not used

2019-07-26 Thread Carsten Ziegeler (JIRA)
Carsten Ziegeler created SLING-8601:
---

 Summary: Analyser for package exports/imports reports about 
regions even if regions are not used
 Key: SLING-8601
 URL: https://issues.apache.org/jira/browse/SLING-8601
 Project: Sling
  Issue Type: Bug
  Components: Feature Model Analyser
Affects Versions: Feature Model Analyser 1.0.4
Reporter: Carsten Ziegeler
Assignee: David Bosschaert
 Fix For: Feature Model Analyser 1.0.6


I have a feature project which is not using regions. A bundle is importing a 
package (logging) in a version which is higher as the exporter version (from 
another bundle) I correctly get this message:
[ERROR] Bundle org.apache.aries.cdi.extender:1.0.2 is importing package(s) 
Package org.osgi.service.log;version=[1.4,1.5) in start level 10 but no visible 
bundle is exporting these for that start level in the required version range.
Followed by:
org.osgi.service.log is exported in regions [] but it is imported in regions []
The second message should not be outputted as the project is not using regions 
at all



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Resolved] (SLING-8588) sling site: replace css with a css framework

2019-07-26 Thread Jason E Bailey (JIRA)


 [ 
https://issues.apache.org/jira/browse/SLING-8588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason E Bailey resolved SLING-8588.
---
Resolution: Fixed

> sling site: replace css with a css framework
> 
>
> Key: SLING-8588
> URL: https://issues.apache.org/jira/browse/SLING-8588
> Project: Sling
>  Issue Type: Improvement
>Reporter: Jason E Bailey
>Assignee: Jason E Bailey
>Priority: Minor
> Attachments: Screenshot 2019-07-22 at 16.12.39.jpg, 
> image-2019-07-26-08-42-45-981.png
>
>
> Updating the sling site with a css framework. Leading to a re-design.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Closed] (SLING-8588) sling site: replace css with a css framework

2019-07-26 Thread Jason E Bailey (JIRA)


 [ 
https://issues.apache.org/jira/browse/SLING-8588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason E Bailey closed SLING-8588.
-

merged and live

> sling site: replace css with a css framework
> 
>
> Key: SLING-8588
> URL: https://issues.apache.org/jira/browse/SLING-8588
> Project: Sling
>  Issue Type: Improvement
>Reporter: Jason E Bailey
>Assignee: Jason E Bailey
>Priority: Minor
> Attachments: Screenshot 2019-07-22 at 16.12.39.jpg, 
> image-2019-07-26-08-42-45-981.png
>
>
> Updating the sling site with a css framework. Leading to a re-design.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Assigned] (SLING-8588) sling site: replace css with a css framework

2019-07-26 Thread Jason E Bailey (JIRA)


 [ 
https://issues.apache.org/jira/browse/SLING-8588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason E Bailey reassigned SLING-8588:
-

Assignee: Jason E Bailey

> sling site: replace css with a css framework
> 
>
> Key: SLING-8588
> URL: https://issues.apache.org/jira/browse/SLING-8588
> Project: Sling
>  Issue Type: Improvement
>Reporter: Jason E Bailey
>Assignee: Jason E Bailey
>Priority: Minor
> Attachments: Screenshot 2019-07-22 at 16.12.39.jpg, 
> image-2019-07-26-08-42-45-981.png
>
>
> Updating the sling site with a css framework. Leading to a re-design.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (SLING-8588) sling site: replace css with a css framework

2019-07-26 Thread Jason E Bailey (JIRA)


[ 
https://issues.apache.org/jira/browse/SLING-8588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16893801#comment-16893801
 ] 

Jason E Bailey commented on SLING-8588:
---

!image-2019-07-26-08-42-45-981.png!

> sling site: replace css with a css framework
> 
>
> Key: SLING-8588
> URL: https://issues.apache.org/jira/browse/SLING-8588
> Project: Sling
>  Issue Type: Improvement
>Reporter: Jason E Bailey
>Priority: Minor
> Attachments: Screenshot 2019-07-22 at 16.12.39.jpg, 
> image-2019-07-26-08-42-45-981.png
>
>
> Updating the sling site with a css framework. Leading to a re-design.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (SLING-8588) sling site: replace css with a css framework

2019-07-26 Thread Jason E Bailey (JIRA)


 [ 
https://issues.apache.org/jira/browse/SLING-8588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason E Bailey updated SLING-8588:
--
Attachment: image-2019-07-26-08-42-45-981.png

> sling site: replace css with a css framework
> 
>
> Key: SLING-8588
> URL: https://issues.apache.org/jira/browse/SLING-8588
> Project: Sling
>  Issue Type: Improvement
>Reporter: Jason E Bailey
>Priority: Minor
> Attachments: Screenshot 2019-07-22 at 16.12.39.jpg, 
> image-2019-07-26-08-42-45-981.png
>
>
> Updating the sling site with a css framework. Leading to a re-design.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Issue Comment Deleted] (SLING-7768) Add String Interpolation support to /etc/map

2019-07-26 Thread Ruben Reusser (JIRA)


 [ 
https://issues.apache.org/jira/browse/SLING-7768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ruben Reusser updated SLING-7768:
-
Comment: was deleted

(was: so when this was done there was a bigger discussion about making this 
more generic and hence this never made it into sling itself as it's only 
supporting etc/map. 

A more generic solution to this problem could be achieved with sling pipes (a 
config structure somewhere in the repository that is copied over to the final 
location with sling pipes and while doing so it should be able to pickup and 
inject the environment variables))

> Add String Interpolation support to /etc/map
> 
>
> Key: SLING-7768
> URL: https://issues.apache.org/jira/browse/SLING-7768
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
> Environment: Sling 11-SNAPSHOT, JDK 1.8
>Reporter: Andreas Schaefer
>Priority: Major
> Attachments: Screenshot 2018-07-06 11.41.58.png, Screenshot 
> 2018-07-06 11.42.41.png, Screenshot 2018-07-06 11.43.34.png
>
>
> Having worked on migrations of a Sling derivate Ruben & I ran into issues 
> where the /etc/map would map to production instead of testing environment.
>  Many big customer have extensive /etc/maps and also many different 
> environments like dev, qa, staging, prod etc.
>  It would be great to have a tool where for example items like the host name 
> or external links in /etc/map could be configured outside so that just one 
> entry has to adjusted rather than creating a full copy of the /etc/map tree.
>   
>  Example:
>   
>  /etc/map/http/phv.fq.host.name.8080
>   
>  Placeholder provides:
>  DEV: phv.fq.host.name=localhost
>  QA: phv.fq.host.name=qa.author.acme.com
>  STAGING: 
> phv.fq.host.name=[staging.author.acme.com|http://staging.author.acme.com/]
>  PROD: phv.fq.host.name=[acme.com|http://acme.com/]
>   
>  At runtime these are the resolved values:
>  DEV: http/localhost.8080
>  QA: http/qa.author.acme.com.8080
>  STAGING: http/[staging.author.acme.com|http://staging.author.acme.com/].8080
>  PROD: http/[acme.com|http://acme.com/].8080
>   
>  Not only does that make it easier and faster to create new test environments 
> but it also cuts down on the chance of copy-n-paste errors.
>   
>  I have a working POC with an PlaceholderProvider OSGi service and an 
> enhanced MapEntries that resolved any placeholders if found.
>   
>  Attached are 3 screenshots:
>  1. OSGi Placeholder Provider Configuration
>  2. /etc/map (Composum)
>  3. Result of [http://andreass.local:8080/] call



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (SLING-7768) Add String Interpolation support to /etc/map

2019-07-26 Thread Ruben Reusser (JIRA)


[ 
https://issues.apache.org/jira/browse/SLING-7768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16893769#comment-16893769
 ] 

Ruben Reusser commented on SLING-7768:
--

so when this was done there was a bigger discussion about making this more 
generic and hence this never made it into sling itself as it's only supporting 
etc/map. 

A more generic solution to this problem could be achieved with sling pipes (a 
config structure somewhere in the repository that is copied over to the final 
location with sling pipes and while doing so it should be able to pickup and 
inject the environment variables)

> Add String Interpolation support to /etc/map
> 
>
> Key: SLING-7768
> URL: https://issues.apache.org/jira/browse/SLING-7768
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
> Environment: Sling 11-SNAPSHOT, JDK 1.8
>Reporter: Andreas Schaefer
>Priority: Major
> Attachments: Screenshot 2018-07-06 11.41.58.png, Screenshot 
> 2018-07-06 11.42.41.png, Screenshot 2018-07-06 11.43.34.png
>
>
> Having worked on migrations of a Sling derivate Ruben & I ran into issues 
> where the /etc/map would map to production instead of testing environment.
>  Many big customer have extensive /etc/maps and also many different 
> environments like dev, qa, staging, prod etc.
>  It would be great to have a tool where for example items like the host name 
> or external links in /etc/map could be configured outside so that just one 
> entry has to adjusted rather than creating a full copy of the /etc/map tree.
>   
>  Example:
>   
>  /etc/map/http/phv.fq.host.name.8080
>   
>  Placeholder provides:
>  DEV: phv.fq.host.name=localhost
>  QA: phv.fq.host.name=qa.author.acme.com
>  STAGING: 
> phv.fq.host.name=[staging.author.acme.com|http://staging.author.acme.com/]
>  PROD: phv.fq.host.name=[acme.com|http://acme.com/]
>   
>  At runtime these are the resolved values:
>  DEV: http/localhost.8080
>  QA: http/qa.author.acme.com.8080
>  STAGING: http/[staging.author.acme.com|http://staging.author.acme.com/].8080
>  PROD: http/[acme.com|http://acme.com/].8080
>   
>  Not only does that make it easier and faster to create new test environments 
> but it also cuts down on the chance of copy-n-paste errors.
>   
>  I have a working POC with an PlaceholderProvider OSGi service and an 
> enhanced MapEntries that resolved any placeholders if found.
>   
>  Attached are 3 screenshots:
>  1. OSGi Placeholder Provider Configuration
>  2. /etc/map (Composum)
>  3. Result of [http://andreass.local:8080/] call



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (SLING-8541) slingfeature-maven-plugin should allow for generated feature model files

2019-07-26 Thread Carsten Ziegeler (JIRA)


[ 
https://issues.apache.org/jira/browse/SLING-8541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16893755#comment-16893755
 ] 

Carsten Ziegeler commented on SLING-8541:
-

[~schaefa] Would the suggestion work for you?

> slingfeature-maven-plugin should allow for generated feature model files
> 
>
> Key: SLING-8541
> URL: https://issues.apache.org/jira/browse/SLING-8541
> Project: Sling
>  Issue Type: New Feature
>  Components: Feature Model
>Affects Versions: slingfeature-maven-plugin 1.0.4
>Reporter: Andreas Schaefer
>Priority: Major
> Fix For: slingfeature-maven-plugin 1.0.6
>
>
> The Sling Feature Maven Plugin is checking that the feature model folder is 
> containing feature model files when the plugin is started.
> This fails when the FM are generated prior to the execution of the Sling 
> Feature Maven Plugin. This check should be either made optional or moved 
> prior to the actual execution of the Plugin's goal.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Created] (SLING-8600) should fail if the classifier isn't found

2019-07-26 Thread David Bosschaert (JIRA)
David Bosschaert created SLING-8600:
---

 Summary:  should fail if the classifier isn't 
found
 Key: SLING-8600
 URL: https://issues.apache.org/jira/browse/SLING-8600
 Project: Sling
  Issue Type: Bug
  Components: Feature Model, Maven Plugins and Archetypes
Affects Versions: slingfeature-maven-plugin 1.0.4
Reporter: David Bosschaert
Assignee: David Bosschaert
 Fix For: slingfeature-maven-plugin 1.0.6


{{}} can be used to include aggregates generated earlier in 
the current maven project.
If a classifier is specified here that doesn't exist, the plugin silently 
ignores this. 
It should fail instead and point out the misconfiguration at the user.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (SLING-7768) Add String Interpolation support to /etc/map

2019-07-26 Thread Carsten Ziegeler (JIRA)


[ 
https://issues.apache.org/jira/browse/SLING-7768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16893430#comment-16893430
 ] 

Carsten Ziegeler commented on SLING-7768:
-

I guess this makes sense, if we can get a PR for this we can discuss the impl 
details.
For the proposed provider, I'm reluctant to support a file as a configuration 
source for this

> Add String Interpolation support to /etc/map
> 
>
> Key: SLING-7768
> URL: https://issues.apache.org/jira/browse/SLING-7768
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
> Environment: Sling 11-SNAPSHOT, JDK 1.8
>Reporter: Andreas Schaefer
>Priority: Major
> Attachments: Screenshot 2018-07-06 11.41.58.png, Screenshot 
> 2018-07-06 11.42.41.png, Screenshot 2018-07-06 11.43.34.png
>
>
> Having worked on migrations of a Sling derivate Ruben & I ran into issues 
> where the /etc/map would map to production instead of testing environment.
>  Many big customer have extensive /etc/maps and also many different 
> environments like dev, qa, staging, prod etc.
>  It would be great to have a tool where for example items like the host name 
> or external links in /etc/map could be configured outside so that just one 
> entry has to adjusted rather than creating a full copy of the /etc/map tree.
>   
>  Example:
>   
>  /etc/map/http/phv.fq.host.name.8080
>   
>  Placeholder provides:
>  DEV: phv.fq.host.name=localhost
>  QA: phv.fq.host.name=qa.author.acme.com
>  STAGING: 
> phv.fq.host.name=[staging.author.acme.com|http://staging.author.acme.com/]
>  PROD: phv.fq.host.name=[acme.com|http://acme.com/]
>   
>  At runtime these are the resolved values:
>  DEV: http/localhost.8080
>  QA: http/qa.author.acme.com.8080
>  STAGING: http/[staging.author.acme.com|http://staging.author.acme.com/].8080
>  PROD: http/[acme.com|http://acme.com/].8080
>   
>  Not only does that make it easier and faster to create new test environments 
> but it also cuts down on the chance of copy-n-paste errors.
>   
>  I have a working POC with an PlaceholderProvider OSGi service and an 
> enhanced MapEntries that resolved any placeholders if found.
>   
>  Attached are 3 screenshots:
>  1. OSGi Placeholder Provider Configuration
>  2. /etc/map (Composum)
>  3. Result of [http://andreass.local:8080/] call



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (SLING-7768) Add String Interpolation support to /etc/map

2019-07-26 Thread Roy Teeuwen (JIRA)


[ 
https://issues.apache.org/jira/browse/SLING-7768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16893412#comment-16893412
 ] 

Roy Teeuwen commented on SLING-7768:


Any update on ever getting this in? Would simplify the setup a lot by not 
having to copy over the mappings 5 times per vhost (local, dev, test, accept, 
prod)

> Add String Interpolation support to /etc/map
> 
>
> Key: SLING-7768
> URL: https://issues.apache.org/jira/browse/SLING-7768
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
> Environment: Sling 11-SNAPSHOT, JDK 1.8
>Reporter: Andreas Schaefer
>Priority: Major
> Attachments: Screenshot 2018-07-06 11.41.58.png, Screenshot 
> 2018-07-06 11.42.41.png, Screenshot 2018-07-06 11.43.34.png
>
>
> Having worked on migrations of a Sling derivate Ruben & I ran into issues 
> where the /etc/map would map to production instead of testing environment.
>  Many big customer have extensive /etc/maps and also many different 
> environments like dev, qa, staging, prod etc.
>  It would be great to have a tool where for example items like the host name 
> or external links in /etc/map could be configured outside so that just one 
> entry has to adjusted rather than creating a full copy of the /etc/map tree.
>   
>  Example:
>   
>  /etc/map/http/phv.fq.host.name.8080
>   
>  Placeholder provides:
>  DEV: phv.fq.host.name=localhost
>  QA: phv.fq.host.name=qa.author.acme.com
>  STAGING: 
> phv.fq.host.name=[staging.author.acme.com|http://staging.author.acme.com/]
>  PROD: phv.fq.host.name=[acme.com|http://acme.com/]
>   
>  At runtime these are the resolved values:
>  DEV: http/localhost.8080
>  QA: http/qa.author.acme.com.8080
>  STAGING: http/[staging.author.acme.com|http://staging.author.acme.com/].8080
>  PROD: http/[acme.com|http://acme.com/].8080
>   
>  Not only does that make it easier and faster to create new test environments 
> but it also cuts down on the chance of copy-n-paste errors.
>   
>  I have a working POC with an PlaceholderProvider OSGi service and an 
> enhanced MapEntries that resolved any placeholders if found.
>   
>  Attached are 3 screenshots:
>  1. OSGi Placeholder Provider Configuration
>  2. /etc/map (Composum)
>  3. Result of [http://andreass.local:8080/] call



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)