ICEFaces Tutorial Build Guide

Revision 3.0.1 - May 2012


Maven

  1. Navigate to the root directory of the tutorial project. The same directory as 'pom.xml'.
  2. Run the command
    mvn package -P servlet
    if building for Tomcat, or
    mvn package -P app
    if building for Glassfish (or another JSF-providing app-server).
  3. Maven will begin downloading the dependencies specified in the POM. Once the dependencies have been installed to your local repository, compilation will begin.
  4. If compilation finished without error, the prepared application, "example-named-tutorial.war" will be located in the "target" project subdirectory.

Ant

  1. Navigate to the parent directory of the tutorial project. The same directory as "common.xml".
  2. Open common.xml and replace the value of the
    <property>
    tag named "icefaces.base.dir" with the path to your local ICEfaces source bundle. If this build is located as part of an ICEfaces bundle, skip this step.
  3. Navigate to the tutorial directory. The same directory as "build.xml".
  4. Run the command
    ant servlet-profile
    if building for Tomcat, or
    ant web-profile
    if building for Glassfish (or another JSF-providing app-server).
  5. Ant will begin copying in dependencies and compiling the source files. If compilation is successful a war file will be generated in ".../tutorial/build/dist/" with the same name as the tutorial directory.

Tomcat 7

  1. Locate the war file you compiled either by yourself or with your IDE.
  2. Copy the war file to the "tomcat/webapps" directory of the server.
  3. Run the server. A directory within "webpps" is automatically created with the contents of the war.
  4. Navigate to the application-context of your server domain; by default, something like
    http://localhost:8080/a-tutorial-name/
    .

Glassfish 3

  1. Locate the war file you compiled either by yourself or with your IDE.
  2. Copy the war file to the "glassfish3/domains/domain1/autodeploy" directory of the server.
  3. Run the server. A directory within "autodeploy" is automatically created with the contents of the war.
  4. Navigate to the application-context of your server domain; by default, something like
    http://localhost:8080/a-tutorial-name/
    .

Eclipse

  1. Select the "Import..." option from the File menu.
  2. Select the import source "Existing Maven Projects" under the Maven category.
  3. Click the "Browse..." button following the "Root Directory:" field, and select the folder containing the pom.xml you want to build.
  4. Checkoff the pom.xml files you'd like to have converted into projects and click "Finish".
  5. Once the build has appear in the "Project Explorer" sidebar, right click on it, and select th target "Maven package" under "Run As" to initiate the build.

IntelliJ IDEA 10.x+

  1. Select the "Open Project..." option from the File menu.
  2. Navigate the root of the tutorial project and open the pom.xml file.
  3. IDEA will scan the POM and interpret that its a web application.
  4. To use Maven on this new project, open the "Maven Projects" tool window, and choose the profile appropriate for your server.
  5. Finally, double click the "package" phase, under "lifecycle" in the same tool window to initiate the build.

NetBeans 6.9

  1. Select the "Open Project..." option from the File menu.
  2. Navigate to the root of the tutorial project and select the folder containing the pom.xml file before clicking "Open Project". NetBeans will automatically recognize the folder as a usable Maven project.
  3. NetBeans now scans the Maven build in detail, creating a Web Application project from it.
  4. After the project finishes creation, NetBeans is ready to build it via Maven. To set the build profile, use the list of menu options under Run -> Set Build Configuration. To execute the build, click the hammer icon in the toolbar, or press F11.