dIon,
This is a common need on projects that creates components. For instance, your project main goal is an EJB, but in order to create a self-contained, deployable EJB, you probably need to create an EAR, with all the dependencies.
I know maven's way dictates that you should create 3 separated projects (an ejb, an ear and a multi-project to orchestrate the other 2) in these cases, but that's sometimes is an overkill, specially when you have many components in the same situation.
So, I think this request is valid, although it's going to be a little bit harder to implemnt it now that we have features such bundle.name and bundle.dir. I mean, if we are allowing the project's main artifact to be included in the EAR, we should allow the same customizations on its name and location that are allowed to the regular EAR dependencies. But in order to do so, we would need to add more properties, which would make it hard to mantain. For instance:
maven.ear.self.artifact=ejb,war,jar
maven.ear.self.jar.path=/APP-INF/lib/myJar.jar
maven.ear.self.artifact.war.path=root.war
maven.ear.self.artifact.war.uri=/
Long story short, this is a new feature that needs to be better discussed, as it has some philosophical constraints and managebility concerns.
– Felipe
why does your project create an ear and another artifact?