Matthew Wheaton wrote:
Hello,
I am an avid Maven fan, and am struggling to understand how to model my new
projects based on my Maven 1.x experience.
I have a number of Eclipse projects, one called csi_libs.
csi_libs, contains all the compile time (and some deployment) 3rd party jars
needed across all projects.
In Maven 1.x, I simply had a simple Ant task that added all the jars to the
classpath for builds, like so:
<goal
name="build:SetClasspath"
description="Sets the classpath">
<echo message="Setting the compile classpath . . ." />
<ant:path id="all.libs.path">
<!-- get all the deployment libs -->
<ant:fileset dir="${build.deployLibs}">
<ant:include name="**/*.*" />
</ant:fileset>
<!-- get all the compile only libs -->
<ant:fileset dir="${build.compileLibs}">
<ant:include name="**/*.*" />
</ant:fileset>
</ant:path>
<m:addPath id="maven.dependency.classpath" refid="all.libs.path" />
</goal>
I'm struggling on how to replicate this behavior in Maven 2.
Anyone out there who can assist ?
Thank you.
Sincerely,
Matthew Wheaton
One of Maven's strengths is its dependency handling mechanism. If you
manually add your dependencies to the classpath, then you're not using
Maven's full potential. Although this would work, (you could use the
antrun plugin) it is better to register your dependencies in the pom and
let Maven handle them. This entails placing your dependencies in your
repository which organizes and centralizes the location of your
artifacts. Check this link out for more info on the dependency mechanism
of M2:
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
Regards,
- Henry
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]