Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] Transforming class files in an M2E extension

Hi all,

Having some issues with a maven plugin that transforms class files in M2E (endless builds), I decided to try to write an extension (my first) that handles the integration, but I need some help. The javassist-maven-plugin takes classes from the project class path, passes them through a transformer and writes new class files. A typical project setup looks like this:

parent with modules:
 - module a with classes to be transformed
 - module b with transformer and javassist-maven-plugin, destination of transformed classes, has optional dependency on module a to stop transitive dependencies
 - module c depends on transformed classes in module b

What I would like the M2E extension to do, is on changed classes in module a, transform these classes, write them in module b and refresh those classes, triggering a build in module c. This being my first extension, I read the introduction on writing extensions and managed to setup a project in Eclipse, but that's were it ends. All examples I could find are about generating source from source, not classes from classes. Is there an existing extension I could use as an example? If not, what would be a good approach for this plugin? Which M2E classes do I need to look at?

Best regards,
Emond Papegaaij

Back to the top