For webapps, Maven is completely out of the picture at runtime. If
you're running a (console) app from within the project folder - i.e. you
have the pom.xml - you may use the Exec Maven Plugin:
http://mojo.codehaus.org/exec-maven-plugin/java-mojo.html
But in any case, you shouldn't have two different versions of a library
(like log4j). I you really, really need two different versions of a
library, the Shade plugin may help, as its able to rename a package so
you can refer to these different versions separately.
HTH,
Daniel Serodio
J.V. wrote:
I understand how Maven resolves dependencies (and transitive
dependencies) at compile time, but does it bring anything to the table
at run time?
For example, if I have in my application dependency list two versions
of log4J (let's say version 8 and version 15), will I deploy both
jars/version along with my app on say a tomcat server inside the war?
At runtime which one does it choose? If I am executing the code that
depends on version 8, how would the correct jar be in the classpath at
that point and later log4J version 15 be in my classpath when code
that has that dependency executes?
At runtime, Maven is out of the picture correct? This is a missing
piece for me.
thanks
J.V.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]