Sorry if this is an elementary question, I am learning about Maven (2),
but I've certainly tried to do my homework.

I have a need to add a directory to the classpath that's visible to a
plugin I'm writing, and I don't see how to do it. All I see is stuff
that seems to assume:

- Maven controls the classpath, which it constructs from artifacts on
which you depend.
- You can make your own artifact types, and specify that they be added
to the classpath
- It appears that an artifact is assumed to be a file.
- That's the only way to get something onto the classpath.

I am hoping, of course, that at least one of these statements is false,
and that there's a way to add a directory (not a file) to a classpath.

Specifically, I am trying to use BEA Kodo 4, the enhancer, and it
appears to require that the directory containing the license.bea file be
on the classpath.

I grant that I could do this by hacking up a ClassLoader and invoking
the enhancer with that, or invoking the enhancer in a different JVM so
that I gain control over that classpath, but those approaches have other
difficulties, and certainly doesn't seem like the Maven Way. I figure
there's a right way to do this; I just haven't discovered it in the
documentation.

Thanks for any help or guidance.



Reply via email to