We have many ejb artifacts that are broken into clicks and implantable artifacts like
a-client, a-impl, b-client, b-impl, c-client,...
If ayou need to call b, we need to add a compilation dependency a-impl→ b-client. When we launch the ear, classes from b-implare introduced for the actual work.
Problem:
To launch the ear, we need to make sure that for each client there is a corresponding impl artifact. When we build an artifact with Maven, this is not guaranteed. If I add a-implto my pom, Maven will add b-clientto the ear (this is a compilation dependency), but it does not add b-impl(because there is no static connection). b-implshould be added to pom as a dependency.
Often leads to problems due to "forgotten" artifacts. In addition, artifacts that will never be removed from pom may be discarded. Possible solutions:
- Add
runtimeclient dependency to impl. Solves the problem for Maven, but connects the client with the implant. In ejb with client artifact - runtime dependency? people advised against him. - Use scripts to update and check pom to make sure every client has impl.
- Manually check
dependency:listbefore each build to make sure every client has an impl.
I don’t like any of the features, but the first seems to pose the least problem. Is there a better way?
source
share