azure-maven-plugins
azure-maven-plugins copied to clipboard
[FEATURE_REQ] Support pre-definition for Spring Apps maven plugin
Plugin name and version
azure-spring-apps-maven-plugin
, 1.17.0
Plugin configuration in your pom.xml
<plugin>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-spring-apps-maven-plugin</artifactId>
<version>1.17.0</version>
<configuration>
<appName>customers-service</appName>
<isPublic>false</isPublic>
<deployment>
<cpu>1</cpu>
<memoryInGB>1</memoryInGB>
<instanceCount>1</instanceCount>
<runtimeVersion>Java 17</runtimeVersion>
</deployment>
</configuration>
</plugin>
Expected behavior
The node configuration
of the maven plugin azure-spring-apps-maven-plugin
.
The configuration of the Maven plugin can define default configuration items or deployment items. When executing xxx:config
, if the user does not want to use the default value, give a new value, such as <appName>customers-service</appName>
, <runtimeVersion>Java 17</runtimeVersion>
, etc. When saving into the POM file, all configured configurations will be merged into the maven plugin configuration node.
Actual behavior
Will skip config the module if there's a pre-definition for the Spring apps maven plugin.
Steps to reproduce the problem
-
Clone code https://github.com/Azure-Samples/spring-petclinic-microservices
-
Navigate to the sample project directory, and add the below plugin for the customer module:
<plugin> <groupId>com.microsoft.azure</groupId> <artifactId>azure-spring-apps-maven-plugin</artifactId> <version>1.17.0</version> <configuration> <appName>customers-service</appName> <isPublic>false</isPublic> <deployment> <cpu>1</cpu> <memoryInGB>1</memoryInGB> <instanceCount>1</instanceCount> <runtimeVersion>Java 17</runtimeVersion> </deployment> </configuration> </plugin>
-
Execute
mvnw com.microsoft.azure:azure-spring-apps-maven-plugin:1.17.0:config
to configure all the sub-modules to ASA, it will skip the module customer.
@moarychan Thanks for your report and sorry for the late response, currently spring apps maven plugin does not support modify existing configuration, but if you want to set cpu/memory during config, you may add -DadvancedOptions, here is the screen shot