Jeff, I added a comment to that issue. If they take systemPath away, as he says, then that'll break me again, for sure. I'm really contemplating NOT using M2.
In any case, my workaround to make it truly dynamic, is my build.bat file first calls an ANT script that compiles a DependencyBuilder class, which iterates through the jar files in my "lib" directory, and creates a string that has all the <dependency> entries in it. Then, I have a pom that lives in my "lib" project called pom-template.xml, that, while still in ANT, I copy to the same directory renaming to pom.xml. I filter the file using the ANT filter mechanism to ADD the string I just created in the DependencyBuilder class, giving a psuedo-dynamic discovery of dependencies. Then, I reference the "libs" project in each of the sub-projects. A little complicated, but then I don't have to manually add JARs to the build when the developers add them. I'll add this commentary to the issue you referenced as well. mw On 12/5/05, Jeff Jensen <[EMAIL PROTECTED]> wrote: > > Yes, we do the same thing. How to solve changed with M2. Now, use > <scope>system</scope> and <systemPath>. > > I think this JIRA discusses what your issue is. Brett described the > un-recommended workaround. > > http://jira.codehaus.org/browse/MNG-1471 > > I look forward to reading your comments on this... :-) > > > Quoting Matthew Wheaton <[EMAIL PROTECTED]>: > > > Hi all, > > > > In Maven 1.x, I could get a list of the jars in my version control > > repository, and dynamically add them to the Maven build path using an > ant > > task. > > What's important to note, is that I have all my dependency jars in a > few, > > KNOWN directories. I would like to be able to include all those jars, > > without having to reference each one of them explicitly in a POM, or a > > parent POM. Below is how I do this in Maven 1.x with the ANT task. Note > > below, that I can create the ant goal, however, the last line in the > goal, > > seems to be only an Maven 1.x feature and not possible in Maven 2.x. > > > > In our environment, we may have totally different people developing that > the > > people doing the build. When a developer adds new JARs to version > control, > > it will break the build, unless we manually add the reference in all the > > associated POMs (or parent POMs). We're trying to avoid this, any ideas > ? > > > > Below is my Maven 1.x ANT goal. > > > > <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> > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
