[MAVEN_GLASSFISH_PLUGIN-5] Plugin should use asadmin.bat on Windows platforms by default Created: 27/Jun/11  Updated: 09/Feb/16  Resolved: 13/Sep/11

Status: Resolved
Project: maven-glassfish-plugin
Component/s: None
Affects Version/s: current
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: pdudits Assignee: Byron Nevins
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File maven-glassfish-plugin_5.patch    


Currently the plugin tries to execute asadmin with no extension. If not found and OS Platworm is windows, then it tries asadmin.bat. As a result, the plugin does not work with default installation on Windows without deleting asadmin first.

Attached patch reverses the behaviour - asadmin.bat is used by default on Windows platforms, and than falls back to asadmin.

Comment by Sreekanth [ 13/Sep/11 ]

This is not an improvement.Clearly it is a bug that needs to be fixed for windows users.
Since glassfish installation comes with both asadmin and asadmin.bat, execution will never enter into if condition below and always asadmin file meant for linux will be used.

File asadmin = new File(binDir, "asadmin");
if (!asadmin.exists() && System.getProperty("os.name").contains("indows"))

{ asadmin = new File(binDir, "asadmin.bat"); }

Again in glassfish v2,if applicable, may work since it only comes with one variant of asadmin file .Need to check it if needed.

Comment by arungupta [ 13/Sep/11 ]

Adding to the CC list.

Byron is working on a fix.

Comment by Byron Nevins [ 13/Sep/11 ]

Fixed in svn revision#84

Fix is as in patch. Now it checks if we are running on Windows. If so – it uses asadmin.bat in preference to asadmin

Comment by liwei13705 [ 10/Sep/12 ]

Can you please install this patched version to Java.net Maven2 Repository? The current one there is outdated. http://download.java.net/maven/2/org/glassfish/maven/plugin/maven-glassfish-plugin/

Comment by bkravandi [ 12/Feb/13 ]

Sorry I'm new to java, how can I apply this patch ?

Comment by kingoleg [ 09/Feb/16 ]


Would you like to release a new version of plugin with this and others fixes? Or it's dead?


Generated at Mon Apr 24 09:20:26 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.