Skip to content

Commit

Permalink
Prepare for 2.5.0.Final release
Browse files Browse the repository at this point in the history
  • Loading branch information
VineetReynolds committed Mar 10, 2014
1 parent ec418e5 commit a0696cc
Show file tree
Hide file tree
Showing 123 changed files with 218 additions and 15,845 deletions.
14 changes: 14 additions & 0 deletions README.html
@@ -0,0 +1,14 @@
<!DOCTYPE html><html><head><title>README</title><link href="http://www.jboss.org/jdf/stylesheets/documentation.css" rel="stylesheet"></link><link href="http://www.jboss.org/jdf/stylesheets/pygments.css" rel="stylesheet"></link></head><body>
<h1><a id="what-is-this" class="anchor" href="#what-is-this"><span class="anchor-icon"></span></a>What is this?</h1>

<p>This is the TicketMonster distribution, a showcase application for <a href="http://jboss.org/jdf">JBoss Developer Framework</a>.</p>

<h2><a id="what-can-you-find-here" class="anchor" href="#what-can-you-find-here"><span class="anchor-icon"></span></a>What can you find here?</h2>

<p>The content of the underlying directories is as follows:</p>

<ul>
<li><code>demo</code> - the sources of TicketMonster application - you can build and run it! Follow the <a href="demo/README.html">instructions</a>. Or you can see it at work <a href="http://ticketmonster-jdf.rhcloud.com">here</a>. </li>
<li><code>cordova</code> - the sources of the TicketMonster Hybrid Mobile (Cordova) application. Follow the <a href="cordova/README.html">instructions</a> to build and run it.</li>
</ul>
</body></html>
6 changes: 2 additions & 4 deletions README.md
@@ -1,12 +1,10 @@
# What is this?

This is the Git repository for all things TicketMonster, a showcase application for [JBoss Developer Framework](http://jboss.org/jdf).
This is the TicketMonster distribution, a showcase application for [JBoss Developer Framework](http://jboss.org/jdf).

## What can you find here?

The content of the underlying directories is as follows:

* `demo` - the sources of TicketMonster application - you can build and run it! Follow the [instructions](demo/README.md). Or you can see it at work [here](http://ticketmonster-jdf.rhcloud.com).
* `cordova` - the sources of the TicketMonster Hybrid Mobile (Cordova) application. Follow the [instructions](cordova/README.md) to build and run it.
* `dist` - utility scripts for versioning and release
* `tutorial` - the sources of the TicketMonster tutorial, which describe how it works, how it's designed, and outlines a series of steps for *you* to build it. The tutorial is available in built form [here](http://www.jboss.org/jdf/examples/get-started/).
* `cordova` - the sources of the TicketMonster Hybrid Mobile (Cordova) application. Follow the [instructions](cordova/README.md) to build and run it.
61 changes: 61 additions & 0 deletions cordova/README.html
@@ -0,0 +1,61 @@
<!DOCTYPE html><html><head><title>README</title><link href="http://www.jboss.org/jdf/stylesheets/documentation.css" rel="stylesheet"></link><link href="http://www.jboss.org/jdf/stylesheets/pygments.css" rel="stylesheet"></link></head><body>
<h1><a id="what-is-this" class="anchor" href="#what-is-this"><span class="anchor-icon"></span></a>What is this?</h1>

<p>This is the Hybrid Mobile project for TicketMonster.</p>

<h2><a id="importing-and-running-the-project" class="anchor" href="#importing-and-running-the-project"><span class="anchor-icon"></span></a>Importing and running the project</h2>

<h2><a id="prerequisites" class="anchor" href="#prerequisites"><span class="anchor-icon"></span></a>Prerequisites</h2>

<ul>
<li>JBoss Developer Studio (JBDS) 7.1</li>
<li>The JBoss Hybrid Mobile Tools + CordovaSim feature is installed in JBDS.</li>
</ul>

<p>For running on an Android emulator:</p>

<ul>
<li>The Android Developer Tools plug-in must be installed in JBDS.</li>
<li>An Android Virtual Device (AVD) having a minimum API level 10 must be available. The recommended API level is 19 (KitKat).</li>
</ul>

<p>For running on an iOS simulator:</p>

<ul>
<li>Mac OS X 10.7 (Lion) or higher.</li>
<li>XCode 4.5 or higher, with iOS 6 SDK or higher.</li>
<li>An iOS 5.x or higher simulator for the iPhone or iPad.</li>
</ul>

<p>If you need more detailed instruction to setup a iOS Development Environment with Apache Cordova, you can take a look at <a href="http://aerogear.org/docs/guides/CordovaSetup/">Setting up your development enivronment to use Apache Cordova</a></p>

<h2><a id="import-the-ticketmonster-code" class="anchor" href="#import-the-ticketmonster-code"><span class="anchor-icon"></span></a>Import the ticket-monster Code</h2>

<p>First we need to import the existing Hybrid Mobile project code to JBDS.</p>

<ol>
<li>In JBDS, click File then import.</li>
<li>Select <em>Existing Projects into Workspace</em> and click <em>Next</em>.</li>
<li>On Root Directory, click on <em>Browse&hellip;</em> button and navigate to the <code>$TICKET-MONSTER_HOME/cordova/</code> directory on your filesystem.</li>
<li>After selecting the TicketMonster-Cordova project, you can click on <em>Finish</em> button to start the project import.</li>
<li>Make sure that <code>$TICKET-MONSTER_HOME/cordova/www</code> is a symbolic link to <code>../demo/src/main/webapp</code></li>
</ol>

<h4><a id="troubleshooting-windows-operating-systems" class="anchor" href="#troubleshooting-windows-operating-systems"><span class="anchor-icon"></span></a>Troubleshooting Windows Operating Systems</h4>

<p>As Windows doesn&rsquo;t support symbolic links you must copy <code>$TICKET-MONSTER_HOME/demo/src/main/webapp</code> folder to <code>$TICKET-MONSTER_HOME/cordova/www</code></p>

<h2><a id="deploy-the-application-on-an-android-emulator" class="anchor" href="#deploy-the-application-on-an-android-emulator"><span class="anchor-icon"></span></a>Deploy the application on an Android Emulator</h2>

<ol>
<li>Select your project in JBDS.</li>
<li>Click on <code>Run</code>, then <code>Run As</code> and <code>Run on Android Emulator</code>.</li>
</ol>

<h2><a id="deploy-the-application-on-an-ios-simulator" class="anchor" href="#deploy-the-application-on-an-ios-simulator"><span class="anchor-icon"></span></a>Deploy the application on an iOS Simulator</h2>

<ol>
<li>Select your project in JBDS.</li>
<li>Click on <code>Run</code>, then <code>Run As</code> and <code>Run on iOS Simulator</code>.</li>
</ol>
</body></html>
140 changes: 140 additions & 0 deletions demo/README.html
@@ -0,0 +1,140 @@
<!DOCTYPE html><html><head><title>README</title><link href="http://www.jboss.org/jdf/stylesheets/documentation.css" rel="stylesheet"></link><link href="http://www.jboss.org/jdf/stylesheets/pygments.css" rel="stylesheet"></link></head><body>
<h1><a id="ticketmonster-a-jboss-example" class="anchor" href="#ticketmonster-a-jboss-example"><span class="anchor-icon"></span></a>TicketMonster - a JBoss example</h1>

<p>TicketMonster is an online ticketing demo application that gets you started with JBoss technologies, in particular the <a href="http://jboss.org/jdf">JBoss Developer Framework</a>, and helps you learn and evaluate them.</p>

<p>Here are a few instructions for building and running it. You can learn more about the example from the <a href="http://www.jboss.org/jdf/examples/get-started">tutorial</a>.</p>

<h2><a id="updating-the-performance-dates" class="anchor" href="#updating-the-performance-dates"><span class="anchor-icon"></span></a>Updating the Performance dates</h2>

<p><em>NOTE: This step is optional. It is necessary only if you want to update the dates of the Performances in the <code>import.sql</code> script in an automated manner. Updating the performance dates ensure that they are always set to some timestamp in the future, and ensures that all performances are visible in the Monitor section of the TicketMonster application.</em></p>

<ol>
<li><p>Run the <code>update_import_sql</code> Perl script. You&rsquo;ll need the <code>DateTime</code>, <code>DateTime::Format::Strptime</code> and <code>Tie::File</code> Perl modules. These are usually available by default in your Perl installation.</p>
<div class="highlight"><pre><span class="nv">$ </span>perl update_import_sql.pl src/main/resources/import.sql
</pre></div></li>
</ol>

<h2><a id="generating-the-administration-site" class="anchor" href="#generating-the-administration-site"><span class="anchor-icon"></span></a>Generating the administration site</h2>

<p><em>NOTE: This step is optional. The administration site is already present in the source code. If you want to regenerate it from Forge, and apply the changes outlined in the tutorial, you may continue to follow the steps outlined here. Otherwise, you can skip this step and proceed to build TicketMonster.</em></p>

<p>Before building and running TicketMonster, you must generate the administration site with Forge.</p>

<ol>
<li><p>Ensure that you have <a href="http://jboss.org/forge">JBoss Forge</a> installed. The current version of
TicketMonster supports version 1.4.4.Final or higher of JBoss Forge.</p></li>
<li><p>Start JBoss Forge</p>
<div class="highlight"><pre><span class="nv">$ </span>forge
</pre></div></li>
<li><p>Verify that the Forge plugin is installed by running</p>
<div class="highlight"><pre><span class="nv">$ </span>forge list-plugins
</pre></div></li>
</ol>

<p>and verifying that <code>org.jboss.forge.angularjs-scaffoldx-plugin</code> is in the returned list.</p>

<p>The version of the installed plugin must be 1.0.4.Final or higher. The version is present in the output of this command and it appears like so: <code>org.jboss.forge.angularjs-scaffoldx-plugin:1.4.3.Final:1.0.4.Final-0b904c70-87c2-4ed9-9ec4-4868bfc02214</code>. The plugin version is the second version string (<code>1.0.4.Final</code>) listed in the output; the first version string (<code>1.4.3.Final</code>) is the Forge API version used by the plugin.</p>

<ol>
<li><p>If the outcome of the previous step was that the AngularJS plugin was not installed, do that now</p>
<div class="highlight"><pre><span class="nv">$ </span>forge install-plugin angularjs
</pre></div></li>
<li><p>From the JBoss Forge prompt, execute the script for generating the administration site</p>
<div class="highlight"><pre><span class="nv">$ </span>run admin_layer.fsh
</pre></div></li>
</ol>

<p>Steps 3 and 4 need to be performed only once - after the plugin has been installed, it will be
available on any subsequent runs of Forge.</p>

<p>On step 5, answer <em>yes</em> to all the the questions concerning patches. Deployment to JBoss EAP 6.2 is optional.</p>

<h2><a id="building-ticketmonster" class="anchor" href="#building-ticketmonster"><span class="anchor-icon"></span></a>Building TicketMonster</h2>

<p>TicketMonster can be built from Maven, by runnning the following Maven command:</p>
<div class="highlight"><pre><span class="n">mvn</span> <span class="n">clean</span> <span class="n">package</span>
</pre></div>
<h3><a id="building-ticketmonster-with-tests" class="anchor" href="#building-ticketmonster-with-tests"><span class="anchor-icon"></span></a>Building TicketMonster with tests</h3>

<p>If you want to run the Arquillian tests as part of the build, you can enable one of the two available Arquillian profiles.</p>

<p>For running the tests in an <em>already running</em> application server instance, use the <code>arq-jbossas-remote</code> profile.</p>
<div class="highlight"><pre><span class="n">mvn</span> <span class="n">clean</span> <span class="n">package</span> <span class="o">-</span><span class="n">Parq</span><span class="o">-</span><span class="n">jbossas</span><span class="o">-</span><span class="n">remote</span>
</pre></div>
<p>If you want the test runner to <em>start</em> an application server instance, use the <code>arq-jbossas-managed</code> profile. You must set up the <code>JBOSS_HOME</code> property to point to the server location, or update the <code>src/main/test/resources/arquillian.xml</code> file.</p>
<div class="highlight"><pre><span class="n">mvn</span> <span class="n">clean</span> <span class="n">package</span> <span class="o">-</span><span class="n">Parq</span><span class="o">-</span><span class="n">jbossas</span><span class="o">-</span><span class="n">managed</span>
</pre></div>
<h3><a id="building-ticketmonster-with-postgresql-for-openshift" class="anchor" href="#building-ticketmonster-with-postgresql-for-openshift"><span class="anchor-icon"></span></a>Building TicketMonster with Postgresql (for OpenShift)</h3>

<p>If you intend to deploy into <a href="http://openshift.com">OpenShift</a>, you can use the <code>postgresql-openshift</code> profile</p>
<div class="highlight"><pre><span class="n">mvn</span> <span class="n">clean</span> <span class="n">package</span> <span class="o">-</span><span class="n">Ppostgresql</span><span class="o">-</span><span class="n">openshift</span>
</pre></div>
<h2><a id="running-ticketmonster" class="anchor" href="#running-ticketmonster"><span class="anchor-icon"></span></a>Running TicketMonster</h2>

<p>You can run TicketMonster into a local JBoss EAP 6.2 instance or on OpenShift.</p>

<h3><a id="running-ticketmonster-locally" class="anchor" href="#running-ticketmonster-locally"><span class="anchor-icon"></span></a>Running TicketMonster locally</h3>

<h4><a id="start-jboss-enterprise-application-platform-62" class="anchor" href="#start-jboss-enterprise-application-platform-62"><span class="anchor-icon"></span></a>Start JBoss Enterprise Application Platform 6.2</h4>

<ol>
<li>Open a command line and navigate to the root of the JBoss server directory.</li>
<li><p>The following shows the command line to start the server with the web profile:</p>
<div class="highlight"><pre><span class="n">For</span> <span class="n">Linux</span><span class="o">:</span> <span class="n">JBOSS_HOME</span><span class="o">/</span><span class="n">bin</span><span class="o">/</span><span class="n">standalone</span><span class="p">.</span><span class="n">sh</span>
<span class="n">For</span> <span class="n">Windows</span><span class="o">:</span> <span class="n">JBOSS_HOME</span><span class="err">\</span><span class="n">bin</span><span class="err">\</span><span class="n">standalone</span><span class="p">.</span><span class="n">bat</span>
</pre></div></li>
</ol>

<h4><a id="deploy-ticketmonster" class="anchor" href="#deploy-ticketmonster"><span class="anchor-icon"></span></a>Deploy TicketMonster</h4>

<ol>
<li>Make sure you have started the JBoss Server as described above.</li>
<li><p>Type this command to build and deploy the archive into a running server instance.</p>
<div class="highlight"><pre><span class="n">mvn</span> <span class="n">clean</span> <span class="n">package</span> <span class="n">jboss</span><span class="o">-</span><span class="n">as</span><span class="o">:</span><span class="n">deploy</span>
</pre></div>
<p>(You can use the <code>arq-jbossas-remote</code> profile for running tests as well)</p></li>
<li><p>This will deploy <code>target/ticket-monster.war</code> to the running instance of the server.</p></li>
<li><p>Now you can see the application running at <code>http://localhost:8080/ticket-monster</code></p></li>
</ol>

<h3><a id="running-ticketmonster-in-openshift" class="anchor" href="#running-ticketmonster-in-openshift"><span class="anchor-icon"></span></a>Running TicketMonster in OpenShift</h3>

<h4><a id="create-an-openshift-project" class="anchor" href="#create-an-openshift-project"><span class="anchor-icon"></span></a>Create an OpenShift project</h4>

<ol>
<li>Make sure that you have an OpenShift domain and you have created an application using the <code>jbosseap-6</code> cartridge (for more details, get started <a href="https://openshift.redhat.com/app/getting_started">here</a>). If you want to use PostgreSQL, add the <code>postgresql-8.4</code> cartridge too.</li>
<li>Ensure that the Git repository of the project is checked out.</li>
</ol>

<h4><a id="building-and-deploying" class="anchor" href="#building-and-deploying"><span class="anchor-icon"></span></a>Building and deploying</h4>

<ol>
<li><p>Build TicketMonster using either: </p>

<ul>
<li><p>the default profile (with H2 database support)</p>
<div class="highlight"><pre><span class="n">mvn</span> <span class="n">clean</span> <span class="n">package</span>
</pre></div></li>
<li><p>the <code>postgresql-openshift</code> profile (with PostgreSQL support) if the PostgreSQL cartrdige is enabled in OpenShift.</p>
<div class="highlight"><pre><span class="n">mvn</span> <span class="n">clean</span> <span class="n">package</span> <span class="o">-</span><span class="n">Ppostgresql</span><span class="o">-</span><span class="n">openshift</span>
</pre></div></li>
</ul></li>
<li><p>Copy the <code>target/ticket-monster.war</code>file in the OpenShift Git repository(located at <code>&lt;root-of-openshift-application-git-repository&gt;</code>).</p>
<div class="highlight"><pre><span class="n">cp</span> <span class="n">target</span><span class="o">/</span><span class="n">ticket</span><span class="o">-</span><span class="n">monster</span><span class="p">.</span><span class="n">war</span> <span class="o">&lt;</span><span class="n">root</span><span class="o">-</span><span class="n">of</span><span class="o">-</span><span class="n">openshift</span><span class="o">-</span><span class="n">application</span><span class="o">-</span><span class="n">git</span><span class="o">-</span><span class="n">repository</span><span class="o">&gt;/</span><span class="n">deployments</span><span class="o">/</span><span class="n">ROOT</span><span class="p">.</span><span class="n">war</span>
</pre></div></li>
<li><p>Navigate to <code>&lt;root-of-openshift-application-git-repository&gt;</code> folder</p></li>
<li><p>Remove the existing <code>src</code> folder and <code>pom.xml</code> file. </p>
<div class="highlight"><pre><span class="n">git</span> <span class="n">rm</span> <span class="o">-</span><span class="n">r</span> <span class="n">src</span>
<span class="n">git</span> <span class="n">rm</span> <span class="n">pom</span><span class="p">.</span><span class="n">xml</span>
</pre></div></li>
<li><p>Add the copied file to the repository, commit and push to Openshift</p>
<div class="highlight"><pre><span class="n">git</span> <span class="n">add</span> <span class="n">deployments</span><span class="o">/</span><span class="n">ROOT</span><span class="p">.</span><span class="n">war</span>
<span class="n">git</span> <span class="n">commit</span> <span class="o">-</span><span class="n">m</span> <span class="s">&quot;Deploy TicketMonster&quot;</span>
<span class="n">git</span> <span class="n">push</span>
</pre></div></li>
<li><p>Now you can see the application running at <code>http://&lt;app-name&gt;-&lt;domain-name&gt;.rhcloud.com</code></p></li>
</ol>

<p><em>NOTE: this version of TicketMonster uses the <em>binary</em> deployment style.</em> </p>
</body></html>
2 changes: 1 addition & 1 deletion demo/pom.xml
Expand Up @@ -5,7 +5,7 @@

<groupId>org.jboss.examples</groupId>
<artifactId>ticket-monster</artifactId>
<version>2.5.1-SNAPSHOT</version>
<version>2.5.0.Final</version>
<packaging>war</packaging>

<name>ticket-monster</name>
Expand Down
10 changes: 0 additions & 10 deletions dist/README.dist.md

This file was deleted.

0 comments on commit a0696cc

Please sign in to comment.