There should be a serious health warning on this stuff. A bunch of the plugins iterate over dependencies, not artifacts. This means they don't "know" the path to the dependency, and guess at ${maven.repo.local}/blah/blah. Jar overrides won't work for plugins that have done this.

$ find . -name '*.jelly'  | xargs grep -l maven.repo.local
./ant/plugin.jelly
./deploy/plugin.jelly
./ear/plugin.jelly
./eclipse/plugin.jelly
./ejb/plugin.jelly
./idea/plugin.jelly
./jar/plugin.jelly
./jbuilder/plugin.jelly
./jdee/plugin.jelly
./jnlp/plugin.jelly
./native/plugin.jelly
./plexus/plugin.jelly
./plugin/plugin.jelly
./pom/plugin.jelly
./runner/plugin.jelly
./uberjar/plugin.jelly
./war/plugin.jelly

Some of the plugins listed above are ok, eg 'jar' uses maven.repo.local in its 'install' target in a legal way, but this will bite you eventually if you use jar overrides. I can't think of an example above where the iteration over artifacts is necessary, its something that should be fixed...

-Baz

Joe Germuska wrote:

You can override the location of dependency jars (or just the version) using properties -- see
http://maven.apache.org/reference/user-guide.html#Overriding%20Stated%20Dependencies



A local repository which supplements iBiblio is indeed a cool idea, as it lets you solve the problem you just pointed out more easily than setting maven properties, and it gives you a place to store locally developed JARs for other projects and to store JARs that can't be on iBiblio (like everything you use from Sun). Plus you don't have to wait for iBiblio to get updated.


Joe


Another question: if you have a dependency on a jar that doesn't have a neat
external place to get it, and you want to pick up that jar from the local
file system, what do you do? I manually created the necessary directory
structure under maven-1.0-beta-9\repository to make like it had been
downloaded. Is there another way? I think it would be cool to just say:


<dependency>
  <id>myjar</id>
  <uri>./lib</uri>
</dependency>

Where it defaults to looking in ./lib for myjar.jar (no version, but version
could be optionally specified), or the URI could specify the protocol like
file:./lib, or be a variable like ${maven.repo.local}. Or again, an
optional attribute on the dependency, like <dependency repository="local"/>.


Current common solution (in mail archives) is to set maven.repo.remote to a
local repository (either local file system or an internal server). This is
also a cool idea. A local repository (supplemental to ibiblio) on our own
server seems like a cool idea.





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to