Discussion:
Plugin execution not covered by lifecycle
(too old to reply)
Damon Jacobsen
2011-06-21 18:55:49 UTC
Permalink
Vincent,

Thanks! The error has now gone away. I am still not getting the
addition of generated-sources to my build path as I had previously. Is
there something else I need to do?

Damon
Hi Damon,
Use the ignore quick-fix, then replace the <ignore> tag by <execute>.
HTH,
Vincent
Envoy? de mon iPhone
I have googled for an hour looking for a solution. I have a pom
containing the plugin as following.
....
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
_____________________________________________________________________
Vincent Vandenschrick
2011-06-21 19:16:19 UTC
Permalink
Faced the same sort of problem some days ago. I've opened the following bug you can attach to if you think this might be related to what you observe. However, the generated source folder is correctly added to the Eclipse project and compiled by JDT. The problem is that it is not made available to subsequent plugins for processing. Maybe you just miss an M2E "update project configuration" ?

https://bugs.eclipse.org/bugs/show_bug.cgi?id=349586

Cheers,
Vincent
Post by Damon Jacobsen
Vincent,
Thanks! The error has now gone away. I am still not getting the
addition of generated-sources to my build path as I had previously. Is
there something else I need to do?
Damon
Hi Damon,
Use the ignore quick-fix, then replace the <ignore> tag by <execute>.
HTH,
Vincent
Envoy? de mon iPhone
I have googled for an hour looking for a solution. I have a pom
containing the plugin as following.
....
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
_____________________________________________________________________
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
Vincent Vandenschrick
Jspresso Framework
http://www.jspresso.org
Damon Jacobsen
2011-06-21 19:33:29 UTC
Permalink
Vincent,



I have indeed done an "update project configuration" dozens
of times now. The problem I have is slightly different form the
referenced bug, in that the source folders are not added to my eclipse
project at all. I can manually add the generated source, but as soon as
I "update project configuration" again, they are gone. If is like the
build-helper plugin is not even getting called, or that changes it makes
are not persisted.



Damon
Post by Vincent Vandenschrick
Faced the same sort of problem some days ago. I've opened the
following bug you can attach to if you think this might be related to
what you observe.
Post by Vincent Vandenschrick
However, the generated source folder is correctly added to the Eclipse
project and compiled by JDT. The problem is that it is not made
available to subsequent > plugins for processing. Maybe you just miss an
M2E "update project configuration" ?
Post by Vincent Vandenschrick
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349586
Cheers,
Vincent
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
_____________________________________________________________________
Vincent Vandenschrick
2011-06-21 19:59:43 UTC
Permalink
Damon,

If you use the build-helper plugin to add your extra source folder to the Maven module, then you have to use the corresponding build-helper M2E lifecycle plugin (installed from M2E marketplace) that make M2E "understand" that there is an extra source folder.

Either use the quick-fix that looks up the build-helper extension or explicitly install it from the M2E marketplace (you can open it from the M2E preference page).

If you don't use the build-helper (i.e. the torque maven plugin adds the generated source folder behind the scene), I don't think M2E will add the extra source folder automatically, at least until there is an extension dedicated to this specific plugin. In that last case, you can amend your pom.xml to use the build-helper (adding explicitely twice the same extra source folder). At least, this is what I've applied as a workaround for some other plugins.

From what I've found out, this is one of the major difference between 0.12 and 1.0. Unfortunately it seems to be the price to pay to reach a stable integration and reproductible Eclipse builds.

Vincent
Post by Damon Jacobsen
Vincent,
I have indeed done an "update project configuration" dozens of times now. The problem I have is slightly different form the referenced bug, in that the source folders are not added to my eclipse project at all. I can manually add the generated source, but as soon as I "update project configuration" again, they are gone. If is like the build-helper plugin is not even getting called, or that changes it makes are not persisted.
Damon
--
Vincent Vandenschrick
Jspresso Framework
http://www.jspresso.org
Damon Jacobsen
2011-06-21 20:23:02 UTC
Permalink
Vincent,



My situation is that of your second example (torque adds
source folders automagically). So far, IMO the cure seems worse than the
disease. In 0.12 everything seemed to just work. Now I am in build hell.
I will try to hold faith that this will get better quickly as more users
hit the new Indigo release.I'd even go so far as to jump in and properly
fix this, but as it is, there seems to be very little documentation on
what is going on and how to resolve it.
Damon,
If you use the build-helper plugin to add your extra source folder to
the Maven module, then you have to use the corresponding build-helper
M2E lifecycle plugin > (installed from M2E marketplace) that make M2E
"understand" that there is an extra source folder.
......
Damon Jacobsen

Sr. Programmer/Analyst

Lifetouch Portrait Studios

775.677.6909




______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
_____________________________________________________________________
Vincent Vandenschrick
2011-06-21 20:39:25 UTC
Permalink
Damon,

Just explicitly add the torque generated source folder with the build helper plugin and it should make it (at least it did the trick for me).

Something like that in the build section :
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-torque-generated-sources</id>
<phase>process-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/where/torque/generates/the/sources</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>

Considering the amount of hours I spent on 0.10 and 0.12 trying to understand some erratic behaviors of the Eclipse build, I really think that 1.0 is a big step forward. Although it's still in its infancy, the foundations seem much more solid. It now has to be trained to understand more and more Maven plugins.

I also feel frustrated in a way, but I'm confident that it will evolve fast.

Cheers,
Vincent
Post by Damon Jacobsen
Vincent,
My situation is that of your second example (torque adds source folders automagically). So far, IMO the cure seems worse than the disease. In 0.12 everything seemed to just work. Now I am in build hell. I will try to hold faith that this will get better quickly as more users hit the new Indigo release.I'd even go so far as to jump in and properly fix this, but as it is, there seems to be very little documentation on what is going on and how to resolve it.
Damon,
If you use the build-helper plugin to add your extra source folder to the Maven module, then you have to use the corresponding build-helper M2E lifecycle plugin > (installed from M2E marketplace) that make M2E "understand" that there is an extra source folder.
……
Damon Jacobsen
Sr. Programmer/Analyst
Lifetouch Portrait Studios
775.677.6909
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
_____________________________________________________________________
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
Vincent Vandenschrick
Jspresso Framework
http://www.jspresso.org
Igor Fedorenko
2011-06-21 22:07:04 UTC
Permalink
We are working on developer documentation that explains how to write m2e
extensions in general and code generation support in particular. We
wanted to have this documentation ready last week but it slipped for
various reasons.

--
Regards,
Igor
Post by Damon Jacobsen
Vincent,
My situation is that of your second example (torque adds source folders
automagically). So far, IMO the cure seems worse than the disease. In
0.12 everything seemed to just work. Now I am in build hell. I will try
to hold faith that this will get better quickly as more users hit the
new Indigo release.I'd even go so far as to jump in and properly fix
this, but as it is, there seems to be very little documentation on what
is going on and how to resolve it.
Damon,
If you use the build-helper plugin to add your extra source folder to
the Maven module, then you have to use the corresponding build-helper
M2E lifecycle plugin > (installed from M2E marketplace) that make M2E
"understand" that there is an extra source folder.
……
Damon Jacobsen
Sr. Programmer/Analyst
Lifetouch Portrait Studios
775.677.6909
Continue reading on narkive:
Loading...