javaee / glassfish-maven-plugin-legacy

Other
1 stars 5 forks source link

Undeploy to remote instance does not work #3

Open glassfishrobot opened 13 years ago

glassfishrobot commented 13 years ago

When trying to execute the undeploy goal on a host other than localhost the following error is output:

'Domain [name] does not exist.'

This is because the domain name attribute has been left out as it is not required for remote hosts but the UndeployGlassfishMojo contradicts this:

if (domain.exists()) { boolean started = domain.isStarted(); if (!started)

{ ... start domain }

for (Component component : getComponents())

{ ..undeploy the component }

if (!started)

{ ...stop domain }

} else

{ throw new MojoFailureException("Domain " + domain.getName() + " does not exist."); }

Why does the undeploy first check for a local domain, start it and stop if it is not running?

This should mirror the DeployGlassfishMojo functionality which would allow undeploys to remote instances.

public void doExecute() throws MojoExecutionException, MojoFailureException { ProcessBuilder processBuilder = new ProcessBuilder(); if (!domain.isStarted())

{ getLog().info("Domain " + domain.getName() + " isn't started. Starting it for you."); new StartDomainMacro(this, domain).execute(processBuilder); }

for (Component component : getComponents())

{ new UndeployCommand(this, domain, component).execute(processBuilder); }

}

Affected Versions

[current]

glassfishrobot commented 13 years ago

Reported by cd15

glassfishrobot commented 13 years ago

dwhitla said: Apologies.

This was reported and addressed prior to the java.net relocation. It was a documentation error referring to a feature not yet implemented as of this release. This is scheduled for inclusion in 3.0.

glassfishrobot commented 13 years ago

cd15 said: Any idea when version 3.0 will be released?

Swaying on whether it will be best for me to perform a custom build of the plugin for the time being as it should be a relatively straight forward fix (if it's not already implemented in the code repo)

glassfishrobot commented 13 years ago

Was assigned to dwhitla

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA MAVEN_GLASSFISH_PLUGIN-3