Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

etc Mapping configurations for different runmodes

Avatar

Avatar
Validate 1
Level 2
manojd55574250
Level 2

Likes

4 likes

Total Posts

25 posts

Correct Reply

4 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
manojd55574250
Level 2

Likes

4 likes

Total Posts

25 posts

Correct Reply

4 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 3
Boost 1
View profile
manojd55574250
Level 2

26-07-2019

Hello All,

I want to maintain /etc/map.publish configurations separately for different publisher run modes(dev, stage, prod). Not sure how to achieve that.

Will the following work ? and also how do I test this on different run modes Please advise.

/etc/map.publish.dev

/etc/map.publish.stage

/etc/map.publish.prod

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 5
Employee
Andrew_Khoury
Employee

Likes

75 likes

Total Posts

93 posts

Correct Reply

33 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Employee
Andrew_Khoury
Employee

Likes

75 likes

Total Posts

93 posts

Correct Reply

33 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
Andrew_Khoury
Employee

26-07-2019

Unfortunately the runmode doesn't get picked up by these automatically.  You have to update the Resource Resolver configuration to point to your custom mapping path.  Per the doc [1]:

You can use /etc/map.publish to hold the configurations for the publish environment. These must then be replicated, and the new location (/etc/map.publish) configured for the Mapping Location of the Apache Sling Resource Resolver of the publish environment.

[1] Official doc reference: Resource Mapping

Instructions:

1. Go to http://{aemhost}/system/console/configMgr/org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl

2. Log in as admin

3. Update the Mapping Location

4. Save

5. That would generate an OSGi configuration file in the Oak repository under /apps/system/config.

6. You can then make copies of that configuration with your required paths for each environment under runmode enabled config folders of your application.  For example:

/apps/myapp/config.devpublish/org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.config

Answers (1)

Answers (1)

Avatar

Avatar
Give Back 50
Employee
Vish_dhaliwal
Employee

Likes

189 likes

Total Posts

356 posts

Correct Reply

123 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
Vish_dhaliwal
Employee

Likes

189 likes

Total Posts

356 posts

Correct Reply

123 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Vish_dhaliwal
Employee

26-07-2019

Hello,

Yes, that seems correct. The syntax for defining the mappings is  /etc/map.<runmode>

You can define the runmode in sling.properties file like   sling.run.modes=publish,dev or set it using JVM  parameter like -Dsling.run.modes=publish,dev. Please review articles [1] and [2].

[1] https://helpx.adobe.com/experience-manager/6-3/sites/deploying/using/configure-runmodes.html

[2] https://helpx.adobe.com/experience-manager/kb/RunModeSetUp.html

Regards,

Vishu