Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Issue not resolving dependencies when IDE starts

Why do you need to read MavenProject instance of workspace restart? It
is very expensive from performance point of view, especially for large
workspaces, and m2e tries pretty hard to delay reading MavenProject
instances on startup. Resources folders and Maven dependencies classpath
container are expected to survive workspace restart.

--
Regards,
Igor

On 11-12-15 12:45 AM, Ben Jones wrote:
Hi,

I've been working with Christopher on the javascript-maven-tools project
and have implemented the first version of our m2e plugin which provides
IDE support for our javascript-maven-plugin [1], following on from the
direction Igor gave Chris in their recent discussion.

I've got most things working now using the lifecycleMappings and
lifecycleMappingsMetadataSource extension points; we get the dynamically
configured dependencies resolved via m2e and we get dynamically
configured resource folders visible in Eclipse as source folders.
     There is one major issue remaining and I'm hoping someone may be
able to point us in the right direction - when you start the IDE with an
open maven project which uses the javascript-maven-plugin extension,
neither the ILifecycleMapping.configure() method or the
AbstractMavenDependencyResolver.resolveProjectDependencies() method are
called, so none of our custom project configuration happens. The
workaround is to manually right-click on the project and select "Maven
 >  Update Project Configuration".
     I note that when if the project is closed when you start the IDE,
when you open the project these methods are called and configuration
occurs as expected. But I'm not sure of the right place to allow us to
run our plugin code when the editor is started with an open project.
     You can see the project source online here [2] if that helps (and
the main class is here [3]).

Any pointers as to the right way to do this would be appreciated.

Thanks,
Ben Jones.

[1]
http://mojo.codehaus.org/javascript-maven-tools/javascript-maven-plugin/index.html
[2]
https://fisheye.codehaus.org/browse/mojo/trunk/mojo/javascript-maven-tools/javascript-ide-helpers/javascript-maven-plugin-m2e/
[3]
https://fisheye.codehaus.org/browse/mojo/trunk/mojo/javascript-maven-tools/javascript-ide-helpers/javascript-maven-plugin-m2e/src/org/codehaus/mojo/javascript/m2e/JavascriptMavenToolsLifecycleMapping.java?r=15572



_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev


Back to the top