On 07/09/10 10:10, Craig Ringer wrote:
> On 7/09/2010 4:40 PM, Jeremias Maerki wrote:
>> Anyway, I won't to stand in the way
>> if something is added to FOP that can help some users. [snip] just
>> because Maven
>> can't include a simple JAR that is not in a repository.
> Not strictly true. One option is to use <scope>system</scope> with an
> explicit path to the jar.
> Maven doesn't have a wild-card "include everything under lib/" though,
> and using system scope to fudge in local depencies is a bit of a hack.
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#System_Dependencies
> Usually what you'd do if you have a jar you want to use - but no repo or
> pom for it - is drop the jar you want to use into your local ~/m2/ (or
> wherever you keep your local repository, ie download cache) then declare
> a dependency on it in your pom.xml. This is within "a repository" but
> it's only your local repo, it doesn't involve any network access or
> anything except putting a file in a particular place. Maven will look
> for the dependency in a location defined by the repo layout. So if I
> declared
> <dependency>
>   <groupId>local</groupId>
>   <artifactId>somejar</artifactId>
>   <version>2.2</version>
> </dependency>
> ... then it'd look for local/somejar-2.2.jar within my local repository.
> If I put the jar where it should be found, no problem.

Is that also how one would handle optional dependencies? For example
Jeuclid is an optional plug-in; how would I do if I wanted to
periodically enable/disable it?

At the moment I have a jeuclid.jar in my lib/ directory, that I can just
rename into jeuclid.jar.disabled if I want to exclude it.



Reply via email to