I don't know if it's a bug.
This is my situation:
I define the configuration of the JBoss plugin in a profile that is located in the parent POM module of my project.
Another module creates an EAR distribution.
The last module uses the profile defined in the parent POM and runs the (local) JBoss instance. The EAR is listed as a dependency and inside the undeploy configuration with group and artifact id.
Everything works fine but the undeploy (in the post-integration-test phase). The exception occurs in line 92 of the UndeployArtifact class.
I found that in this case the call project.getArtifacts() (used a few lines before) returns a null-Set. If I change the call to project.getDependencyArtifacts() all dependencies are returned and the undeploy phase runs just fine.
Is this a bug or a misconfiguration on my side? I am able to provide code samples if necessary.