myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Myfaces Wiki] Update of "Building With Maven" by MikeKienenberger
Date Tue, 28 Mar 2006 18:38:13 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by MikeKienenberger:

The comment on the change is:
Moved Eclipse IDE info to its own page.

  This will create a war, launch the Jetty container and it will server your project at http://localhost:8080/testApp
- ==== Adding Eclipse support ====
+ ==== IDE support ====
+ See ["Building MyFaces in your IDE"].
- Eclipse support easily can be added to the whole building process by simply executing
- mvn eclipse:eclipse from the respective dir of the pom.xml file.
- Maven2 will then generate eclipse project files and wtp compatible files for editing
- and building within eclipse.
- You might need to do an additonal mvn:install to get all the libs needed for
- the build.
- Note doing an eclipse:eclipse on the archtype project and then an additional mvn install
should be enough to have everything in place to be able to import a working eclipse project.
- For users of MyEclipse some additional adding of web project and jsf capabilities and the
alteration of the target build path might be necessary.
- ===== Eclipse setup example =====
- I was able to get this working by performing the following steps from Eclipse 3.1.1.
-  * Check out the entire myfaces repository using eclipse (
as a project
-  * Close the project
-  * Move the project directory (here-after referred to as the "myfaces checkout") outside
of my workspace directory
-  * Run "mvn install" from the command-line in the root directory of the myfaces checkout
-  * Run "mvn eclipse:eclipse" from the command-line in the root directory of the myfaces
-  * Use "Import..." -> "Existing Projects into Workspace" from eclipse, with the root
directory set to the new location of the myfaces checkout.
-  * Continue importing the 11 myfaces "projects" (the myfaces sub-projects).
- I didn't have to do anything else to have everything working, but it's possible that some
setup carried over from earlier attempts to import MyFaces (like the maven2 plugin and M2_REPO
eclipse variable).   Once all of the projects were imported, I moved them all into a workspace
group called JSF to keep everything together.  Thanks to Sean and Werner for doing all of
the hard work to figure this out.  --mkienenb
- ===== Eclipse update 2006-03-17 =====
- Starting with the 2006-03-01 creation of the myfaces-shared-impl and myfaces-shared-tomahawk,
there are additional steps needed.
-  * Add myfaces-shared-impl to myfaces-impl.
-   1. Select the "myfaces-impl" project
-   2. Right-click to properties
-   3. Choose "Java Build Path" and the "Libraries" tab
-   4. Add JAR "myfaces-shared-impl/target/myfaces-shared-impl-*-SNAPSHOT.jar".
-   5. Expand this jar item, and for source attachment, use "myfaces-shared-impl/target/myfaces-shared-impl-*-SNAPSHOT-source.jar".
-   6. Go to the order/export tab and set the checkbox for this jar.
-  * Add myfaces-shared-tomahawk to tomahawk.
-   1. Select the "tomahawk" project.
-   2. Right-click to properties.
-   3. Choose "Java Build Path" and the "Libraries" tab.
-   4. Add JAR "myfaces-shared-tomahawk/target/myfaces-shared-tomahawk-*-SNAPSHOT.jar".
-   5. Expand this jar item, and for source attachment, use "myfaces-shared-tomahawk/target/myfaces-shared-tomahawk-*-SNAPSHOT-source.jar".
-   6. Go to the order/export tab and set the checkbox for this jar.
- The reason for this additional libs is, that the build process now has an intermediate step
to keep a shared codebase which then is added to myfaces, tomahawk etc... 
- The above mentioned jars are this codebase, which are not linked due to the last step not
being performable by eclipse before compilation without an additional ant builder.
- ==== Example Webapps autodeployment ====
- Additionally if you want to have auto deployment of the examples projects via an eclipse
plugin (WTP, MyEclipse etc...) you need to 
- add those jars to the deployment of your webapp. I will skip the details of adding webapp
capabilities to the examples projects here.
- Because depending on the plugin this is different.
- The key is to get the jars automatically into the WEB-INF/lib and the classes into the WEB-INF/classes
- As for the classes you simply have to change the target according to your plugins needs,
so that the classes are put 
- into the dir which is picked up for deployment.
- The Libraries
- Usually any web enabled plugin has a facility somewhere in the project settings to add additional
jars to the webapp deployment, you have to use this facility or an ant builder
- to deploy the *shared* jars into your WEB-INF/lib.

View raw message