The "module remove" command fails when it deletes non-empty folder. For instance a resource adapter module contains META-INF/ra.xml file in the module. When I choose to delete the module, it fails: [standalone@localhost:9999 /] module remove --name=org.jboss.ironjacamar.ra16out Failed to delete /home/jcacek/Testing/jboss-eap-6.1.1.ER4/modules/org/jboss/ironjacamar/ra16out/main/META-INF
Verified on EAP 6.2.0.ER3
Stan Silvert <ssilvert> updated the status of jira WFLY-1913 to Reopened
Stan Silvert <ssilvert> made a comment on jira WFLY-1913 Reopening. This fix breaks module commands that are part of a deployment archive. See erroneous fix here: https://github.com/wildfly/wildfly/commit/e4c831dfe87668dd3a1c308ae43378e015e416b4#diff-f8a04572ea92d965c2b95278f93cdd90 You can't just get rid of the call to ctx.getCurrentDir(). It's there for a reason. A module command can be included in a deploy.scr script, which is inside a *.cli archive. See https://community.jboss.org/wiki/CLIDeploymentArchive The call to ctx.getCurrenDir() ensures that the resources are found in the archive rather than on the file system.
Ivo Studensky <istudens> made a comment on jira WFLY-1913 I've got rid of it since the ctx.getCurrentDir() is called before that line, within translatePath() call at line 151 unless the path starts with root, see [1]. Thanks for the counter example I will take a look at it. [1] https://github.com/wildfly/wildfly/blob/master/cli/src/main/java/org/jboss/as/cli/handlers/module/ASModuleHandler.java#L151
Stan Silvert <ssilvert> made a comment on jira WFLY-1913 I've attached a *.cli archive that demonstrates the problem.
Ivo Studensky <istudens> made a comment on jira WFLY-1913 I've hacked up a simple test case for the CLI deployment archive involving a simple war which works as expected. I will continue on this and test it with the archive you attached. https://github.com/istudens/wildfly/commit/411d60fa299484db688ccde747a04bc19107b70a
Ivo Studensky <istudens> made a comment on jira WFLY-1913 Ah, nevermind. It needs a module add command included in the deploy.scr script. I will enhance the test case accordingly and fix the issue.
Ivo Studensky <istudens> made a comment on jira WFLY-1913 Ah, nevermind, too many context switches on my side. It needs a module add command included in the deploy.scr script. I will enhance the test case accordingly and fix the issue.
Ivo Studensky <istudens> made a comment on jira WFLY-1913 Created a new PR which fixes the regression and adds a test-case for it.
Ivo Studensky <istudens> made a comment on jira WFLY-1913 Merged.