Expand my Community achievements bar.

SOLVED

Content Project how to stop it overwriting content?

Avatar

Level 5

I'm starting an AEM project from scratch which is new for me and I'm wondering how to stop all my content being wiped everytime I run mvn -PautoInstallPackage install as the content package is being installed and wiping out everything below mysite/en/.. 

1 Accepted Solution

Avatar

Correct answer by
Employee

Sutty100 wrote...

I'm starting an AEM project from scratch which is new for me and I'm wondering how to stop all my content being wiped everytime I run mvn -PautoInstallPackage install as the content package is being installed and wiping out everything below mysite/en/.. 

 

Hi,

typically you would include "/content" in a separate project and use it to bootstrap your content on a fresh instance. Or you would use it to create sample pages that are basically never changed once deployed. If you do manually change anything, it would be a new page. You could then try and redeploy your content package with the merge option.

Regards,

Opkar

View solution in original post

4 Replies

Avatar

Level 2

Hi,

Could you please find filter.xml file in your content project and share (Structure should be ../META-INF/vault/filter.xml)?

Most probable that you have replace mode on /content/mysite folder. It it is true, try to remove this line.

You can find more details about vault filter here

Thanks,

Illia

Avatar

Level 10

If you are just building OSGi bundles - run mvn clean install., Then manually deploy the bundle (you need to delete the old bundle too). This will not wipe out any other content. 

Avatar

Correct answer by
Employee

Sutty100 wrote...

I'm starting an AEM project from scratch which is new for me and I'm wondering how to stop all my content being wiped everytime I run mvn -PautoInstallPackage install as the content package is being installed and wiping out everything below mysite/en/.. 

 

Hi,

typically you would include "/content" in a separate project and use it to bootstrap your content on a fresh instance. Or you would use it to create sample pages that are basically never changed once deployed. If you do manually change anything, it would be a new page. You could then try and redeploy your content package with the merge option.

Regards,

Opkar

Avatar

Level 5

Thanks, added merge and that solved my problem!