Discussion:
Management of version 2.5 of Dynamic web module
ADIL KELLOUAI
17 years ago
Permalink
Hello,
It's my first use of m2eclipse plugin. I want to create a wtp project for
jsf using the myfaces artifact. The project is well created but the dynamic
web module version is 2.4. I need the 2.5 version. How can I switch to it. I
try to do it by changing the project facte but this operation is not
possible.
Any help is appreciated. Thank you.

Adil
Fred Bricon
17 years ago
Permalink
Hi Adil,

This is a WTP limitation. You cannot change the facet version of Web,
Ear, Ejb (and probably JCA) projects.

An immediate solution would be to delete your project in eclipse (not
the content), then outside eclipse, remove .classpath, .settings and
.project
Make sure you have a 2.5 web.xml in src\main\webapp\WEB-INF. It's the
most important part, as the web project facet is based on it.

Then you'll need to specifically set the maven-compiler-plugin version
to 1.5 in your pom.xml. If it is not already done, add the following :
<build>
...
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
...
</plugins>
</build>

then import your project back in WTP.

Alternatively you can set the maven-compiler-plugin after your project
is imported, but then you'd have to
left-click on the project, choose Maven > Update Configuration

Hope that helps.


regards,

Fred Bricon
Post by ADIL KELLOUAI
Hello,
It's my first use of m2eclipse plugin. I want to create a wtp project for
jsf using the myfaces artifact. The project is well created but the dynamic
web module version is 2.4. I need the 2.5 version. How can I switch to it. I
try to do it by changing the project facte but this operation is not
possible.
Any help is appreciated. Thank you.
Adil
--
GMail rox!
ADIL KELLOUAI
17 years ago
Permalink
Ok, it's working.
BTW, The jsf facet is not automatically loaded but it's possible to add it
without problem in the project facets.
thank you for your help.
Regards,
Adil
...
Fred Bricon
17 years ago
Permalink
Indeed, JSF Facet is not supported by m2eclipse.
As of 0.9.6, only Dynamic Web, Utility Project and Java Facet are
supported, AFAICT. 0.9.7 will add EJB and EAR Facet, eventually.
Other facets can be manually set.

regards,

Fred Bricon
...
--
GMail rox!
Eugene Kuleshov
17 years ago
Permalink
I wonder if we could activate jsf facet (and maybe some others) based
on the presence of some dependencies. Would be great if someone would
submit a jira issue and provided a test project for that.

Thanks

Eugene
...
Carsten Pieper
17 years ago
Permalink
Hi all,

lest anyone wonders, I originally asked a similar question in another forum
(http://www.nabble.com/Integrating-MyFaces-in-RichFaces-VE-tt19569077.html#a19626285),
but this forum here might indeed be the more appropriate place. So here
goes:

I tried to follow Fred's advice to "wtp-enable" an existing Maven2 / MyFaces
project.
Alas, it didn't work for me (still no Project Facets among the project
Properties...).
Most probably I missed something, cause it worked for Adil...
Post by Fred Bricon
Make sure you have a 2.5 web.xml in src\main\webapp\WEB-INF. It's the
most important part, as the web project facet is based on it.
Hm, does that mean more than changing the "version" attribute in the
web.xml's
"web-app" tag from 2.4 to 2.5 (and adjusting the "xsi:schemaLocation"
attribute
to 2.5, too)? Or are there more changes to apply (compared to the old 2.4
web.xml)?

Thanks in advance, Carsten
...
--
View this message in context: http://www.nabble.com/Management-of-version-2.5-of-Dynamic-web-module-tp19529627p19627731.html
Sent from the Maven Eclipse - User mailing list archive at Nabble.com.
Fred Bricon
17 years ago
Permalink
Hi Carsten,

Indeed, your web.xml should have the following header :

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

That would be all. As I said : Set java compiler version, delete
project from eclipse, import it back. That should do the trick.

Could you describe how you create your webapp? Do you use an
archetype? which one?

regards,

Fred Bricon


On Tue, Sep 23, 2008 at 3:31 PM, Carsten Pieper
...
--
GMail rox!
Fred Bricon
17 years ago
Permalink
FIY, I just created a trinidad-based web project with
org.apache.myfaces.buildtools:myfaces-archetype-trinidad 1.0.1
Following the steps I described in my previous posts, I managed to
turn the project into Dynamic Web Project 2.5, added JSF 1.2 Facet.
The tag registry view shows Myfaces, Trinidad, JSTL and JSF tag libs.
The project deployed on Tomcat 6 like a breeze.

regards,

Fred Bricon
...
--
GMail rox!
Carsten Pieper
17 years ago
Permalink
Hello Fred,

thanks for your quick answer and sorry for my late reply (have been on sick
leave
for the rest of last week...).
Post by Fred Bricon
Could you describe how you create your webapp? Do you use an
archetype? which one?
Yes, we use an archetype, a homegrown one...

However, my colleagues have solved our problems in the meantime (don't
know any details yet). If the solution is related to this thread, I'll drop
a note...

Thanks for your efforts,
Carsten
...
--
View this message in context: http://www.nabble.com/Management-of-version-2.5-of-Dynamic-web-module-tp19529627p19718987.html
Sent from the Maven Eclipse - User mailing list archive at Nabble.com.
Continue reading on narkive:
Loading...