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 Trinidad With Maven" by ScottOBryan
Date Wed, 11 Jun 2008 22:29:40 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 ScottOBryan:

The comment on the change is:
Updated build documentation

  ## page was renamed from Building ADF With Maven
- ==== Prerequisites ====
+ === Prerequisites ===
  To build Trinidad , you'll need the software listed below installed on your machine.
   * JDK 5.0
-  * Maven '''2.0.1 (or later)''' (, with the bin directory
in your path. Make sure to set JAVA_HOME as an environment variable.
+  * Maven '''2.0.7 (or later)''' (, with the bin directory
in your path. Make sure to set JAVA_HOME as an environment variable.
   * Subversion client for your build environment
- Also make sure the version number you get matches the version number in the pom.xml for
maven. if it is 2.0.2 make sure it is the same.
- ==== Running the Trinidad build ====
+ === Running the Trinidad build ===
  Source repository information can be found at
  {{{svn co trinidad
  cd trinidad
- cd plugins
- mvn install
+ mvn clean install
- cd ..
- cd trinidad
- mvn install
- }}}
- Note: If your install fails with message like:
- {{{[INFO] org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException:
Class org.apache.commons.logging.impl.Jdk14Logger does not implement Log
- }}}
- Try this patch:
- {{{Index: trinidad/pom.xml
- ===================================================================
- --- pom.xml     (revision 440458)
- +++ pom.xml     (working copy)
- @@ -224,6 +224,14 @@
-            <artifactId>maven-faces-plugin</artifactId>
-            <version>incubator-m1-SNAPSHOT</version>
-            <inherited>true</inherited>
- +          <!-- workaround for jdk14logger error message -->
- +          <dependencies>
- +            <dependency>
- +              <groupId>log4j</groupId>
- +              <artifactId>log4j</artifactId>
- +              <version>1.2.13</version>
- +            </dependency>
- +          </dependencies>
-          </plugin>
-          <plugin>
  Note: If your install fails due to errors in the automatic tests you can skip the tests
using this command:
@@ -59, +27 @@

  are completing successfully before checking in!  If the tests fail, the build fails, and
  will not be deployed.)
- ==== Building the Trinidad demo with the RI ====
- {{{cd trinidad/trinidad/trinidad-examples/trinidad-demo
- mvn install -Djsf=ri
- }}}
- ==== Generate Trinidad docs ====
+ === Generate Trinidad docs ===
  cd ../trinidad
@@ -75, +37 @@

  Look for Taglib and Javadocs in {{{trinidad/trinidad-api/target/site}}}.
+ === Special Build Options ===
+ Trinidad has added a number of options which can be used to do special things with the build.
 A number of these options apply toward the building of the Trinidad examples, in order to
make the generated wars more easily deployable on other servers.  Maven does this though the
use of profiles.  There are two ways to invoke a profile, the first is through the use of
the -Pprofile command line option and the second is through special activation.  Below is
the documentation for the profiles that can be invoked directly as well as those whose activation
is done by a property (-D). 
+ ==== Direct Profiles ====
+ These profiles may be invoked by adding {{{-PprofileName}}} to your maven command line.
 Multiple profiles may be invoked using the following notation: {{{-Pprofile1,profile2}}}.
+ || '''Profile Name''' || '''Description''' ||
+ || buildExamples || This profile will force the examples to be built.  Normally the examples
are always build unless you specify the -DperformRelease property (see below) on the command
line.  Since examples are not deployed as artifacts, they are not build as part of a release.
 Using this profile will force the examples to be built even if the -DperformRelease property
is set. ||
+ || enableAsserts || This turns on Java asserts during the running of the surefire tests.
 Normally asserts are not turned on and it makes compilation much faster.  This option should
not be used in Maven 1.0.6. ||
+ || includeJSF* || This profile will copy the current JSF libraries into the WEB-INF/lib
folder of the Trinidad examples.  This is useful for creating a war that can be deployed to
a container which does not include a JSF implementation (like Tomcat and Jetty). ||
+ || includeJSTL  ||This profile will copy the current JSTL libraries into the WEB-INF/lib
folder of the Trinidad examples.  This is useful for creating a war that can be deployed to
a container which does not include a JSTL implementation (like Tomcat). ||
+ || includeBridge* || This profile will copy the current portlet-bridge libraries into the
WEB-INF/lib folder for the Trinidad examples so that they can be more easily deployed into
a portal environment. ||
+ || jettyConfig || This profile enables the config necessary to run the jetty:run target.
 This should be used only when you are trying to run jetty from maven.  In order to run jetty,
you would issue the following command from the trinidad-examples/trinidad-demo project: {{{mvn
-PjettyConfig install jetty:run}}}.  There is no need to invoke the includeJSF profile, the
same behavior will already be set up in this profile. ||
+ * These options are only available for Trinidad 1.2
+ ==== Build Properties ====
+ Some profiles in maven are designed to be activated by the existence of properties (or lack
thereof).  Each property is added to the command line individually and it proceeded by a -D.
 Optionally profiles may have values.  Each property would be added on the maven command line
by adding {{{-Doption}}} or {{{-Doption=value}}}.
+ The table below contains the property names and their acceptable values.  If a property
has nothing in the acceptable values field, then that means the property my have any value
or none at all, it just has to be present.  If the property has only one acceptable value,
it is assumed that the property must have that value assigned even if there is only one.
+ || '''Property Name ''' || '''Values''' || '''Description''' ||
+ || prepareRelease || || This will enable the release preparation profile which will allow
versioning of all trinidad sub-projects.  This is generally only needed when preparing a release
and is documented in the Trinidad Release documentation. ||
+ || performRelease || true || This will be invoked automatically during a release:perform
target on trinidad.  It would also be used to generate release artifacts for vote.  By adding
this property, you turn off building of the Trinidad Examples projects and you enable the
building of the JavaDocs and gpg signing.  If you do not want to exclude the example projects
from a build with this property on it, make sure to invoke the -PbuildExamples profile. ||
+ || jsf || ri || By default the demo projects refer to myfaces.  This will force the demo
projects to reference the Reference Implementation.  This setting is important to running
the demos from jetty using maven as it will specify which JSF implementation you will use.
 It also determines which distribution is added to the WEB-INF/lib folder when used with the
-PincludeJSF profile ||
+ === Examples ===
+ Run Jetty with Myfaces:
+ {{{cd trinidad-examples/trinidad-demo
+ mvn install jetty:run -PjettyConfig
+ }}}
+ Run Jetty with RI:
+ {{{cd trinidad-examples/trinidad-demo
+ mvn install jetty:run -PjettyConfig -Djsf=ri
+ }}}
+ Build Demo with JSF and JSTL included:
+ {{{mvn clean install -PincludeJSF,includeJSTL
+ }}}
+ Build Demo with JSF (RI) and JSTL included:
+ {{{mvn clean install -PincludeJSF,includeJSTL -Djsf=ri
+ }}}
+ Run a build with assertions enabled:
+ {{{mvn clean install -PenableAsserts
+ }}}

View raw message