I have tried to import the photoalbum application from
http://jboss.org/downloading/?projectId=jbossrichfaces&url=http://dow...
to Eclipse.
There are a few issues related to m2eclipse and WTP.
In order to import the application to Eclipse and configure it to work
with m2eclipse and JBoss Tools, it is necessary to do the following:
1. ejb, ear, web modules
- change the names of the modules to:
photoalbum-ear
photoalbum-ejb
photoalbum-web
2. ear module
- set the version to 5 in maven-ear-plugin
- set photoalbum-ear final-name to photoalbum-ear and add bundleFileName
to the web and ejb module of maven-ear-plugin - obliged because the WTP
deployer ignores deployName - see
https://jira.jboss.org/jira/browse/JBIDE-4655 i
https://issues.sonatype.org/browse/MNGECLIPSE-1564
- create application.xml and jboss-app.xml in
src/main/application/META-INF - see
https://jira.jboss.org/jira/browse/JBIDE-4809
- change context-root from photoalbum to photoalbum-web in pom.xml and
application.xml because m2eclipse ignores context-root - see
https://issues.sonatype.org/browse/MNGECLIPSE-1564
3. ejb module
- move component.properties from src/main/resources-filtered to
src/main/resources with the following contents:
#
#Mon Sep 15 14:29:32 EEST 2008
jndiPattern=photoalbum-ear/#{ejbName}/local
embeddedEjb=false
and remove src/main/resources-filtered
- remove the configuration of maven-resource-plugin
I haven't succeeded to configure Maven resource filtering within
m2eclipse. But, as it is, Maven resource filtering is unnecessary here
because I have had to change the EAR's final name.
4) There is a bug in org.jboss.tools.jsf/PostInstallJsfFacetDelegate -
this class calls IProject.refreshLocal within the facet install
procedure which, sometimes, throws an exception. Until the bug is fixed,
you can workaround it by calling Maven>Update Project Configuration on
the EAR project
In order to test importing the photoalbum application, you can do the
following:
- install/update m2eclipse >= 0.9.9.20090820
- install the latest JBoss Tools trunk
- define Seam Runtime 2.1.1.GA and the DefaultDS connection profile
(they can be set after checking out Maven projects)
- call Import>Check out Maven Projects from SCM
- select svn for SCM URL and enter
http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/photoalbum
- finish the Import wizard
You will get the photoalbum application containing the JBoss Tools settings.
Snjeza