D 2016-02-07T15:51:00.306
L Getting\sstarted
P 6ec80a8754239fa11b28821c54d8b035e674c411
U timoteo.ponce
W 4095
Pre-requisites
* Java version 1.6 or higher
* Apache Maven 3
* Fossil SCM
* Any kind of shell
Install the archetype
Automatically, from the shell execute the following commands (assuming Unix-like OS):
$> mkdir dci_archetype
$> fossil clone https://chiselapp.com/user/timoteo.ponce/repository/dci_webapp_archetype dci_archetype.fossil
$> fossil open dci_archetype.fossil
$> sh install.sh
Manually, from the shell execute the following commands (assuming Unix-like OS):
$> mkdir dci_archetype
$> fossil clone https://chiselapp.com/user/timoteo.ponce/repository/dci_webapp_archetype dci_archetype.fossil
$> fossil open dci_archetype.fossil
$> cd dci_archetype
$> mvn clean install
Create a new application with the newly installed archetype
Also from a shell run the following commands:
$> mvn archetype:generate
There you will have a full list of archetypes numbered, select the one with the name dci-webapp:
1091: local -> com.github.timoteoponce:dci-webapp (Web application archetype based on DCI concepts)
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 436: 1091
Or you can select the archetype by default:
mvn archetype:generate -DarchetypeGroupId=com.github.timoteoponce -DarchetypeArtifactId=dci-webapp
Then name your packages as you like, in our example it will be called webapp01:
Define value for property 'groupId': : org.timoponce
Define value for property 'artifactId': : webapp01
Define value for property 'version': 1.0-SNAPSHOT: :
Define value for property 'package': org.timoponce: :
Confirm properties configuration:
groupId: org.timoponce
artifactId: webapp01
version: 1.0-SNAPSHOT
package: org.timoponce
Y: : y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: dci-webapp:1.0-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.timoponce
[INFO] Parameter: artifactId, Value: webapp01
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: org.timoponce
[INFO] Parameter: packageInPathFormat, Value: org/timoponce
[INFO] Parameter: package, Value: org.timoponce
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: groupId, Value: org.timoponce
[INFO] Parameter: artifactId, Value: webapp01
[INFO] project created from Archetype in dir: /Users/timoteo/projects/webapp01
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:43.200s
[INFO] Finished at: Thu Jul 03 16:57:39 BOT 2014
[INFO] Final Memory: 9M/81M
[INFO] ------------------------------------------------------------------------
The same can be done in a single command:
mvn archetype:generate -DgroupId=org.timoponce \
-DartifactId=webapp01 -DarchetypeArtifactId=dci-webapp \
-DarchetypeGroupId=com.github.timoteoponce \
-DinteractiveMode=false
Now run the application:
$> cd webapp01
$> mvn jetty:run
And open it on your browser at location http://localhost:8080
Show me the database
With the following command you will have a web-UI for managing the H2-embedded database:
$> mvn exec:java -Ddatabase
For further details on the newly setup project go to [Example application]
Z ba5880429c2c8996e7e46322a8c8b2e3