OK thanks for your answers, I ll try to implement that :-)
Alexandre
Jörg Schaible wrote:
Hi Alöexandre,
Alexandre Touret wrote on Monday, July 10, 2006 6:35 PM:
Hello,
I m trying to migrate from m1.x to m2. I think M2 is powerfull by
transitive dependencies functionality.But in my J2EE
environment, I have
some problems with an application which use Hibernate,
Struts, Spring,
Log4J ...
First, I use Oracle AS 10.1.3. This server doesn' t integrate both
xerces & xalan for XML parsing/transform but XDK. How can I override
the dependencies of xerces and xalan and replace them by a
reference of XDK ?
Use a super POM as parent (1). Define there a dependencyManagement section
where you include the spring artifacts with appropriate exclusions (2).
Secondly, I have an another problem with the injection of dependencies
with antlr librabry. some of my components depends of the
version 2.7.2
and another ones depends of the version 2.7.
This problem is available for other libraries. I have prefered this
example, because its well representative.
Maven will take the nearest version i.e. the version of antlr with the less
transitive levels to the current artifact (3).
So that's I would like to have some skill testimonies about injection
of dependencies with MAVEN 2 in Java EE environment
1) A parent pom is isdentified like a normal artifact my
groupId:artifactId:version. It does not have to be present in the parent
directory nor must it declare all modules, that refer it as parent. So a super
POM is normally a project of its own. Use the depednencyManagement also to
define the versions, dojn't enter them in the POMs of your modules.
2) Exclusions have a very nasty characteristic: An artifact that excluded for
an arbitrary dependency is excluded implicitly for all dependencies.
3) Especially in an J2EE environment the version control gets nasty. The
version included in an EAR might be different from the version referenced in
the EJB's classpath (because the EAR's depednency resolution might take another
version as nearer). The only way to circumvent this is the declaration of a
dependency directly in your POMs - which makes the transitive depednencies
somewhat pointless.
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]