Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [iam-dev] More extension point ideas.

We have been talking for some time about providing a "diff" of the changes in the pom.

Using it, extensions would register for listening to changes to specific parts on the pom and react accordingly.

For example, JDT support would listen for changes to the maven java compiler settings and dependencies (and also the packaging to know when to enable/disable). This would replace the "monolithic" builder that we have in place now.

I think this approach would solve both of your use cases.

What we've not defined yet is what flags can this extension trigger. At the moment, the builder can trigger a process-resources or process- test-resources, so maybe each plug-in could define the goals that need to be executed. The problem with the "need to recompile" flag is that some actions automatically cause a rebuild (like changing the classpath). We need to think this more carefully.

Another thing to have in mind is the evaluation order of extensions. Since JDT support manages the java classpath, it needs to run before WTP support (which adds attributes to classpath entries). A "priority <number>" field would be enough for ordering the extensions (although a "depends-on <extension-id>" would more accurately describe the situation).

With this in place, I'm not sure if we need any special "project configuration" extension point, since all of them would be configured automatically on the first build.

El 21/11/2008, a las 0:02, Joakim Erdfelt escribió:

While working on https://bugs.eclipse.org/255902 i discovered a useful
extension point we should add.

Currently, at the point of import of a project, the IMavenProject does
not have its artifacts resolved (even direct ones).  So I can't
configure the project's Servlet API at that point.

Idea #1)
I want a project configuration extension point that triggers when an
artifact is resolved and made available in the maven classpath
container.

That way I can bind the Servlet API Facet version based on the
existence of an artifact, or the existence of artifact content (like
the /javax/servlet/resources/web-app_2.5.xsd).

Idea #2)
It would also be nice to be able to attach a configuration event to
the existence of a specific plugin.
We could auto-configure the Java version / Jst compiler version that
way based on the existence of the maven-compiler-plugin.

In order for these to work, I would expect some guidelines on "if
value changes, and you need a recompile, flag it." so that all the
events can process and then the extension point manager can trigger
the recompile once (if so flagged)

This could have an added benefit when the pom is edited / saved
causing a cascading reconfigure at that point as well.  Which doesn't
work right now.

- Joakim Erdfelt
_______________________________________________
iam-dev mailing list
iam-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/iam-dev



Back to the top