On Fri, 2003-06-20 at 18:55, Otto von Wachter wrote: > Hi all, > > I have a question/suggestion on jar dependencies. I think > maven is perfect for open source (large/collaborative) > projects. I would like to leverage Maven for my internal > project at work, but not all dependencies are available on > ibiblio (some are not open source, etc.) Also it makes > sense for us to keep these jars in CVS, to make sure they > don't get lost, and just because "it works". > > What I would like is to specify some "private" jar > dependencies that are stored in a lib dir. Is there a quick > hack that would allow me to do this? If it is, perhaps > documenting it would increase the adoption of maven among > users like me. If not would it be easy to add this feature? > I was thinking of something like this: > > <privateDependencies> > <libDirectory>lib</libDirectory> > </privateDependencies> > > or maybe > > <build> > <baseClasspath> > <fileset dir="lib"> > <include name="*.jar"/> > </fileset> > </baseClasspath> > ... > </build> > > I know this might go against the "maven philosophy", but it > would be optional, and it's one of the things that is > keeping me from using Maven instead of Ant.
Something for this will never be built into Maven. You lose anything Maven provides in the way of auto-downloading and verification. I would recommend you save yourself much grief and spend 10 minutes and make yourself a local repository. But do what you like, here's one way you might do it: <project xmlns:ant="jelly:ant" xmlns:maven="jelly:maven"> <preGoal name="java:compile"> <ant:path id="my.doublebarrel.classpath"> <fileset dir="${basedir}/lib"> <include name="**/*.jar"/> </fileset> </ant:path> <maven:addPath id="maven.dependency.classpath" refid="my.doublebarrel.classpath"/> </preGoal> </project> Again, I do not recommend you do this. > Otto > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- jvz. Jason van Zyl [EMAIL PROTECTED] http://tambora.zenplex.org In short, man creates for himself a new religion of a rational and technical order to justify his work and to be justified in it. -- Jacques Ellul, The Technological Society --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]