Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-dev] Loading resources from the plugin realm

I have an example of a plugin configured with dependencies.

In my m2e configuration code, I coded the following to get the
plugin's realm so that I could go hunting resources in the
dependencies.

        IMaven maven = MavenPlugin.getDefault().getMaven();
    	// call for side effect of ensuring that the realm is set in the
descriptor.
    	maven.getConfiguredMojo(session, mojoExecution, Mojo.class);
    	MojoDescriptor mojoDescriptor = mojoExecution.getMojoDescriptor();
    	return mojoDescriptor.getPluginDescriptor().getClassRealm();

My call to pluginRealm.getResource(location) on the string pulled out
of the plugin's parameters (that works in mvn just fine) comes back
null.

Before I go being more of a pest with a JIRA and such, I am posting
this to see if there's something stupid I've done (again). I couldn't
find any examples of fishing on the plugin dependencies by reading
your code.


Back to the top