jbossas / jboss-as-maven-plugin

Maven plugin to deploy applications to JBoss AS 7 (moved to https://github.com/wildfly/wildfly-maven-plugin)
74 stars 69 forks source link

undeploy-artifact fixed #64

Closed dstraub closed 10 years ago

jamezp commented 10 years ago

Could you please explain what this is attempting to solve? I believe this https://github.com/wildfly/wildfly-maven-plugin/pull/11 will fix the issue. I'll port it over to this plugin as well.

dstraub commented 10 years ago

Hi James the same error is still in the wildfly-maven-plugin. For undeploy an application, the plugin (UndeployArtifactMojo.java) doesn't knows the project dependencies to undeploy an artefact which is defined in the pom. Compare UndeployArtifactMojo.java and DeployArtifactMojo.java - about line 82.

Because I'm working also as JBoss-Instructor, I used the plugin to demonstrate some ways for deploying/undeploying applications. You can try this with the attached sample. To install an app: mvn install -f jolokia-pom-wf.xml - works. To uninstall : mvn clean -f jolokia-pom-wf.xml - failed

[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final-SNAPSHOT:undeploy-artifact (undeploy) on project app-install: org.jolokia: org.jolokia: [ERROR] jolokia-war

If I add the line from my pull-request to src/main/java/org/wildfly/plugin/deployment/UndeployArtifactMojo.java, it's works.

Best regards / Mit freundlichen Grüßen

daniel straub phone: +49 911 3820034 mobil: +49 151 22637844 mailto: ds@ctrlaltdel.de

You can find here the sample -> https://dl.dropboxusercontent.com/u/7552537/app-sample.zip

jamezp commented 10 years ago

You're indeed correct. :) I think we should just remove the project.getArtifacts() and replace it with the project.getDependencyArtifacts().

We require that all contributions be made under the terms of the MIT License, http://www.opensource.org/licenses/mit-license.php. Do you agree to the these terms?

dstraub commented 10 years ago

Yes, I do.

jamezp commented 10 years ago

Merged, thanks!