When trying to build your application which uses Property Placeholder values for certain attributes such as the following example with a HTTP Request element:
<http:request method="GET" doc:name="HTTP-Request-1" doc:id="ba4a46d9-917b-471a-bb83-3ef27afb5a96" config-ref="HTTP_Request_configuration" path="/test">
<reconnect frequency="${https.requestReconnect.frequency}" count="${https.requestReconnect.attempts}" />
</http:request>
You are seeing build errors like the following example:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.371 s
[INFO] Finished at: 2022-04-07T10:07:54+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.mule.tools.maven:mule-maven-plugin:3.6.0:compile (default-compile) on project placeholder-test: Execution default-compile of goal org.mule.tools.maven:mule-maven-plugin:3.6.0:compile failed: Exception resolving param 'count' with value '${https.requestReconnect.attempts}' at 'placeholder-test.xml:19:13' (java.lang.NumberFormatException: For input string: "${https.requestReconnect.attempts}") -> [Help 1]
Mule Maven Plugin release 3.6.0 performs additional validation checks on the XML content of your applications, in this instance the XML is correct and this error is incorrectly flagged. This issue has been reported to our Engineering team and is currently under investigation.
This has been fixed by Mule Maven Plugin 3.7.3
https://docs.mulesoft.com/release-notes/mule-maven-plugin/mule-maven-plugin-3.7.3-release-notes
The plugin no longer fails to validate the XML in the Reconnection Strategy element if the values are set with property placeholders instead of inline number values.
W-11068928
Alternatively, this error can be avoided in one of two ways:
Downgrade to the Mule Maven Plugin 3.5.4 release where this validation is not performed.
Define these values inline in the XML instead of via a property placeholder, as per the updated example below:
<http:request method="GET" doc:name="HTTP-Request-1" doc:id="ba4a46d9-917b-471a-bb83-3ef27afb5a96" config-ref="HTTP_Request_configuration" path="/test">
<reconnect frequency="1000" count="5" />
</http:request>
001120219

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.