Expand my Community achievements bar.

SOLVED

Can we get environment variable from pom.xml into OSGi config?

Avatar

Level 3
Hi, 
 
I am working on setting up an OSGi config using environment variables so they can be accessed on deployed environment on Cloud AEM, without the config values exposed in Github.

 

 

It says that we can set the environment variable under the "Environment Configuration" of Adobe Cloud Manager, and such an environment variable will be available in the pom.xml file per below:

 

<password>${env.CUSTOM_MYCO_REPOSITORY_PASSWORD}</password>

 

 

However, I need to use it in the OSGi config, not in the pom.xml file. Is it possible to grab the environment variable from the pom.xml file into the OSGi config?

 

I looked in the docs below, but was not able to find the answer:

 

 
Thank you,
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi, 

Could you please check. below for using environment variable in osgi

 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/deploy... 



Arun Patidar

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi, 

Could you please check. below for using environment variable in osgi

 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/deploy... 



Arun Patidar

Avatar

Community Advisor

Hello @sean12341 

 

You might already be aware of 2 types of CM variables. 

- Variable visible in CM console

- Secret variables for passwords.

Just adding info here, incase its missed.

 

Details of both are available in link shared by @arunpatidar 


Aanchal Sikka