Discussion:
Plugin execution not covered by lifecycle
(too old to reply)
Guillaume Polet
2011-11-02 09:30:53 UTC
Permalink
Hi List,

I know I am not the first to ask this question, but I want to make sure
I understand correctly the error I am seeing in Eclipse with m2e 1.0.100
on all my Maven projects.

So I have a large multi-module Maven project and almost all of them show
me an error with the message "/Plugin execution not covered by lifecycle
configuration:
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (execution:
default-compile,
phase: compile)/", and the same thing for testCompile.
I have recently modified the compiler used by m-c-p to use this one
(since the one from Oracle lamely crashes while compiling):
<groupId>org.sonatype.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.11.1</version>

So, my understanding is that M2E puts an error on my pom.xml (and
therefore my project) because it does not handle directly this
configuration of the maven-compiler? Is this correct?
If yes, is not it a bit strong to put an error on this while we know
that the eclipse compiler will do the job anyway? I was quite frustrated
to see that now all my projects are marked as in error while they all work.

I can definitely not tell other developers that they first have to
select all 66 projects and go on them one by one to indicate that M2E
can safely ignore this. Could not this be simply a warning instead of an
error?

Or am I just not understanding something on the way M2E and Eclipse work
together?

Thanks in advance,

Guillaume
Igor Fedorenko
2011-11-02 10:15:00 UTC
Permalink
Out of the box, m2e only supports maven compiler plugin with
compilerId=javac. To make it work for other compilers, compilerId=jdt in
your specific case, you need to add this explicit lifecycle mapping
configuration in your (parent) pom.xml


<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<parameters>
<compilerId>jdt</compilerId>
</parameters>
</pluginExecutionFilter>
<action>
<configurator>
<id>org.eclipse.m2e.jdt.javaConfigurator</id>
</configurator>
</action>
</pluginExecution>



Please see [1] for more information about lifecycle mapping
configuration and syntax.

[1] http://wiki.eclipse.org/M2E_plugin_execution_not_covered

--
Regards,
Igor
Post by Guillaume Polet
Hi List,
I know I am not the first to ask this question, but I want to make sure
I understand correctly the error I am seeing in Eclipse with m2e 1.0.100
on all my Maven projects.
So I have a large multi-module Maven project and almost all of them show
me an error with the message "/Plugin execution not covered by lifecycle
default-compile,
phase: compile)/", and the same thing for testCompile.
I have recently modified the compiler used by m-c-p to use this one
<groupId>org.sonatype.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.11.1</version>
So, my understanding is that M2E puts an error on my pom.xml (and
therefore my project) because it does not handle directly this
configuration of the maven-compiler? Is this correct?
If yes, is not it a bit strong to put an error on this while we know
that the eclipse compiler will do the job anyway? I was quite frustrated
to see that now all my projects are marked as in error while they all work.
I can definitely not tell other developers that they first have to
select all 66 projects and go on them one by one to indicate that M2E
can safely ignore this. Could not this be simply a warning instead of an
error?
Or am I just not understanding something on the way M2E and Eclipse work
together?
Thanks in advance,
Guillaume
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Guillaume Polet
2011-11-02 11:14:18 UTC
Permalink
Yes I understand that indeed M2E only understands javac.
But I have three questions then:
* Since neither javac nor jdt is executed by M2E when working in
Eclipse, could not the compiler ID be ignored by M2E instead of shouting
an error, or instead could it be simply a warning indicating that M2E
has no idea on how to handle this?
* I really don't like the idea that I have to modify my pom.xml to make
M2E "work". I find this totally in the opposite spirit of IDE
independence of Maven. Couldn't this be fixed in another manner (like a
setting in Eclipse or a preference somewhere?)
* Is there a way to simply remove all these Errors M2E reports (again a
setting in Eclipse, a preference somewhere)?

Anyway, thanks for your quick reply,

--
Guillaume
Post by Igor Fedorenko
Out of the box, m2e only supports maven compiler plugin with
compilerId=javac. To make it work for other compilers, compilerId=jdt in
your specific case, you need to add this explicit lifecycle mapping
configuration in your (parent) pom.xml
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<parameters>
<compilerId>jdt</compilerId>
</parameters>
</pluginExecutionFilter>
<action>
<configurator>
<id>org.eclipse.m2e.jdt.javaConfigurator</id>
</configurator>
</action>
</pluginExecution>
Please see [1] for more information about lifecycle mapping
configuration and syntax.
[1] http://wiki.eclipse.org/M2E_plugin_execution_not_covered
--
Regards,
Igor
Post by Guillaume Polet
Hi List,
I know I am not the first to ask this question, but I want to make sure
I understand correctly the error I am seeing in Eclipse with m2e 1.0.100
on all my Maven projects.
So I have a large multi-module Maven project and almost all of them show
me an error with the message "/Plugin execution not covered by lifecycle
default-compile,
phase: compile)/", and the same thing for testCompile.
I have recently modified the compiler used by m-c-p to use this one
<groupId>org.sonatype.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.11.1</version>
So, my understanding is that M2E puts an error on my pom.xml (and
therefore my project) because it does not handle directly this
configuration of the maven-compiler? Is this correct?
If yes, is not it a bit strong to put an error on this while we know
that the eclipse compiler will do the job anyway? I was quite frustrated
to see that now all my projects are marked as in error while they all work.
I can definitely not tell other developers that they first have to
select all 66 projects and go on them one by one to indicate that M2E
can safely ignore this. Could not this be simply a warning instead of an
error?
Or am I just not understanding something on the way M2E and Eclipse work
together?
Thanks in advance,
Guillaume
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Vegard B. Havdal
2011-11-02 11:24:12 UTC
Permalink
* Is there a way to simply remove all these Errors M2E reports (again a setting in Eclipse, a preference somewhere)?
See this ticket: https://bugs.eclipse.org/bugs/show_bug.cgi?id=350414

I really hope someone who knows Eclipse plugin development steps up and fixes this, it seems to affect a bunch of people.

Vegard
Rafał Krzewski
2011-11-02 11:52:09 UTC
Permalink
Post by Vegard B. Havdal
* Is there a way to simply remove all these Errors M2E reports (again a setting in Eclipse, a preference somewhere)?
See this ticket: https://bugs.eclipse.org/bugs/show_bug.cgi?id=350414
I really hope someone who knows Eclipse plugin development steps up and fixes this, it seems to affect a bunch of people.
Vegard
Storing this information in POM sure looks ugly, but there are important
reasons to do that:

1. POMs are shared across teams through Maven repositories and through
SCMs. Eclipse settings are not.
m2e is supposed to generate a complete, working eclipse project
configuration no matter where you pull the project from. The resulting
dotfiles (.project, .classpath, .settings/*) are transient and workspace
specific. Sharing the across the team through SCM is _not_ recommended
because it does more harm than good.

2. POMs are inherited. If the lifecycle mapping is placed outside of
POM, either you need to do set it for each and every module separately,
which is clearly unacceptable, or implement a mechanism of sharing and
inheritance of these settings between module parallel to what is already
done with POMs. This is not a workable solution either.

If you can't live with having this information in the POM, you need to
create an eclipse plugin that will provide lifecycle mapping for the
plugins that your project / company uses. Everyone in your team needs to
install it, or get it preinstalled in their Eclipse when they start
working on a project, and everything will be fine. All the scary error
markers will go away :)

Regards,
Rafał
Vegard B. Havdal
2011-11-02 12:33:27 UTC
Permalink
get it preinstalled in their Eclipse when they start working on a project, and everything will be fine. All the scary error markers will go away :)
They mask out other ones in the Package Explorer and Problems panes. If there were a way to turn it into a warning, as a workspace setting, that alone would've solved this issue for me. Anyone? :)

Vegard
Guillaume Polet
2011-11-03 16:24:56 UTC
Permalink
m2e developers, I appreciate your work and do not want you to feel
attacked in any way on this, but just want to suggest that you should
maybe consider this as a more important issue than it is currently. And
my belief is that there are cheap and simple solutions that could make a
lot of people a lot happier.

1) From what I read, many people are upset by having to reconfigure
their pom just for m2e, ... and even more upset to see that the m2e team
considers this as a minor issue.
2) Quite some people would already be very happy to simply see those
errors as warning (including myself). It could be a setting if you
really feel this is an error, but IMHO, we lived without this error for
years, so I don't really understand the need to report these problems as
a strong issue with an error marker (especially that we cannot fix this
same error on all projects with the quick fix assistant). I don't think
that this must be something terribly complicated to modify nor very
impacting in your code, so this could easily be done and would already
make many people happy.
3) The argument that "/POMs are shared across teams through Maven
repositories and through SCMs. Eclipse settings are not./ " is
contradictary in itself. If Eclipse settings are not shared it is
because they are specific to Eclipse--> Therefore, specific Eclipse
settings (like the m2e lifecycle configuration) should not be put in
shared files.

Just to let you how serious I think this is, I am really considering
moving to an alternate IDE just for that. May sound stupid, but other
IDE do not go through these kind of ugly patch, so I really don't see
why Eclipse should.

Sorry if you feel this is harsh, this is not my intent.

Cheers,
Guillaume
Post by Vegard B. Havdal
get it preinstalled in their Eclipse when they start working on a project, and everything will be fine. All the scary error markers will go away :)
They mask out other ones in the Package Explorer and Problems panes. If there were a way to turn it into a warning, as a workspace setting, that alone would've solved this issue for me. Anyone? :)
Vegard
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Rafał Krzewski
2011-11-04 07:19:06 UTC
Permalink
Post by Guillaume Polet
m2e developers, I appreciate your work and do not want you to feel
attacked in any way on this, but just want to suggest that you should
maybe consider this as a more important issue than it is currently.
And my belief is that there are cheap and simple solutions that could
make a lot of people a lot happier.
1) From what I read, many people are upset by having to reconfigure
their pom just for m2e, ... and even more upset to see that the m2e
team considers this as a minor issue.
2) Quite some people would already be very happy to simply see those
errors as warning (including myself). It could be a setting if you
really feel this is an error, but IMHO, we lived without this error
for years, so I don't really understand the need to report these
problems as a strong issue with an error marker (especially that we
cannot fix this same error on all projects with the quick fix
assistant). I don't think that this must be something terribly
complicated to modify nor very impacting in your code, so this could
easily be done and would already make many people happy.
For years we have lived with m2eclipse that behaved in a non-predictable
way. Sometimes it would build your project, sometimes it would not, and
you needed to go through build / clean / refresh / restart workspace /
turn lights on and off voodoo to make it build again. It is now all gone
with m2e 1.0. Now the errors are here to tell you that your project does
not build correctly _because_ there is a Maven plugin bound to the
default lifecycle that m2e has no idea what to do about. Ignoring the
plugin is not a safe option, because if it was not needed to build your
project correctly, why it is it in your default lifecycle? Why do you
run it at each project build? Blindly running the plugin is not a safe
option either, because it can interfere with other plugins that are
configured for Eclipse environment. Some plugins need to behave
differently, or simply not run (eg. the compiler plugin). Moreover
Eclipse platform and plugins have no way of knowing what the plugin did,
they can only find out after the user refreshes the workspace, which
leads to the non-repeatable build madness that we used to have with
m2eclipse.
Post by Guillaume Polet
3) The argument that "/POMs are shared across teams through Maven
repositories and through SCMs. Eclipse settings are not./ " is
contradictary in itself. If Eclipse settings are not shared it is
because they are specific to Eclipse--> Therefore, specific Eclipse
settings (like the m2e lifecycle configuration) should not be put in
shared files.
Let me clarify: pom.xml is file is shared, but .project, .classpath,
.settings/... are not shared, or at least they should not be shared
through SCM. I agree that storing Eclipse specific settings in the POM
does look ugly but it works well, and nobody came up with a viable
alternative so far.
Post by Guillaume Polet
Just to let you how serious I think this is, I am really considering
moving to an alternate IDE just for that. May sound stupid, but other
IDE do not go through these kind of ugly patch, so I really don't see
why Eclipse should.
Sorry if you feel this is harsh, this is not my intent.
You are asking the developers to work on including a feature that will
hide - not solve the problem and cause more confusion and more bogus bug
reports. Please don't be surprised that they do not comply.

Regards,
Rafał.

PS. I'm a m2e user not a developer, just to be clear.
Post by Guillaume Polet
Cheers,
Guillaume
Post by Vegard B. Havdal
get it preinstalled in their Eclipse when they start working on a project, and everything will be fine. All the scary error markers will go away :)
They mask out other ones in the Package Explorer and Problems panes. If there were a way to turn it into a warning, as a workspace setting, that alone would've solved this issue for me. Anyone? :)
Vegard
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Vegard B. Havdal
2011-11-04 08:10:00 UTC
Permalink
the user refreshes the workspace, which leads to the non-repeatable build madness that we used to have with m2eclipse.
Not everyone, it seems a good deal of people didn't have problems with this, i.e. the people who are hoping for some Eclipse (not pom) setting to to make it behave approximately as before, but with a warning.
You are asking the developers to work on including a feature that will hide - not solve the problem and cause more confusion and more bogus bug reports. Please don't be surprised that they do not comply.
That will hide the problem if it were there to begin with you mean? They could just refuse support if the user had explicitly disabled the connector requirement.

Vegard
Igor Fedorenko
2011-11-04 10:06:09 UTC
Permalink
I'll skip the rant about threats to use "alternative IDE" and about
opensource development in general, so see my specific answers inline

--
Regards,
Igor
Post by Guillaume Polet
m2e developers, I appreciate your work and do not want you to feel
attacked in any way on this, but just want to suggest that you should
maybe consider this as a more important issue than it is currently. And
my belief is that there are cheap and simple solutions that could make a
lot of people a lot happier.
1) From what I read, many people are upset by having to reconfigure
their pom just for m2e, ... and even more upset to see that the m2e team
considers this as a minor issue.
Lifecycle configuration in pom.xml is tracked as [1]. m2e development
team does not have immediate plans to implement this feature for the
reasons I explained in the bugzila but we will accept a quality patch
that implements this feature. I will be happy to provide more detailed
requirements for the "quality" patch on m2e-dev mailing list.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=350414
Post by Guillaume Polet
2) Quite some people would already be very happy to simply see those
errors as warning (including myself). It could be a setting if you
really feel this is an error, but IMHO, we lived without this error for
years, so I don't really understand the need to report these problems as
a strong issue with an error marker (especially that we cannot fix this
same error on all projects with the quick fix assistant). I don't think
that this must be something terribly complicated to modify nor very
impacting in your code, so this could easily be done and would already
make many people happy.
Please open an enhancement request to make severity of lifecycle mapping
problems configurable with a UI preference or however else you think is
reasonable. As with storing lifecycle mapping configuration outside of
pom.xml, m2e development team has no plans to implement this but we will
accept a quality patch.

The fact that ignore quick-fix is not enabled for a very few maven
plugins is a bug. It is tacked as [2] and m2e development team plans to
fix this in m2e 1.1.

[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=361642
Post by Guillaume Polet
3) The argument that "/POMs are shared across teams through Maven
repositories and through SCMs. Eclipse settings are not./ " is
contradictary in itself. If Eclipse settings are not shared it is
because they are specific to Eclipse--> Therefore, specific Eclipse
settings (like the m2e lifecycle configuration) should not be put in
shared files.
The argument is not about sharing .settings files but about
configuration inheritance. Vast majority of Maven projects are
multi-module. Lifecycle mapping configuration stored outside of pom.xml
will result in significant duplication of configuration, will be tedious
to setup, difficult to maintain and, at the end, not many users will
actual use it. This is why we do not see this feature as a good
investment of the limited resources we have, but as I mentioned above
we will accept a quality patch (which, btw, is not a trivial amount of
work in itself).
Post by Guillaume Polet
Just to let you how serious I think this is, I am really considering
moving to an alternate IDE just for that. May sound stupid, but other
IDE do not go through these kind of ugly patch, so I really don't see
why Eclipse should.
Sorry if you feel this is harsh, this is not my intent.
Cheers,
Guillaume
Post by Vegard B. Havdal
get it preinstalled in their Eclipse when they start working on a project, and everything will be fine. All the scary error markers will go away :)
They mask out other ones in the Package Explorer and Problems panes. If there were a way to turn it into a warning, as a workspace setting, that alone would've solved this issue for me. Anyone? :)
Vegard
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Guillaume Polet
2011-11-07 10:39:58 UTC
Permalink
Post by Igor Fedorenko
I'll skip the rant about threats to use "alternative IDE" and about
opensource development in general, so see my specific answers inline
Ok sorry that you felt this as threat, it is just that the current
behaviour makes my Eclipse bearly-usable because the errors reported by
m2e hide all the other errors I have (my project contains 66 projects,
and it is really just not possible to open all 66 projects all the time
to check if there is no other errors in them besides the ones reported
by m2e).
Post by Igor Fedorenko
--
Regards,
Igor
Post by Guillaume Polet
m2e developers, I appreciate your work and do not want you to feel
attacked in any way on this, but just want to suggest that you should
maybe consider this as a more important issue than it is currently. And
my belief is that there are cheap and simple solutions that could make a
lot of people a lot happier.
1) From what I read, many people are upset by having to reconfigure
their pom just for m2e, ... and even more upset to see that the m2e team
considers this as a minor issue.
Lifecycle configuration in pom.xml is tracked as [1]. m2e development
team does not have immediate plans to implement this feature for the
reasons I explained in the bugzila but we will accept a quality patch
that implements this feature. I will be happy to provide more detailed
requirements for the "quality" patch on m2e-dev mailing list.
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=350414
If it is not too complex to get its hands in m2e code and Eclipse stuff,
I would be glad to help provide "quality" patch. My idea is to have a
constructive behaviour, not to trash someone else's work.
I have checked out the code and managed to import all Maven projects. If
you can provide me a few pointers on where to look in the code (and
possibly, if you have one in your hand, a good documentation link), I
should be able to work on that. Waiting for your input to continue on
this subject...
Post by Igor Fedorenko
Post by Guillaume Polet
2) Quite some people would already be very happy to simply see those
errors as warning (including myself). It could be a setting if you
really feel this is an error, but IMHO, we lived without this error for
years, so I don't really understand the need to report these problems as
a strong issue with an error marker (especially that we cannot fix this
same error on all projects with the quick fix assistant). I don't think
that this must be something terribly complicated to modify nor very
impacting in your code, so this could easily be done and would already
make many people happy.
Please open an enhancement request to make severity of lifecycle mapping
problems configurable with a UI preference or however else you think is
reasonable. As with storing lifecycle mapping configuration outside of
pom.xml, m2e development team has no plans to implement this but we will
accept a quality patch.
See comment above.
Post by Igor Fedorenko
The fact that ignore quick-fix is not enabled for a very few maven
plugins is a bug. It is tacked as [2] and m2e development team plans to
fix this in m2e 1.1.
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=361642
Great, can't wait for it. :-)
Post by Igor Fedorenko
Post by Guillaume Polet
3) The argument that "/POMs are shared across teams through Maven
repositories and through SCMs. Eclipse settings are not./ " is
contradictary in itself. If Eclipse settings are not shared it is
because they are specific to Eclipse--> Therefore, specific Eclipse
settings (like the m2e lifecycle configuration) should not be put in
shared files.
The argument is not about sharing .settings files but about
configuration inheritance. Vast majority of Maven projects are
multi-module. Lifecycle mapping configuration stored outside of pom.xml
will result in significant duplication of configuration, will be tedious
to setup, difficult to maintain and, at the end, not many users will
actual use it. This is why we do not see this feature as a good
investment of the limited resources we have, but as I mentioned above
we will accept a quality patch (which, btw, is not a trivial amount of
work in itself).
I do not deny that lifecycle mapping configuration is an easy thing to
do, and I do know too that open source development resources are scarce
(I am myself working on an opensource project).
I don't claim either that this should be ignored and go back to the old
M2Eclipse way where indeed some behaviour could be very random. I am
just saying that the current approach also causes some drastic issues
(but maybe there is a better hope to fix them).

Cheers,
Guillaume
Post by Igor Fedorenko
Post by Guillaume Polet
Just to let you how serious I think this is, I am really considering
moving to an alternate IDE just for that. May sound stupid, but other
IDE do not go through these kind of ugly patch, so I really don't see
why Eclipse should.
Sorry if you feel this is harsh, this is not my intent.
Cheers,
Guillaume
Post by Vegard B. Havdal
get it preinstalled in their Eclipse when they start working on a
project, and everything will be fine. All the scary error markers
will go away :)
They mask out other ones in the Package Explorer and Problems panes.
If there were a way to turn it into a warning, as a workspace
setting, that alone would've solved this issue for me. Anyone? :)
Vegard
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Igor Fedorenko
2011-11-07 14:52:30 UTC
Permalink
Post by Guillaume Polet
Post by Igor Fedorenko
Lifecycle configuration in pom.xml is tracked as [1]. m2e development
team does not have immediate plans to implement this feature for the
reasons I explained in the bugzila but we will accept a quality patch
that implements this feature. I will be happy to provide more detailed
requirements for the "quality" patch on m2e-dev mailing list.
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=350414
If it is not too complex to get its hands in m2e code and Eclipse stuff,
I would be glad to help provide "quality" patch. My idea is to have a
constructive behaviour, not to trash someone else's work.
I have checked out the code and managed to import all Maven projects. If
you can provide me a few pointers on where to look in the code (and
possibly, if you have one in your hand, a good documentation link), I
should be able to work on that. Waiting for your input to continue on
this subject...
m2e development environment setup is documented in [2].

LifecycleMappingFactory.getProjectMetadataSources is the code you need
to extend to read mapping metadata in workspace project .settings folder.

Lifecycle mapping UI will need to be able to display effective lifecycle
mapping metadata for the project and let the user change the mapping.

You will need to provide at least one automated test that verifies that
m2e reads expected lifecycle mapping metadata from .settings folder and
that this metadata takes preference over mapping metadata from pom.xml.

If you have any further questions, please reply to m2e-dev mailing list
only.

[2] http://wiki.eclipse.org/M2E_Development_Environment

--
Regards,
Igor
Igor Fedorenko
2011-11-02 11:24:53 UTC
Permalink
Even though m2e does not execute maven compiler plugin, it still needs
to interpret plugin configuration and can only do this reliably for
known compilers.

Another option would be to develop m2e extension that basically
encapsulates the same lifecycle mapping snippet and install it in your
eclipse.

I am not sure what you mean by "all these Errors M2E reports". m2e was
not able to setup workspace project, there is no source paths
configured, java source/target is likely wrong and probably other
problems. The error you see is the root cause of all these problem, so I
don't understand how hiding the root cause is going to be helpful to anyone.

--
Regards,
Igor
Post by Guillaume Polet
Yes I understand that indeed M2E only understands javac.
* Since neither javac nor jdt is executed by M2E when working in
Eclipse, could not the compiler ID be ignored by M2E instead of shouting
an error, or instead could it be simply a warning indicating that M2E
has no idea on how to handle this?
* I really don't like the idea that I have to modify my pom.xml to make
M2E "work". I find this totally in the opposite spirit of IDE
independence of Maven. Couldn't this be fixed in another manner (like a
setting in Eclipse or a preference somewhere?)
* Is there a way to simply remove all these Errors M2E reports (again a
setting in Eclipse, a preference somewhere)?
Anyway, thanks for your quick reply,
--
Guillaume
Post by Igor Fedorenko
Out of the box, m2e only supports maven compiler plugin with
compilerId=javac. To make it work for other compilers, compilerId=jdt in
your specific case, you need to add this explicit lifecycle mapping
configuration in your (parent) pom.xml
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<parameters>
<compilerId>jdt</compilerId>
</parameters>
</pluginExecutionFilter>
<action>
<configurator>
<id>org.eclipse.m2e.jdt.javaConfigurator</id>
</configurator>
</action>
</pluginExecution>
Please see [1] for more information about lifecycle mapping
configuration and syntax.
[1] http://wiki.eclipse.org/M2E_plugin_execution_not_covered
--
Regards,
Igor
Post by Guillaume Polet
Hi List,
I know I am not the first to ask this question, but I want to make sure
I understand correctly the error I am seeing in Eclipse with m2e 1.0.100
on all my Maven projects.
So I have a large multi-module Maven project and almost all of them show
me an error with the message "/Plugin execution not covered by lifecycle
default-compile,
phase: compile)/", and the same thing for testCompile.
I have recently modified the compiler used by m-c-p to use this one
<groupId>org.sonatype.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.11.1</version>
So, my understanding is that M2E puts an error on my pom.xml (and
therefore my project) because it does not handle directly this
configuration of the maven-compiler? Is this correct?
If yes, is not it a bit strong to put an error on this while we know
that the eclipse compiler will do the job anyway? I was quite frustrated
to see that now all my projects are marked as in error while they all work.
I can definitely not tell other developers that they first have to
select all 66 projects and go on them one by one to indicate that M2E
can safely ignore this. Could not this be simply a warning instead of an
error?
Or am I just not understanding something on the way M2E and Eclipse work
together?
Thanks in advance,
Guillaume
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Stephan Herrmann
2011-11-02 21:53:05 UTC
Permalink
Post by Igor Fedorenko
Out of the box, m2e only supports maven compiler plugin with
compilerId=javac. To make it work for other compilers, compilerId=jdt in
your specific case, you need to add this explicit lifecycle mapping
configuration in your (parent) pom.xml
As mentioned before I think it would suite the Eclipse hosted m2e
to make using the JDT compiler no more difficult than using javac.

IMHO it should actually be the default, but putting additional burdens
on those who want to use the same compiler for incremental and
full builds really feels wrong to me.

greetings from Ludwigsburg,
Stephan
Guillaume Polet
2011-11-09 09:17:28 UTC
Permalink
Hi Igor,

I have added the explicit lifecyclemapping to the root parent pom.xml
but I still get errors.
The pom.xml is as follows:
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${compiler.source}</source>
<target>${compiler.target}</target>
<encoding>${source.encoding}</encoding>
<fork>false</fork>
<maxmem>1024</maxmem>
<compilerId>jdt</compilerId>
<lifecycleMappingMetadata>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<parameters>
<compilerId>jdt</compilerId>
</parameters>
</pluginExecutionFilter>
<action>
<configurator>
<id>org.eclipse.m2e.jdt.javaConfigurator</id>
</configurator>
</action>
</pluginExecution>
</lifecycleMappingMetadata>
</configuration>
<dependencies>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.13.0</version>
</dependency>
</dependencies>
</plugin>

If you need the whole pom, it can be found here:
https://github.com/agilebirds/openflexo/blob/master/pom.xml
I tried to look on m2e website to find more info, but weirdly the
recommended way is the less documented one.

Cheers,
Guillaume
Post by Igor Fedorenko
Out of the box, m2e only supports maven compiler plugin with
compilerId=javac. To make it work for other compilers, compilerId=jdt in
your specific case, you need to add this explicit lifecycle mapping
configuration in your (parent) pom.xml
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<parameters>
<compilerId>jdt</compilerId>
</parameters>
</pluginExecutionFilter>
<action>
<configurator>
<id>org.eclipse.m2e.jdt.javaConfigurator</id>
</configurator>
</action>
</pluginExecution>
Please see [1] for more information about lifecycle mapping
configuration and syntax.
[1] http://wiki.eclipse.org/M2E_plugin_execution_not_covered
--
Regards,
Igor
Post by Guillaume Polet
Hi List,
I know I am not the first to ask this question, but I want to make sure
I understand correctly the error I am seeing in Eclipse with m2e 1.0.100
on all my Maven projects.
So I have a large multi-module Maven project and almost all of them show
me an error with the message "/Plugin execution not covered by lifecycle
default-compile,
phase: compile)/", and the same thing for testCompile.
I have recently modified the compiler used by m-c-p to use this one
<groupId>org.sonatype.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.11.1</version>
So, my understanding is that M2E puts an error on my pom.xml (and
therefore my project) because it does not handle directly this
configuration of the maven-compiler? Is this correct?
If yes, is not it a bit strong to put an error on this while we know
that the eclipse compiler will do the job anyway? I was quite frustrated
to see that now all my projects are marked as in error while they all work.
I can definitely not tell other developers that they first have to
select all 66 projects and go on them one by one to indicate that M2E
can safely ignore this. Could not this be simply a warning instead of an
error?
Or am I just not understanding something on the way M2E and Eclipse work
together?
Thanks in advance,
Guillaume
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Igor Fedorenko
2011-11-09 10:19:38 UTC
Permalink
The easiest way to setup custom lifecycle mapping is to use "ignore"
quickfix, then change action to whatever you need. See attached working
example.

Btw, maxmem is ignored is ignored when fork=false.

--
Regards,
Igor
Post by Guillaume Polet
Hi Igor,
I have added the explicit lifecyclemapping to the root parent pom.xml
but I still get errors.
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${compiler.source}</source>
<target>${compiler.target}</target>
<encoding>${source.encoding}</encoding>
<fork>false</fork>
<maxmem>1024</maxmem>
<compilerId>jdt</compilerId>
<lifecycleMappingMetadata>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<parameters>
<compilerId>jdt</compilerId>
</parameters>
</pluginExecutionFilter>
<action>
<configurator>
<id>org.eclipse.m2e.jdt.javaConfigurator</id>
</configurator>
</action>
</pluginExecution>
</lifecycleMappingMetadata>
</configuration>
<dependencies>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.13.0</version>
</dependency>
</dependencies>
</plugin>
https://github.com/agilebirds/openflexo/blob/master/pom.xml
I tried to look on m2e website to find more info, but weirdly the
recommended way is the less documented one.
Cheers,
Guillaume
Post by Igor Fedorenko
Out of the box, m2e only supports maven compiler plugin with
compilerId=javac. To make it work for other compilers, compilerId=jdt in
your specific case, you need to add this explicit lifecycle mapping
configuration in your (parent) pom.xml
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<parameters>
<compilerId>jdt</compilerId>
</parameters>
</pluginExecutionFilter>
<action>
<configurator>
<id>org.eclipse.m2e.jdt.javaConfigurator</id>
</configurator>
</action>
</pluginExecution>
Please see [1] for more information about lifecycle mapping
configuration and syntax.
[1] http://wiki.eclipse.org/M2E_plugin_execution_not_covered
--
Regards,
Igor
Post by Guillaume Polet
Hi List,
I know I am not the first to ask this question, but I want to make sure
I understand correctly the error I am seeing in Eclipse with m2e 1.0.100
on all my Maven projects.
So I have a large multi-module Maven project and almost all of them show
me an error with the message "/Plugin execution not covered by lifecycle
default-compile,
phase: compile)/", and the same thing for testCompile.
I have recently modified the compiler used by m-c-p to use this one
<groupId>org.sonatype.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.11.1</version>
So, my understanding is that M2E puts an error on my pom.xml (and
therefore my project) because it does not handle directly this
configuration of the maven-compiler? Is this correct?
If yes, is not it a bit strong to put an error on this while we know
that the eclipse compiler will do the job anyway? I was quite frustrated
to see that now all my projects are marked as in error while they all work.
I can definitely not tell other developers that they first have to
select all 66 projects and go on them one by one to indicate that M2E
can safely ignore this. Could not this be simply a warning instead of an
error?
Or am I just not understanding something on the way M2E and Eclipse work
together?
Thanks in advance,
Guillaume
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Guillaume Polet
2011-11-09 12:07:22 UTC
Permalink
Yeah thanks Igor. The maxmem is a left over if various attempts to fix
my build for other reasons.

Regarding m2e dev, I will be looking more in depth at your remarks this
week-end.

Cheers,
Guillaume
Post by Igor Fedorenko
The easiest way to setup custom lifecycle mapping is to use "ignore"
quickfix, then change action to whatever you need. See attached working
example.
Btw, maxmem is ignored is ignored when fork=false.
--
Regards,
Igor
Post by Guillaume Polet
Hi Igor,
I have added the explicit lifecyclemapping to the root parent pom.xml
but I still get errors.
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${compiler.source}</source>
<target>${compiler.target}</target>
<encoding>${source.encoding}</encoding>
<fork>false</fork>
<maxmem>1024</maxmem>
<compilerId>jdt</compilerId>
<lifecycleMappingMetadata>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<parameters>
<compilerId>jdt</compilerId>
</parameters>
</pluginExecutionFilter>
<action>
<configurator>
<id>org.eclipse.m2e.jdt.javaConfigurator</id>
</configurator>
</action>
</pluginExecution>
</lifecycleMappingMetadata>
</configuration>
<dependencies>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.13.0</version>
</dependency>
</dependencies>
</plugin>
https://github.com/agilebirds/openflexo/blob/master/pom.xml
I tried to look on m2e website to find more info, but weirdly the
recommended way is the less documented one.
Cheers,
Guillaume
Post by Igor Fedorenko
Out of the box, m2e only supports maven compiler plugin with
compilerId=javac. To make it work for other compilers,
compilerId=jdt in
your specific case, you need to add this explicit lifecycle mapping
configuration in your (parent) pom.xml
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<parameters>
<compilerId>jdt</compilerId>
</parameters>
</pluginExecutionFilter>
<action>
<configurator>
<id>org.eclipse.m2e.jdt.javaConfigurator</id>
</configurator>
</action>
</pluginExecution>
Please see [1] for more information about lifecycle mapping
configuration and syntax.
[1] http://wiki.eclipse.org/M2E_plugin_execution_not_covered
--
Regards,
Igor
Post by Guillaume Polet
Hi List,
I know I am not the first to ask this question, but I want to make sure
I understand correctly the error I am seeing in Eclipse with m2e 1.0.100
on all my Maven projects.
So I have a large multi-module Maven project and almost all of them show
me an error with the message "/Plugin execution not covered by lifecycle
default-compile,
phase: compile)/", and the same thing for testCompile.
I have recently modified the compiler used by m-c-p to use this one
<groupId>org.sonatype.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.11.1</version>
So, my understanding is that M2E puts an error on my pom.xml (and
therefore my project) because it does not handle directly this
configuration of the maven-compiler? Is this correct?
If yes, is not it a bit strong to put an error on this while we know
that the eclipse compiler will do the job anyway? I was quite frustrated
to see that now all my projects are marked as in error while they all work.
I can definitely not tell other developers that they first have to
select all 66 projects and go on them one by one to indicate that M2E
can safely ignore this. Could not this be simply a warning instead of an
error?
Or am I just not understanding something on the way M2E and Eclipse work
together?
Thanks in advance,
Guillaume
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Bjørn Willy Arntzen
2011-11-10 07:48:04 UTC
Permalink
I'm running RAD 8.0.3 with m2e v1.1.0.20111108-0328, m2e wtp 0.14.0.20110928-2045

And I still get the validation error

Broken single-root rule: Only one <wb-resource> element with a deploy path of "/" is allowed for a web project org.eclipse.wst.common.component /nettpensjon-bp-service-web/.settings
I this it's because of the duplication of deploy-path="/"

Here's the org.eclipse.wst.common.component file :

<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="nettpensjon-bp-service-web">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
<dependent-module archiveName="nettpensjon-bp-service-core-1.0.9-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/nettpensjon-bp-service-core/nettpensjon-bp-service-core">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="nettpensjon-bp-service-web"/>
<property name="java-output-path" value="/nettpensjon-bp-service-web/target/classes"/>
</wb-module>
</project-modules>


How can I avoid this ?

Med vennlig hilsen

Bjørn Willy Arntzen
Seniorkonsulent
[cid:***@01CC9F84.8EAFB100]

Kommunal Landspensjonskasse gjensidig forsikringsselskap
Dronning Eufemias gate 10, 0191 Oslo, Pb 400, Sentrum, 0103 Oslo
Mob: +4797759007
www.klp.no<http://www.klp.no>
Fred Bricon
2011-11-10 07:51:39 UTC
Permalink
You can workaround that issue, if you're not using web resource filtering :
https://github.com/sonatype/m2eclipse-wtp/wiki/That-web-resources-folder-is-causing-me-some-trouble,-can-i-get-rid-of-it%3F

HIH

Fred Bricon
I’m running RAD 8.0.3 with m2e v1.1.0.20111108-0328, m2e wtp
0.14.0.20110928-2045****
** **
And I still get the validation error ****
** **
Broken single-root rule: Only one <wb-resource> element with a deploy path
of "/" is allowed for a web project
org.eclipse.wst.common.component
/nettpensjon-bp-service-web/.settings ****
I this it’s because of the duplication of deploy-path=*"/"*****
** **
Here’s the org.eclipse.wst.common.component file :****
** **
<?xml version=*"1.0"* encoding=*"UTF-8"*?><project-modules id=*
"moduleCoreId"* project-version=*"1.5.0"*>****
<wb-module deploy-name=*"nettpensjon-bp-service-web"*>****
<wb-resource deploy-path=*"/"* source-path=*
"/target/m2e-wtp/web-resources"*/>****
<wb-resource deploy-path=*"/"* source-path=*"/src/main/webapp"*/>*
***
<wb-resource deploy-path=*"/WEB-INF/classes"* source-path=*
"/src/main/java"*/>****
<wb-resource deploy-path=*"/WEB-INF/classes"* source-path=*
"/src/main/resources"*/>****
<wb-resource deploy-path=*"/WEB-INF/classes"* source-path=*
"/src/test/resources"*/>****
<wb-resource deploy-path=*"/WEB-INF/classes"* source-path=*
"/src/test/java"*/>****
<dependent-module archiveName=*
"nettpensjon-bp-service-core-1.0.9-SNAPSHOT.jar"* deploy-path=*
"/WEB-INF/lib"* handle=*
"module:/resource/nettpensjon-bp-service-core/nettpensjon-bp-service-core"
*>****
<dependency-type>uses</dependency-type>****
</dependent-module>****
<property name=*"context-root"* value=*
"nettpensjon-bp-service-web"*/>****
<property name=*"java-output-path"* value=*
"/nettpensjon-bp-service-web/target/classes"*/>****
</wb-module>****
</project-modules>****
** **
** **
How can I avoid this ? ****
** **
Med vennlig hilsen
*BjÞrn Willy Arntzen**
*Seniorkonsulent****
***
**Kommunal Landspensjonskasse *gjensidig forsikringsselskap
Dronning Eufemias gate 10, 0191 Oslo, Pb 400, Sentrum, 0103 Oslo
Mob: +4797759007
www.klp.no
****
** **
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
Bjørn-Willy Arntzen
2012-01-13 10:21:16 UTC
Permalink
Actually there is two issues attached to this. The other is:

Broken single-root rule: A project must have exactly one output folder historikk-service-web , Unknown , Project Structure Marker

And that is easily fixed by manually go into the web-project properties and change default output folder from historikk-service-web/target/classes to historikk-service-web/src/main/webapp/WEB-INF/classes but it’s so boring to do that every time I do Maven Update Project Configuration.

Is there a way to get me2-wtp to set it correct everytime it runs Update Project Configuration ?

Med vennlig hilsen

BjÞrn Willy Arntzen

Fra: m2e-users-***@eclipse.org [mailto:m2e-users-***@eclipse.org] PÃ¥ vegne av Fred Bricon
Sendt: 10. november 2011 08:52
Til: Maven Integration for Eclipse users mailing list
Emne: Re: [m2e-users] Broken single root rule i RAD 8

You can workaround that issue, if you're not using web resource filtering :
https://github.com/sonatype/m2eclipse-wtp/wiki/That-web-resources-folder-is-causing-me-some-trouble,-can-i-get-rid-of-it%3F

HIH

Fred Bricon
2011/11/10 BjÞrn Willy Arntzen <Bjorn-***@klp.no<mailto:Bjorn-***@klp.no>>
I’m running RAD 8.0.3 with m2e v1.1.0.20111108-0328, m2e wtp 0.14.0.20110928-2045

And I still get the validation error

Broken single-root rule: Only one <wb-resource> element with a deploy path of "/" is allowed for a web project org.eclipse.wst.common.component /nettpensjon-bp-service-web/.settings
I this it’s because of the duplication of deploy-path="/"

Here’s the org.eclipse.wst.common.component file :

<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="nettpensjon-bp-service-web">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
<dependent-module archiveName="nettpensjon-bp-service-core-1.0.9-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/nettpensjon-bp-service-core/nettpensjon-bp-service-core">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="nettpensjon-bp-service-web"/>
<property name="java-output-path" value="/nettpensjon-bp-service-web/target/classes"/>
</wb-module>
</project-modules>


How can I avoid this ?

Med vennlig hilsen

BjÞrn Willy Arntzen
Seniorkonsulent
[cid:***@01CCD1E5.4E300E70]

Kommunal Landspensjonskasse gjensidig forsikringsselskap
Dronning Eufemias gate 10, 0191 Oslo, Pb 400, Sentrum, 0103 Oslo
Mob: +4797759007<tel:%2B4797759007>
www.klp.no<http://www.klp.no>



_______________________________________________
m2e-users mailing list
m2e-***@eclipse.org<mailto:m2e-***@eclipse.org>
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
Marcel Schutte
2012-01-13 11:06:42 UTC
Permalink
Hi,

In your pom, you can set the <outputDirectory> to your ....WEB-INF/classes,
that will be picked up by m2e. Ofcourse your should make sure to exclude
them from your version control.

Regards, Marcel
Actually there is two issues attached to this. The other is:****
** **
Broken single-root rule: A project must have exactly one output folder
historikk-service-web , Unknown , Project Structure Marker****
** **
And that is easily fixed by manually go into the web-project properties
and change default output folder from historikk-service-web/target/classes
to historikk-service-web/src/main/webapp/WEB-INF/classes but it’s so boring
to do that every time I do Maven Update Project Configuration.****
** **
Is there a way to get me2-wtp to set it correct everytime it runs Update
Project Configuration ?****
** **
Med vennlig hilsen
*Bjørn Willy Arntzen**
*****
*På vegne av* Fred Bricon
*Sendt:* 10. november 2011 08:52
*Til:* Maven Integration for Eclipse users mailing list
*Emne:* Re: [m2e-users] Broken single root rule i RAD 8****
** **
You can workaround that issue, if you're not using web resource filtering
: ****
https://github.com/sonatype/m2eclipse-wtp/wiki/That-web-resources-folder-is-causing-me-some-trouble,-can-i-get-rid-of-it%3F
****
** **
HIH****
** **
Fred Bricon****
I’m running RAD 8.0.3 with m2e v1.1.0.20111108-0328, m2e wtp
0.14.0.20110928-2045****
****
And I still get the validation error ****
****
Broken single-root rule: Only one <wb-resource> element with a deploy path
of "/" is allowed for a web project
org.eclipse.wst.common.component
/nettpensjon-bp-service-web/.settings ****
I this it’s because of the duplication of deploy-path=*"/"*****
****
Here’s the org.eclipse.wst.common.component file :****
****
<?xml version=*"1.0"* encoding=*"UTF-8"*?><project-modules id=*
"moduleCoreId"* project-version=*"1.5.0"*>****
<wb-module deploy-name=*"nettpensjon-bp-service-web"*>****
<wb-resource deploy-path=*"/"* source-path=*
"/target/m2e-wtp/web-resources"*/>****
<wb-resource deploy-path=*"/"* source-path=*"/src/main/webapp"*/>*
***
<wb-resource deploy-path=*"/WEB-INF/classes"* source-path=*
"/src/main/java"*/>****
<wb-resource deploy-path=*"/WEB-INF/classes"* source-path=*
"/src/main/resources"*/>****
<wb-resource deploy-path=*"/WEB-INF/classes"* source-path=*
"/src/test/resources"*/>****
<wb-resource deploy-path=*"/WEB-INF/classes"* source-path=*
"/src/test/java"*/>****
<dependent-module archiveName=*
"nettpensjon-bp-service-core-1.0.9-SNAPSHOT.jar"* deploy-path=*
"/WEB-INF/lib"* handle=*
"module:/resource/nettpensjon-bp-service-core/nettpensjon-bp-service-core"
*>****
<dependency-type>uses</dependency-type>****
</dependent-module>****
<property name=*"context-root"* value=*
"nettpensjon-bp-service-web"*/>****
<property name=*"java-output-path"* value=*
"/nettpensjon-bp-service-web/target/classes"*/>****
</wb-module>****
</project-modules>****
****
****
How can I avoid this ? ****
****
Med vennlig hilsen
*Bjørn Willy Arntzen
*Seniorkonsulent****
*
Kommunal Landspensjonskasse *gjensidig forsikringsselskap
Dronning Eufemias gate 10, 0191 Oslo, Pb 400, Sentrum, 0103 Oslo
Mob: +4797759007
www.klp.no
****
****
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users****
****
** **
--
"Have you tried turning it off and on again" - The IT Crowd****
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
Fotografie
http://schutte.name/
Bjørn-Willy Arntzen
2012-01-13 12:12:24 UTC
Permalink
Are you really shure about that?
outputDirectory: The directory for the generated WAR.
I need to set the Java Build Path Default output folder, not the generated output
This did not change the 'Default output folder' :
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-alpha-2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
<outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
</configuration>
</plugin>

Med vennlig hilsen

Bjørn Willy Arntzen
Seniorkonsulent


Kommunal Landspensjonskasse gjensidig forsikringsselskap
Dronning Eufemias gate 10, 0191 Oslo, Pb 400, Sentrum, 0103 Oslo
Mob: +4797759007
www.klp.no<http://www.klp.no>

Vennligst tenk på miljøet før du skriver ut denne e-posten
Fra: m2e-users-***@eclipse.org [mailto:m2e-users-***@eclipse.org] På vegne av Marcel Schutte
Sendt: 13. januar 2012 12:07
Til: Maven Integration for Eclipse users mailing list
Emne: Re: [m2e-users] Broken single root rule i RAD 8

Hi,

In your pom, you can set the <outputDirectory> to your ....WEB-INF/classes, that will be picked up by m2e. Ofcourse your should make sure to exclude them from your version control.

Regards, Marcel
2012/1/13 Bjørn-Willy Arntzen <Bjorn-***@klp.no<mailto:Bjorn-***@klp.no>>
Actually there is two issues attached to this. The other is:

Broken single-root rule: A project must have exactly one output folder historikk-service-web , Unknown , Project Structure Marker

And that is easily fixed by manually go into the web-project properties and change default output folder from historikk-service-web/target/classes to historikk-service-web/src/main/webapp/WEB-INF/classes but it's so boring to do that every time I do Maven Update Project Configuration.

Is there a way to get me2-wtp to set it correct everytime it runs Update Project Configuration ?

Med vennlig hilsen

Bjørn Willy Arntzen
Fra: m2e-users-***@eclipse.org<mailto:m2e-users-***@eclipse.org> [mailto:m2e-users-***@eclipse.org<mailto:m2e-users-***@eclipse.org>] På vegne av Fred Bricon
Sendt: 10. november 2011 08:52
Til: Maven Integration for Eclipse users mailing list
Emne: Re: [m2e-users] Broken single root rule i RAD 8

You can workaround that issue, if you're not using web resource filtering :
https://github.com/sonatype/m2eclipse-wtp/wiki/That-web-resources-folder-is-causing-me-some-trouble,-can-i-get-rid-of-it%3F

HIH

Fred Bricon
2011/11/10 Bjørn Willy Arntzen <Bjorn-***@klp.no<mailto:Bjorn-***@klp.no>>
I'm running RAD 8.0.3 with m2e v1.1.0.20111108-0328, m2e wtp 0.14.0.20110928-2045

And I still get the validation error

Broken single-root rule: Only one <wb-resource> element with a deploy path of "/" is allowed for a web project org.eclipse.wst.common.component /nettpensjon-bp-service-web/.settings
I this it's because of the duplication of deploy-path="/"

Here's the org.eclipse.wst.common.component file :

<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="nettpensjon-bp-service-web">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
<dependent-module archiveName="nettpensjon-bp-service-core-1.0.9-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/nettpensjon-bp-service-core/nettpensjon-bp-service-core">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="nettpensjon-bp-service-web"/>
<property name="java-output-path" value="/nettpensjon-bp-service-web/target/classes"/>
</wb-module>
</project-modules>


How can I avoid this ?

Med vennlig hilsen

Bjørn Willy Arntzen
Seniorkonsulent
[cid:***@01CCD1F3.A24DD650]

Kommunal Landspensjonskasse gjensidig forsikringsselskap
Dronning Eufemias gate 10, 0191 Oslo, Pb 400, Sentrum, 0103 Oslo
Mob: +4797759007<tel:%2B4797759007>
www.klp.no<http://www.klp.no>


_______________________________________________
m2e-users mailing list
m2e-***@eclipse.org<mailto:m2e-***@eclipse.org>
https://dev.eclipse.org/mailman/listinfo/m2e-users



--
"Have you tried turning it off and on again" - The IT Crowd

_______________________________________________
m2e-users mailing list
m2e-***@eclipse.org<mailto:m2e-***@eclipse.org>
https://dev.eclipse.org/mailman/listinfo/m2e-users



--
Fotografie
http://schutte.name/
Marcel Schutte
2012-01-13 12:28:13 UTC
Permalink
It's not the maven-war-plugin config, but the direct descendant of the
<build> tag.
Are you really shure about that?****
*outputDirectory**: *The directory for the generated WAR.****
I need to set the Java Build Path Default output folder, not the generated
output****
This did not change the ‘Default output folder’ :****
<plugin>****
<artifactId>*maven*-war-*plugin*</artifactId>****
*<**version**>**2.1-alpha-2**</**version**>*****
<configuration>****
<archive>****
<manifest>****
<addClasspath>true</addClasspath>****
</manifest>****
</archive>****
<outputDirectory>*src*/main/*webapp*/WEB-INF/classes</
outputDirectory>****
</configuration>****
</plugin>****
** **
Med vennlig hilsen
*Bjørn Willy Arntzen**
*Seniorkonsulent****
*
*
*Kommunal Landspensjonskasse *gjensidig forsikringsselskap
Dronning Eufemias gate 10, 0191 Oslo, Pb 400, Sentrum, 0103 Oslo
Mob: +4797759007
www.klp.no
*Vennligst tenk på miljøet før du skriver ut denne e-posten*****
*Sendt:* 13. januar 2012 12:07
*Til:* Maven Integration for Eclipse users mailing list
*Emne:* Re: [m2e-users] Broken single root rule i RAD 8****
** **
Hi,****
** **
In your pom, you can set the <outputDirectory> to your
....WEB-INF/classes, that will be picked up by m2e. Ofcourse your should
make sure to exclude them from your version control.****
** **
Regards, Marcel****
Actually there is two issues attached to this. The other is:****
****
Broken single-root rule: A project must have exactly one output folder
historikk-service-web , Unknown , Project Structure Marker****
****
And that is easily fixed by manually go into the web-project properties
and change default output folder from historikk-service-web/target/classes
to historikk-service-web/src/main/webapp/WEB-INF/classes but it’s so boring
to do that every time I do Maven Update Project Configuration.****
****
Is there a way to get me2-wtp to set it correct everytime it runs Update
Project Configuration ?****
****
Med vennlig hilsen
*Bjørn Willy Arntzen*****
*På vegne av* Fred Bricon
*Sendt:* 10. november 2011 08:52
*Til:* Maven Integration for Eclipse users mailing list
*Emne:* Re: [m2e-users] Broken single root rule i RAD 8****
****
You can workaround that issue, if you're not using web resource filtering
: ****
https://github.com/sonatype/m2eclipse-wtp/wiki/That-web-resources-folder-is-causing-me-some-trouble,-can-i-get-rid-of-it%3F
****
****
HIH****
****
Fred Bricon****
I’m running RAD 8.0.3 with m2e v1.1.0.20111108-0328, m2e wtp
0.14.0.20110928-2045****
****
And I still get the validation error ****
****
Broken single-root rule: Only one <wb-resource> element with a deploy path
of "/" is allowed for a web project
org.eclipse.wst.common.component
/nettpensjon-bp-service-web/.settings ****
I this it’s because of the duplication of deploy-path=*"/"*****
****
Here’s the org.eclipse.wst.common.component file :****
****
<?xml version=*"1.0"* encoding=*"UTF-8"*?><project-modules id=*
"moduleCoreId"* project-version=*"1.5.0"*>****
<wb-module deploy-name=*"nettpensjon-bp-service-web"*>****
<wb-resource deploy-path=*"/"* source-path=*
"/target/m2e-wtp/web-resources"*/>****
<wb-resource deploy-path=*"/"* source-path=*"/src/main/webapp"*/>*
***
<wb-resource deploy-path=*"/WEB-INF/classes"* source-path=*
"/src/main/java"*/>****
<wb-resource deploy-path=*"/WEB-INF/classes"* source-path=*
"/src/main/resources"*/>****
<wb-resource deploy-path=*"/WEB-INF/classes"* source-path=*
"/src/test/resources"*/>****
<wb-resource deploy-path=*"/WEB-INF/classes"* source-path=*
"/src/test/java"*/>****
<dependent-module archiveName=*
"nettpensjon-bp-service-core-1.0.9-SNAPSHOT.jar"* deploy-path=*
"/WEB-INF/lib"* handle=*
"module:/resource/nettpensjon-bp-service-core/nettpensjon-bp-service-core"
*>****
<dependency-type>uses</dependency-type>****
</dependent-module>****
<property name=*"context-root"* value=*
"nettpensjon-bp-service-web"*/>****
<property name=*"java-output-path"* value=*
"/nettpensjon-bp-service-web/target/classes"*/>****
</wb-module>****
</project-modules>****
****
****
How can I avoid this ? ****
****
Med vennlig hilsen
*Bjørn Willy Arntzen
*Seniorkonsulent****
*
Kommunal Landspensjonskasse *gjensidig forsikringsselskap
Dronning Eufemias gate 10, 0191 Oslo, Pb 400, Sentrum, 0103 Oslo
Mob: +4797759007
www.klp.no****
****
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users****
****
****
--
"Have you tried turning it off and on again" - The IT Crowd****
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users****
****
** **
--
Fotografie
http://schutte.name/****
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
Fotografie
http://schutte.name/
Bjørn-Willy Arntzen
2012-01-13 13:11:52 UTC
Permalink
Hmm, that seems to work. Great !


<build>
<outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-alpha-2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>

...
...
...

Med vennlig hilsen

Bjørn Willy Arntzen
Seniorkonsulent


Kommunal Landspensjonskasse gjensidig forsikringsselskap
Dronning Eufemias gate 10, 0191 Oslo, Pb 400, Sentrum, 0103 Oslo
Mob: +4797759007
www.klp.no<http://www.klp.no>

Vennligst tenk på miljøet før du skriver ut denne e-posten
Fra: m2e-users-***@eclipse.org [mailto:m2e-users-***@eclipse.org] På vegne av Marcel Schutte
Sendt: 13. januar 2012 13:28
Til: Maven Integration for Eclipse users mailing list
Emne: Re: [m2e-users] Broken single root rule i RAD 8

It's not the maven-war-plugin config, but the direct descendant of the <build> tag.
2012/1/13 Bjørn-Willy Arntzen <Bjorn-***@klp.no<mailto:Bjorn-***@klp.no>>
Are you really shure about that?
outputDirectory: The directory for the generated WAR.
I need to set the Java Build Path Default output folder, not the generated output
This did not change the 'Default output folder' :
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-alpha-2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
<outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
</configuration>
</plugin>

Med vennlig hilsen

Bjørn Willy Arntzen
Seniorkonsulent

Kommunal Landspensjonskasse gjensidig forsikringsselskap
Dronning Eufemias gate 10, 0191 Oslo, Pb 400, Sentrum, 0103 Oslo
Mob: +4797759007<tel:%2B4797759007>
www.klp.no<http://www.klp.no>
Vennligst tenk på miljøet før du skriver ut denne e-posten
Fra: m2e-users-***@eclipse.org<mailto:m2e-users-***@eclipse.org> [mailto:m2e-users-***@eclipse.org<mailto:m2e-users-***@eclipse.org>] På vegne av Marcel Schutte
Sendt: 13. januar 2012 12:07

Til: Maven Integration for Eclipse users mailing list
Emne: Re: [m2e-users] Broken single root rule i RAD 8

Hi,

In your pom, you can set the <outputDirectory> to your ....WEB-INF/classes, that will be picked up by m2e. Ofcourse your should make sure to exclude them from your version control.

Regards, Marcel
2012/1/13 Bjørn-Willy Arntzen <Bjorn-***@klp.no<mailto:Bjorn-***@klp.no>>
Actually there is two issues attached to this. The other is:

Broken single-root rule: A project must have exactly one output folder historikk-service-web , Unknown , Project Structure Marker

And that is easily fixed by manually go into the web-project properties and change default output folder from historikk-service-web/target/classes to historikk-service-web/src/main/webapp/WEB-INF/classes but it's so boring to do that every time I do Maven Update Project Configuration.

Is there a way to get me2-wtp to set it correct everytime it runs Update Project Configuration ?

Med vennlig hilsen

Bjørn Willy Arntzen
Fra: m2e-users-***@eclipse.org<mailto:m2e-users-***@eclipse.org> [mailto:m2e-users-***@eclipse.org<mailto:m2e-users-***@eclipse.org>] På vegne av Fred Bricon
Sendt: 10. november 2011 08:52
Til: Maven Integration for Eclipse users mailing list
Emne: Re: [m2e-users] Broken single root rule i RAD 8

You can workaround that issue, if you're not using web resource filtering :
https://github.com/sonatype/m2eclipse-wtp/wiki/That-web-resources-folder-is-causing-me-some-trouble,-can-i-get-rid-of-it%3F

HIH

Fred Bricon
2011/11/10 Bjørn Willy Arntzen <Bjorn-***@klp.no<mailto:Bjorn-***@klp.no>>
I'm running RAD 8.0.3 with m2e v1.1.0.20111108-0328, m2e wtp 0.14.0.20110928-2045

And I still get the validation error

Broken single-root rule: Only one <wb-resource> element with a deploy path of "/" is allowed for a web project org.eclipse.wst.common.component /nettpensjon-bp-service-web/.settings
I this it's because of the duplication of deploy-path="/"

Here's the org.eclipse.wst.common.component file :

<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="nettpensjon-bp-service-web">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
<dependent-module archiveName="nettpensjon-bp-service-core-1.0.9-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/nettpensjon-bp-service-core/nettpensjon-bp-service-core">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="nettpensjon-bp-service-web"/>
<property name="java-output-path" value="/nettpensjon-bp-service-web/target/classes"/>
</wb-module>
</project-modules>


How can I avoid this ?

Med vennlig hilsen

Bjørn Willy Arntzen
Seniorkonsulent
[cid:***@01CCD1FD.4C8E3160]

Kommunal Landspensjonskasse gjensidig forsikringsselskap
Dronning Eufemias gate 10, 0191 Oslo, Pb 400, Sentrum, 0103 Oslo
Mob: +4797759007<tel:%2B4797759007>
www.klp.no<http://www.klp.no>


_______________________________________________
m2e-users mailing list
m2e-***@eclipse.org<mailto:m2e-***@eclipse.org>
https://dev.eclipse.org/mailman/listinfo/m2e-users



--
"Have you tried turning it off and on again" - The IT Crowd

_______________________________________________
m2e-users mailing list
m2e-***@eclipse.org<mailto:m2e-***@eclipse.org>
https://dev.eclipse.org/mailman/listinfo/m2e-users



--
Fotografie
http://schutte.name/

_______________________________________________
m2e-users mailing list
m2e-***@eclipse.org<mailto:m2e-***@eclipse.org>
https://dev.eclipse.org/mailman/listinfo/m2e-users



--
Fotografie
http://schutte.name/
Fred Bricon
2012-01-22 15:15:06 UTC
Permalink
Hi,

FWIW, I've created a plugin to allow maven-compiler-plugin using
compilerId=eclipse to be used transparently with m2e (by
using org.eclipse.m2e.jdt.javaConfigurator).
Source code is available from
https://github.com/fbricon/m2e-jdt-compilerfor now (I may transfer it
to the jbosstools organization later this week),
but most importantly, you can install ci builds from this p2 update site :
http://download.jboss.org/jbosstools/builds/staging/m2e-jdt-compiler/all/repo/

Using this eclipse plugin, no new lifecycle mapping is necessary in your
pom.xml.

HIH

Fred Bricon


On Wed, Nov 9, 2011 at 1:07 PM, Guillaume Polet
Yeah thanks Igor. The maxmem is a left over if various attempts to fix my
build for other reasons.
Regarding m2e dev, I will be looking more in depth at your remarks this
week-end.
Cheers,
Guillaume
The easiest way to setup custom lifecycle mapping is to use "ignore"
quickfix, then change action to whatever you need. See attached working
example.
Btw, maxmem is ignored is ignored when fork=false.
--
Regards,
Igor
Hi Igor,
I have added the explicit lifecyclemapping to the root parent pom.xml
but I still get errors.
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${compiler.source}</source>
<target>${compiler.target}</target>
<encoding>${source.encoding}</encoding>
<fork>false</fork>
<maxmem>1024</maxmem>
<compilerId>jdt</compilerId>
<lifecycleMappingMetadata>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<parameters>
<compilerId>jdt</compilerId>
</parameters>
</pluginExecutionFilter>
<action>
<configurator>
<id>org.eclipse.m2e.jdt.javaConfigurator</id>
</configurator>
</action>
</pluginExecution>
</lifecycleMappingMetadata>
</configuration>
<dependencies>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.13.0</version>
</dependency>
</dependencies>
</plugin>
https://github.com/agilebirds/openflexo/blob/master/pom.xml
I tried to look on m2e website to find more info, but weirdly the
recommended way is the less documented one.
Cheers,
Guillaume
Out of the box, m2e only supports maven compiler plugin with
compilerId=javac. To make it work for other compilers, compilerId=jdt in
your specific case, you need to add this explicit lifecycle mapping
configuration in your (parent) pom.xml
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<parameters>
<compilerId>jdt</compilerId>
</parameters>
</pluginExecutionFilter>
<action>
<configurator>
<id>org.eclipse.m2e.jdt.javaConfigurator</id>
</configurator>
</action>
</pluginExecution>
Please see [1] for more information about lifecycle mapping
configuration and syntax.
[1] http://wiki.eclipse.org/M2E_plugin_execution_not_covered
--
Regards,
Igor
Hi List,
I know I am not the first to ask this question, but I want to make sure
I understand correctly the error I am seeing in Eclipse with m2e 1.0.100
on all my Maven projects.
So I have a large multi-module Maven project and almost all of them show
me an error with the message "/Plugin execution not covered by lifecycle
default-compile,
phase: compile)/", and the same thing for testCompile.
I have recently modified the compiler used by m-c-p to use this one
<groupId>org.sonatype.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.11.1</version>
So, my understanding is that M2E puts an error on my pom.xml (and
therefore my project) because it does not handle directly this
configuration of the maven-compiler? Is this correct?
If yes, is not it a bit strong to put an error on this while we know
that the eclipse compiler will do the job anyway? I was quite frustrated
to see that now all my projects are marked as in error while they all work.
I can definitely not tell other developers that they first have to
select all 66 projects and go on them one by one to indicate that M2E
can safely ignore this. Could not this be simply a warning instead of an
error?
Or am I just not understanding something on the way M2E and Eclipse work
together?
Thanks in advance,
Guillaume
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
Stephan Herrmann
2012-01-22 15:35:58 UTC
Permalink
Thanks, Fred, much appreciated.

Just a quick question:
Previous examples I saw used to specify a compilerId of "jdt".
What's the difference when saying "eclipse" instead of "jdt"?

thanks,
Stephan
Post by Fred Bricon
Hi,
FWIW, I've created a plugin to allow maven-compiler-plugin using
compilerId=eclipse to be used transparently with m2e (by
using org.eclipse.m2e.jdt.javaConfigurator).
Source code is available from
https://github.com/fbricon/m2e-jdt-compilerfor now (I may transfer it
to the jbosstools organization later this week),
http://download.jboss.org/jbosstools/builds/staging/m2e-jdt-compiler/all/repo/
Using this eclipse plugin, no new lifecycle mapping is necessary in your
pom.xml.
HIH
Fred Bricon
Fred Bricon
2012-01-22 15:38:17 UTC
Permalink
The "jdt" id doesn't exist, you must use "eclipse". See
http://maven.apache.org/plugins/maven-compiler-plugin/non-javac-compilers.html


On Sun, Jan 22, 2012 at 4:35 PM, Stephan Herrmann
Post by Stephan Herrmann
Thanks, Fred, much appreciated.
Previous examples I saw used to specify a compilerId of "jdt".
What's the difference when saying "eclipse" instead of "jdt"?
thanks,
Stephan
Post by Fred Bricon
Hi,
FWIW, I've created a plugin to allow maven-compiler-plugin using
compilerId=eclipse to be used transparently with m2e (by
using org.eclipse.m2e.jdt.javaConfigurator).
Source code is available from
https://github.com/fbricon/m2e-jdt-compilerfor now (I may transfer it
to the jbosstools organization later this week),
but most importantly, you can install ci builds from this p2 update site
http://download.jboss.org/jbosstools/builds/staging/m2e-jdt-compiler/all/repo/
Post by Fred Bricon
Using this eclipse plugin, no new lifecycle mapping is necessary in your
pom.xml.
HIH
Fred Bricon
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
Igor Fedorenko
2012-01-22 16:04:17 UTC
Permalink
jdt compiler id is used by tycho. I believe it uses more recent jdt compiler (3.8m4 atm), but I am not 100% sure what plexus uses.
--
Sent from my SGS
Post by Fred Bricon
The "jdt" id doesn't exist, you must use "eclipse". See
http://maven.apache.org/plugins/maven-compiler-plugin/non-javac-compilers.html
On Sun, Jan 22, 2012 at 4:35 PM, Stephan Herrmann
Post by Stephan Herrmann
Thanks, Fred, much appreciated.
Previous examples I saw used to specify a compilerId of "jdt".
What's the difference when saying "eclipse" instead of "jdt"?
thanks,
Stephan
Post by Fred Bricon
Hi,
FWIW, I've created a plugin to allow maven-compiler-plugin using
compilerId=eclipse to be used transparently with m2e (by
using org.eclipse.m2e.jdt.javaConfigurator).
Source code is available from
https://github.com/fbricon/m2e-jdt-compilerfor now (I may transfer
it
Post by Stephan Herrmann
Post by Fred Bricon
to the jbosstools organization later this week),
but most importantly, you can install ci builds from this p2 update
site
http://download.jboss.org/jbosstools/builds/staging/m2e-jdt-compiler/all/repo/
Post by Stephan Herrmann
Post by Fred Bricon
Using this eclipse plugin, no new lifecycle mapping is necessary in
your
Post by Stephan Herrmann
Post by Fred Bricon
pom.xml.
HIH
Fred Bricon
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Fred Bricon
2012-01-22 16:18:56 UTC
Permalink
OK my bad. I can add the jdt compiler id.
But since it's used by tycho, should we expect possible bad interactions
with m2e-tycho?
And FYI plexus-compiler-eclipse depends on org.eclipse.jdt:core:3.3.0-v_771
Post by Igor Fedorenko
jdt compiler id is used by tycho. I believe it uses more recent jdt
compiler (3.8m4 atm), but I am not 100% sure what plexus uses.
--
Sent from my SGS
Post by Fred Bricon
The "jdt" id doesn't exist, you must use "eclipse". See
http://maven.apache.org/plugins/maven-compiler-plugin/non-javac-compilers.html
Post by Fred Bricon
On Sun, Jan 22, 2012 at 4:35 PM, Stephan Herrmann
Post by Stephan Herrmann
Thanks, Fred, much appreciated.
Previous examples I saw used to specify a compilerId of "jdt".
What's the difference when saying "eclipse" instead of "jdt"?
thanks,
Stephan
Post by Fred Bricon
Hi,
FWIW, I've created a plugin to allow maven-compiler-plugin using
compilerId=eclipse to be used transparently with m2e (by
using org.eclipse.m2e.jdt.javaConfigurator).
Source code is available from
https://github.com/fbricon/m2e-jdt-compilerfor now (I may transfer
it
Post by Stephan Herrmann
Post by Fred Bricon
to the jbosstools organization later this week),
but most importantly, you can install ci builds from this p2 update
site
http://download.jboss.org/jbosstools/builds/staging/m2e-jdt-compiler/all/repo/
Post by Fred Bricon
Post by Stephan Herrmann
Post by Fred Bricon
Using this eclipse plugin, no new lifecycle mapping is necessary in
your
Post by Stephan Herrmann
Post by Fred Bricon
pom.xml.
HIH
Fred Bricon
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
Ullrich Hafner
2012-01-25 14:02:37 UTC
Permalink
Post by Igor Fedorenko
jdt compiler id is used by tycho. I believe it uses more recent jdt compiler (3.8m4 atm), but I am not 100% sure what plexus uses.
Is it possible to use tycho to compile "normal" java projects using the
jdt compiler, i.e. packaging jar? Is there an example pom somewhere
available?

Ulli
Igor Fedorenko
2012-01-25 14:58:17 UTC
Permalink
Yes, it is possible, just add tycho-compier-jdt as maven-compiler-plugin
dependency and use compilerId=jdt.

--
Regards,
Igor
Post by Ullrich Hafner
Post by Igor Fedorenko
jdt compiler id is used by tycho. I believe it uses more recent jdt compiler (3.8m4 atm), but I am not 100% sure what plexus uses.
Is it possible to use tycho to compile "normal" java projects using the
jdt compiler, i.e. packaging jar? Is there an example pom somewhere
available?
Ulli
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Continue reading on narkive:
Loading...