maven-glassfish-plugin
  1. maven-glassfish-plugin
  2. MAVEN_GLASSFISH_PLUGIN-5

Plugin should use asadmin.bat on Windows platforms by default

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Activity

        Hide
        Sreekanth added a comment -

        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.

        Show
        Sreekanth added a comment - 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.
        Hide
        arungupta added a comment -

        Adding to the CC list.

        Byron is working on a fix.

        Show
        arungupta added a comment - Adding to the CC list. Byron is working on a fix.
        Hide
        Byron Nevins added a comment -

        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

        Show
        Byron Nevins added a comment - 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
        Hide
        liwei13705 added a comment -

        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/

        Show
        liwei13705 added a comment - 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/
        Hide
        bkravandi added a comment -

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

        Show
        bkravandi added a comment - Sorry I'm new to java, how can I apply this patch ?

          People

          • Assignee:
            Byron Nevins
            Reporter:
            pdudits
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: