Hi,
I have three Maven projects: A produces an artifact, B creates a
private Maven plugin, and C uses B to process the artifact created by
A. The plugin accesses the artifacts resources like this:
URL url =
Thread.currentThread().getContextClassLoader().getResource("my.resource");
if (url == null) {
url = getClass().getClassLoader().getResource("my.resource");
if (url == null) {
throw new IOException("Resource my.resource not available");
}
}
The POM lists the artifact A as a dependency in the plugins section of
dependencies. In other words, the plugin is configured like this:
<build><plugins>
<plugin><artifactId>B</artifactId>
<dependencies><dependency>A</dependency></dependencies>
</plugin>
</plugins></build>
This approach works fine within native Maven. Not so within M2Eclipse
(or, more precisely, when the Maven Project Builder is invoking the
plugin as a part of the Eclipse build process): The resource isn't
found.
Any ideas what might be wrong?
Thanks,
Jochen
--
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.
-- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
My guess: Nokia E50)
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email