Request for Maven Java EE 8 artifact


Guillermo González de Agüero
 

Hi all,

Java EE 8 is near release and I'd like to request a simple change on the artifact layout that is published to Maven central.

Until Java EE 7 the artifact contained all the API classes packaged on it, which doesn't work with Maven dependency exclusions. It is ok when coding against that whole EE version, but becomes problematic when you want to upgrade one dependency API.

For example, I've been using CDI 2.0 on a patched Java EE 7 server.

For that project I need two provided dependencies: Java EE 7 (which bundles CDI 1.2) and CDI 2.0 to get access to the new interfaces. I won't have problems at runtime since the correct classes will be provided by the server, but at compile time the classpath has two versions of the same classes, and I can't easily do nothing to fix it

My request then is, now that we have the missing JPA API on Maven (thanks Lukas for that), could the Java EE 8 artifact just be an aggregator declaring dependencies to all other specs?

Using that approach we could benefit from Maven dependency exclusion mechanism and just exclude the "outdated" version.

This will become more important as side projects like MicroProfile gain momentum, since it also declares dependencies on EE specs and a lot of people will likely combine the two technologies.

Any thoughts?


Regards,

Guillermo González de Agüero


Join javaee-spec@javaee.groups.io to automatically receive all group messages.