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

How to create a package after deleting a few nodes and taking only references of deletion node instead of entire folder while creating the package on aem

Avatar

Avatar
Level 1
Manasi27
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Manasi27
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
Manasi27
Level 1

20-04-2021

Hi All,

I have deleted few nodes from /etc/map.publish.prod/http. Now I want to create a package with only deleted nodes, so that when it will be installed on production, it will just delete the mentioned existing nodes rather than installing the full /etc/map.publish.prod/http. Is there a way to mention to delete the selected nodes in a package. and when this package is built and installed on another instance(prod) it should delete the mentioned nodes in the created package.

I would appreciate for your help.

Thanks,

Manasi

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 100
Level 7
rush_pawan
Level 7

Likes

120 likes

Total Posts

192 posts

Correct Reply

77 solutions
Top badges earned
Boost 100
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Boost 100
Level 7
rush_pawan
Level 7

Likes

120 likes

Total Posts

192 posts

Correct Reply

77 solutions
Top badges earned
Boost 100
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile
rush_pawan
Level 7

20-04-2021

Hello,

 

Here is my suggestion (to try once)

 

1. first build the package using those nodes for example

/etc/map.publish.prod/http/node1 and /etc/map.publish.prod/http/node2

2. once the package built. now change those node name manually to you local node (which makes existing node as deleted)

let's say/etc/map.publish.prod/http/node11 and/etc/map.publish.prod/http/node21

3. Now, rebuild the same package again without changing anything there. now when it build, it will consider those nodes to be deleted

4. now before installing the current build package, just rename those nodes name again back to previous 

ie. /etc/map.publish.prod/http/node1 and /etc/map.publish.prod/http/node2

5. now after doing that when you reinstall the package, it will install the package via deleting these nodes 

 

note: before doing in prod, try it local. also plz track of deactivating such nodes first before running otherwise your publish node will become stale.

 

hope it works for you.

 

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
MVP
Nikhil-Kumar
MVP

Likes

243 likes

Total Posts

256 posts

Correct Reply

38 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
MVP
Nikhil-Kumar
MVP

Likes

243 likes

Total Posts

256 posts

Correct Reply

38 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile
Nikhil-Kumar
MVP

21-04-2021

@Manasi27 - 
You can manually give the path of the node in the package Manager and try to build that package and the try to deploy wherever you want.

Avatar

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

560 likes

Total Posts

677 posts

Correct Reply

194 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

560 likes

Total Posts

677 posts

Correct Reply

194 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile
asutosh_jena
Level 10

20-04-2021

Hi @Manasi27 

 

If a node is delete from a path, you cannot package it again and even if we try to do so by adding the path in package manager, it will not allow us to build as the path does not exist.

Let's say you have deleted node 1 and node 2 from /etc/map.publish.prod/http i.e. earlier it was /etc/map.publish.prod/http/node1 and /etc/map.publish.prod/http/node2 and now you do not have it.

 

We will not be able to package it and to remove the same node form upper environments either you need to package the parent directory and deploy it or you can delete only these nodes manually on upper environments.

 

If you do not have access to crx/de on upper environment, then packaging the parent node and deploying it on upper environment will be the best option.

 

Thanks!