m2e-wtp infers the Dynamic Web Facet from the web.xml content, if it
exists. So typically, if a web.xml says I'm 2.4, that's the facet that
m2e-wtp will try to set upon project configuration updates.

Now, if the user manually changed the facet to say 3.0, in Eclipse
preferences, but still keeps the web.xml unchanged, then m2e-wtp will try
to downgrade the facet from 3.0 to 2.4.

Few years ago, that was working fine, then WTP changed the rules, the only
authorized facet changes are described in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=393801#c5

- The enablement only considers valid change operations:
   + EAR facet can be upgraded from 1.4 to any version until 6.0 and
from 5.0 to 6.0.
   + AppClient facet can be upgraded from 1.4 to any version until 6.0
and from 5.0 to 6.0.
   + EJB facet can be upgraded from 2.1 to any version until 3.1 and
from 3.0 to 3.1.
   + Web facet can be upgraded from 2.4 to any version until 3.0 and
from 2.5 to 3.0.
   + Connector facet can be upgraded from 1.5 to 1.6.

Downgrading is forbidden. And I reckon this is unfortunate.

As an improvement, I guess m2e-wtp, could just display a warning in case a
forbidden Facet change is detected, and just not perform it.

You can file a bug in
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=M2E-WTP

Fred






On Wed, Sep 23, 2015 at 10:00 AM, Mickael Istria <[email protected]> wrote:

> Hi,
>
> A user on Eclipse IRC channel at Freenode have been facing an issue with a
> persistent " Cannot change version of project facet Dynamic Web Module to
> 2.4" error on his Maven JEE project. Apparently, it seems to be a very
> usual issue in m2e-wtp
> http://stackoverflow.com/questions/18122336/cannot-change-version-of-project-facet-dynamic-web-module-to-3-0/18632054#18632054
> . The amount of votes and answers is very high for an Eclipse IDE related
> question.
> Is there a bugzilla entry related to this issue? Is there already
> something in place to fix it? At least, it seems like users are really in
> need a guidance in such case, could some quick-fixes help ?
>
> Cheers,
> --
> Mickael Istria
> Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
> My blog <http://mickaelistria.wordpress.com> - My Tweets
> <http://twitter.com/mickaelistria>
>
> _______________________________________________
> m2e-wtp-dev mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/m2e-wtp-dev
>



-- 
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-wtp-dev mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-wtp-dev

Reply via email to