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