Skip to content

Conversation

jGauravGupta
Copy link
Contributor

Summary:

This PR updates the configuration logic to align with the version-specific property naming conventions introduced in the Payara Micro Maven Plugin.

Depending on the plugin version, system properties used to enable Dev Mode features will now automatically match the expected format.


Details:

🔹 For plugin version ≥ 2.5

Payara Micro Maven Plugin 2.5 introduced a new convention where system properties are prefixed with payara..

Example command:

mvn -Dpayara.hot.deploy=true \
    -Dpayara.deploy.war=true \
    -Dpayara.exploded=true \
    -Dpayara.trim.log=true \
    -Dpayara.auto.deploy=true \
    -Dpayara.keep.state=true \
    -Dpayara.live.reload=true \
    resources:resources compiler:compile war:exploded payara-micro:stop payara-micro:start

Code changes ensure that when the detected plugin version is 2.5 or later, the configuration uses these new prefixed property names (e.g. payara.hot.deploy, payara.deploy.war, etc.).

Note: Although plugin 2.5 is also backward compatible with the older (unprefixed) property names, using the payara. prefix is now preferred for consistency and forward compatibility.


🔹 For plugin version ≥ 2.1 and < 2.5

Earlier versions (starting from 2.1) introduced Dev Mode but used unprefixed property names.

Example command:

mvn -DhotDeploy=true \
    -DdeployWar=true \
    -Dexploded=true \
    -DtrimLog=true \
    -DautoDeploy=true \
    -DkeepState=true \
    -DliveReload=true \
    resources:resources compiler:compile war:exploded payara-micro:stop payara-micro:start

The logic now sets these unprefixed keys automatically for compatibility with 2.1–2.4.


🔹 For plugin version < 2.1

Dev Mode was not supported in versions earlier than 2.1, so Dev Mode-related properties are skipped.

Legacy properties like payaraVersion and hotDeploy are still set if provided to maintain basic compatibility, but Dev Mode-specific flags are ignored.


Motivation:

Ensures that NetBeans-generated Payara Micro Dev Mode configurations work seamlessly across all supported plugin versions, eliminating property mismatches and startup failures due to version differences.


Testing:

  • Verified with payara-micro-maven-plugin versions 2.0, 2.1, and 2.5
  • Confirmed that Dev Mode starts correctly with corresponding property names.
  • Tested backward compatibility where plugin 2.5 correctly accepts both prefixed and legacy properties.

@jGauravGupta jGauravGupta added the Java EE/Jakarta EE [ci] enable enterprise job label Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java EE/Jakarta EE [ci] enable enterprise job

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant