blob: 0638b121b86f536bc9ee74bf563f5d4018999222 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<ui:composition template="/main.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:tc="http://myfaces.apache.org/tobago/component"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
This section describes how to build Tobago and run the example applications from the sources.
<tc:section label="Checking Out">
Check out the current development sources by running the following:
<demo-highlight language="bash">$ git clone https://github.com/apache/myfaces-tobago tobago</demo-highlight>
You can check out older versions like 2.x by using the git remote branch (tobago-2.x) running:
<demo-highlight language="bash">$ git clone -b tobago-2.x https://github.com/apache/myfaces-tobago tobago-2.x</demo-highlight>
</tc:section>
<tc:section label="Building">
<p>
You need <tc:link label="Maven" link="http://maven.apache.org/download.html" image="fa-external-link"/> (at
least version 3.0.4)
and Java (version 8 or higher) to build Tobago.
</p>
<p>
Change to the local loaded source directory and call
</p>
<demo-highlight language="bash">$ mvn clean install</demo-highlight>
<p>
to run the install target on all sub projects. This will
download all necessary artifacts into your local Maven repository.
</p>
</tc:section>
<!-- todo -->
<tc:badge markup="warning"
value="Todo: Update this page and merge it with the 'Docker' page."/><br/>
<tc:section label="Examples">
You can run the examples inside tobago-example with jetty
<demo-highlight language="bash">$ mvn jetty:run -Pjetty</demo-highlight>
or
<demo-highlight language="bash">$ mvn package</demo-highlight>
and deploy the WAR from the target directory manually.
<tc:section label="Using different JSF implementations">
By default the example will be started with MyFaces 2.3
You can run the examples with other version like you see here:
<demo-highlight language="bash">$ mvn jetty:run -Pjetty</demo-highlight>
You can select a specific JSF implementation with the <i>jsf</i> variable, like Mojarra.
<demo-highlight language="bash">$ mvn jetty:run -Pjetty -Djsf=mojarra-2.3</demo-highlight>
</tc:section>
It's also possible to run the demo in TomEE from Maven directly
<demo-highlight language="bash">$ mvn clean package tomee:run -Ptomee -Djsf=provided</demo-highlight>
</tc:section>
<tc:section label="Development">
<p>For development the example-demo could be run with maven profile "dev".</p>
<demo-highlight language="bash">$ mvn -Pdev jetty:run -Pjetty</demo-highlight>
<p>In this case the npm scripts "dev-css" and "dev-ts" could be run to compile css and typescript classes.
These changes would be detected by jetty without restart.</p>
</tc:section>
</ui:composition>