jGauravGupta opened a new pull request, #8899:
URL: https://github.com/apache/netbeans/pull/8899

   
   
   ### **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:**
   ```bash
   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:**
   ```bash
   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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to