Uploaded image for project: 'Maven Eclipse Plugin (RETIRED)'
  1. Maven Eclipse Plugin (RETIRED)
  2. MECLIPSE-724

ReadWorkspaceLocations: Setting wtpDefaultServer value as default value if othercondition fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Auto Closed
    • None
    • None
    • None

    Description

      Setting wtpDefaultServer as defaultdeployserverid and defaultdeployservername in workspaceConfiguration, if no runtime servers is found in .metadata of current workspace.
      (i.e no runtime is found in .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs of workspace)
      File Name: src\main\java\org\apache\maven\plugin\eclipse\reader\ ReadWorkspaceLocations.java
      Modified Method: detectWTPDefaultServer
      Modified code:
      if ( servers == null || servers.isEmpty() )
      {
      // added code
      // if servers not found, then this is first time we are calling eclipse:eclipse to generate artifacts
      // set wtpDefaultServer as defaultdeployserverid and defaultdeployservername
      if ( wtpDefaultServer != null )

      { workspaceConfiguration.setDefaultDeployServerId(wtpDefaultServer); workspaceConfiguration.setDefaultDeployServerName(wtpDefaultServer); }

      return;
      }

      Why this code: As per my understanding, earlier code was searching in workspace for servers runtime information in .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs file. Otherwise it was setting above two values null. Hence generated facet file for EAR, runtime information was never getting set while generating artifacts.

      Attachments

        1. WorkspaceConfiguration.java
          4 kB
          Amit Gadkari

        Activity

          People

            Unassigned Unassigned
            amitgadkari Amit Gadkari
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: