repaint-io / maven-tiles

Injecting maven configurations by composition rather than inheritance
154 stars 32 forks source link

Eclipse ignores tiles #9

Open rvowles opened 10 years ago

rvowles commented 10 years ago

The Eclipse m2e plugin does not recognize lifecycle participants. It is not clear how to get it to do so - most of the configuration options for m2e involve telling it about items that need to be watched for when it is building incrementally.

Tiles does not affect the incremental build, only the full refresh (when the Maven | Update is requested) then there appears to be no documentation on how this could work. It may require a full Eclipse plugin with OSGi - which would be @talios 's territory.

blue666man commented 9 years ago

@rvowles Is what you're looking for possible with M2E Execute plugin goal with true? http://eclipse.org/m2e/documentation/m2e-execution-not-covered.html#execute-plugin-goal

I have a similar problem with M2E not pulling dependencies (JUnit) from build-smells, or plugin configuration on incremental builds. It looks like a M2E extension is in order for that:

http://eclipse.org/m2e/documentation/m2e-extension-development.html

I'm surprised that M2E doesn't just do mvn help:effective-pom to figure this out.

erwint commented 8 years ago

We prepared a patch for m2e that allows Maven extensions. Unfortunately, we did get no feedback on the m2e mailing list: http://dev.eclipse.org/mhonarc/lists/m2e-dev/msg01967.html

Anyone interested could build m2e with the patch on this branch: https://github.com/GEBIT/m2e-core/commits/lifecycle-participant

Additionally, you will need a m2e adapter to enable it: https://github.com/GEBIT/maven-tiles-m2e/

An installable version is here: https://github.com/GEBIT/maven-tiles-m2e/raw/updates

While it mostly works well, the tiles need to be installed in the local repository. It might work with SNAPSHOT versions of the tiles in the workspace.

rvowles commented 8 years ago

That is very cool @erwint - is there anything we can do to help?

erwint commented 8 years ago

I don't know why my colleage did not get any reaction on the m2e-dev mailing list (it's very low traffic anyways). We'd like to have some feedback before preparing a gerrit patch for them.

karlvr commented 8 years ago

@erwint what's the status of this now? Any chance of updating to the latest m2e? I presume that's the best approach to test with Eclipse Neon?

erwint commented 8 years ago

unfortunately, our submission is still pending -> Eclipse Bug 486737

karlvr commented 8 years ago

@erwint thank you, I've added myself to the CC on that bug. Hopefully it's like a vote.

lfvjimisola commented 1 year ago

FYI. Bug https://github.com/eclipse-m2e/m2e-core/issues/118 has now been fixed.

Not idea how long it takes for this fix to be available in m2-core and hence used by Eclipse and VS Code.

lfvJonas commented 1 year ago

We use Maven Tiles with VS Code now and it works.