I'm writing my own Mojo that needs to be able to read a file that's in the
classpath. The catch is that the file must be either dyamically generated,
or part of the source tree of the project that's invoking my plugin. Since
it's not part of some other artifact, I'm not seeing how I can get the file
into the classpath for my plugin.

Is there a way to add a non-artifact (e.g. file system directory) to the
classpath for a plugin? Either configuring this in the POM (i.e. an
equivalent to adding a directory as a path location in a taskdef classpath
in Ant) or having code in the Mojo do this would be fine, with a slight
preference for the latter.

BTW, the code that reads the file in question is 3rd party code, and I don't
have an alternative way to feed the file to that code, unfortunately. It has
to be in the classpath.

Thanks!

--
Martin Cooper

Reply via email to