On Wed, 2006-05-03 at 08:31 +0200, Sharma, Jaikumar wrote: > Dear Maven Users, > > Can I use third party libraries (required by build process to compile / test > sources etc.) which are located in application installed location in the > filesystem without installing them into local repository ? > > As far as Maven documentation is concerned it describes two ways : One by > installing the artifact into local repository and other by specifying the > <scopy>system</scope> and <systemPath><path of libs></systemPath> in the > <dependency> </dependency> section (use of this is discouraged as mentioned > by Maven docs). > http://maven.apache.org/ref/current/maven-model/maven.html > <http://maven.apache.org/ref/current/maven-model/maven.html> > > I want most of the artifacts to be referred by the build process at their > original location and not by moving everything to repository. > > Is there a third way exists in maven 2 to refer the artifacts in the build > process ? Might be the case that I have not come across to that so far. >
The third option is to set up your own repository. This is very easy to do; configure an http server which serves files from a directory with a standard maven repository layout. Uploading files to such a system is probably easiest by network-mounting the directory the http server is serving files from. This tree can even be handily initialised by copying your local repository dir (just remove any metadata files). Once your repo is set up, just define it in the pom. I gues a custom plugin could be written to add jars from other sources, but I'm not aware of any existing plugin that does this, probably because the built-in maven options are fine. There are no other options I'm aware of. Maven doesn't support just pointing at arbitrary directories full of jars; it's considered bad practice as dependency info can't be properly managed. If dependency management isn't needed, then perhaps Ant is the best tool to use. Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]