PageRenderTime 11ms CodeModel.GetById 8ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/scalate-website/src/documentation/archetypes.page

http://github.com/scalate/scalate
Visualforce Page | 52 lines | 35 code | 17 blank | 0 comment | 0 complexity | b5d01717214b969cacb11e4f1964cd6f MD5 | raw file
 1---
 2title: Maven Archetypes
 3in_menu: false
 4sort_info: 5
 5--- name:overview
 6
 7# Maven Archetypes
 8Scalate Maven Archetypes
 9
10--- name:content pipeline:ssp,markdown
11
12<div class="left" markdown="1">
13# Maven Archetypes
14</div>
15
16<div class="right" markdown="1">
17Scalate provides a number of [Maven](http://maven.apache.org/) archetypes to kick start you creating new projects using Scalate.
18
19The easiest way to get started is to install the [Scalate Tool](tool.html) and use that as described in the [Getting Started Guice](getting-started.html)
20
21However if you want to miss out the [installation step for Scalate Tool](tool.html) you can just use Maven directly - though be aware it is a little more brittle and verbose!. The rest of this page describes how to use maven directly to create projects using the archetypes.
22
23If you have Maven installed you should be able to create a new project by typing this
24
25    mvn org.apache.maven.plugins:maven-archetype-plugin:2.0:generate \
26      -DarchetypeGroupId=org.fusesource.scalate.tooling \
27      -DarchetypeArtifactId=scalate-archetype-guice \
28      -DarchetypeVersion=${project_version} \
29      -DarchetypeRepository=http://repo.fusesource.com/nexus/content/repositories/public \
30      -DgroupId=myGroup -DartifactId=myArtifact -Dversion=1.0-SNAPSHOT
31
32You might want to change the last line changing **myGroup** and **myArtifact** to whatever maven groupId and artifactId you want to use.
33
34The maven archetype plugin will ask you to hit enter to confirm those settings.
35
36For detail see the [Getting Started Guide](getting-started.html)
37      
38      
39## Using the latest snapshot
40
41If you want to take advantage of any improvements in the console and archetypes since the ${project_version} release you can use this mechanism of creating the archetype
42
43      mvn archetype:generate \
44        -DarchetypeGroupId=org.fusesource.scalate.tooling \
45        -DarchetypeArtifactId=scalate-archetype-guice \
46        -DarchetypeVersion=${project_snapshot_version} \
47        -DarchetypeRepository=http://repo.fusesource.com/nexus/content/repositories/snapshots \
48        -DgroupId=myGroup -DartifactId=myArtifact -Dversion=1.0-SNAPSHOT
49
50This will use the latest snapshot of the archetype instead.
51</div>
52