Issue Details (XML | Word | Printable)

Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Byron Nevins
Reporter: pdudits
Votes: 2
Watchers: 2

If you were logged in you would be able to see more operations.

Plugin should use asadmin.bat on Windows platforms by default

Created: 27/Jun/11 08:04 AM   Updated: 12/Feb/13 09:06 PM   Resolved: 13/Sep/11 09:18 PM
Component/s: None
Affects Version/s: current
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Text File maven-glassfish-plugin_5.patch (1 kB) 27/Jun/11 08:04 AM - pdudits

Participants: arungupta, bkravandi, Byron Nevins, liwei13705, pdudits and Sreekanth

 Description  « Hide

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.

Sreekanth added a comment - 13/Sep/11 06:58 PM

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("").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.

arungupta added a comment - 13/Sep/11 07:03 PM

Adding to the CC list.

Byron is working on a fix.

Byron Nevins added a comment - 13/Sep/11 09:18 PM

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

liwei13705 added a comment - 10/Sep/12 09:00 PM

Can you please install this patched version to Maven2 Repository? The current one there is outdated.

bkravandi added a comment - 12/Feb/13 09:06 PM

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