maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuli Saarinen <samuli.saari...@remion.com>
Subject RE: Best practices for Java EE 7 dependencies
Date Fri, 07 Feb 2014 10:56:29 GMT
Hi,

You could import the dependencies  in dependencyManagement as described in [1] and only declare
needed dependencies in the project.

Cheers 

Samuli 

[1] http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies

-----Original Message-----
From: Martin Hoeller [mailto:martin@xss.co.at] 
Sent: 7. helmikuuta 2014 11:33
To: Maven Users List
Subject: Best practices for Java EE 7 dependencies

Hi!

I'm wondering what the best practices are for specifying Java EE 7
dependencies in my modules.

There is the so called BOM (bill of materials) POM: javax:javaee-api:7.0
which lists all API submodules required for JEE7. Specifying this in my
module as

  <dependency>
    <groupId>javax</groupId>
    <artifactId>javaee-api</artifactId>
    <version>7.0</version>
  </dependency>

works and is the least work for me. However, this way I got all JEE APIs
on the CLASSPATH even if I just need a few of them. Further on, the
actual dependencies are now transitive which is (IMHO) not fully correct.
Should I better specify the exact dependencies and investigate some more
work in POM maintainance? What would this gain me?

What do you think?

- martin
Mime
View raw message