Hi @Sathya Jayavel
Products are not environment configuration, they are organization level
Check out the sample edge.json, you will find configurations for apiProducts under orgConfig. With this, you configure products at the org level and can control using the build
If you are trying to update that existing config, then you might be able to do it using maven replacer plugin
For example
In your edge.json, you can have something like this
"orgConfig": {
"apiProducts": [
{
"name": "EchoProduct",
"apiResources": [
"/",
"/**"
],
"approvalType": "auto",
"attributes": [
{
"name": "description",
"value": "Echo Product"
}
],
"description": "Echo Product",
"displayName": "Echo Product",
"environments": [
"edge_env"
],
"proxies": [
"HelloWorld"
],
"quota": "10000",
"quotaInterval": "1",
"quotaTimeUnit": "month",
"scopes": []
}
],
"developers": [],
"developerApps": {}
}
In your pom, you can include this plugin
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.2</version>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<basedir>${target.root.dir}</basedir>
<includes>
<include>edge.json</include> <!-- path to your edge.json -->
</includes>
<replacements>
<replacement>
<token>edge_env</token>
<value>${envs}</value>
</replacement>
</replacements>
</configuration>
</plugin>
And in your maven command, pass -Denvs=dev,test when you are deploying to non prod org and -Denvs=prod when you are deploying to prod org
Hope that clarifies