PageRenderTime 25ms CodeModel.GetById 20ms RepoModel.GetById 0ms 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. ---
  2. title: Maven Archetypes
  3. in_menu: false
  4. sort_info: 5
  5. --- name:overview
  6. # Maven Archetypes
  7. Scalate Maven Archetypes
  8. --- name:content pipeline:ssp,markdown
  9. <div class="left" markdown="1">
  10. # Maven Archetypes
  11. </div>
  12. <div class="right" markdown="1">
  13. Scalate provides a number of [Maven](http://maven.apache.org/) archetypes to kick start you creating new projects using Scalate.
  14. The 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)
  15. However 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.
  16. If you have Maven installed you should be able to create a new project by typing this
  17. mvn org.apache.maven.plugins:maven-archetype-plugin:2.0:generate \
  18. -DarchetypeGroupId=org.fusesource.scalate.tooling \
  19. -DarchetypeArtifactId=scalate-archetype-guice \
  20. -DarchetypeVersion=${project_version} \
  21. -DarchetypeRepository=http://repo.fusesource.com/nexus/content/repositories/public \
  22. -DgroupId=myGroup -DartifactId=myArtifact -Dversion=1.0-SNAPSHOT
  23. You might want to change the last line changing **myGroup** and **myArtifact** to whatever maven groupId and artifactId you want to use.
  24. The maven archetype plugin will ask you to hit enter to confirm those settings.
  25. For detail see the [Getting Started Guide](getting-started.html)
  26. ## Using the latest snapshot
  27. If 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
  28. mvn archetype:generate \
  29. -DarchetypeGroupId=org.fusesource.scalate.tooling \
  30. -DarchetypeArtifactId=scalate-archetype-guice \
  31. -DarchetypeVersion=${project_snapshot_version} \
  32. -DarchetypeRepository=http://repo.fusesource.com/nexus/content/repositories/snapshots \
  33. -DgroupId=myGroup -DartifactId=myArtifact -Dversion=1.0-SNAPSHOT
  34. This will use the latest snapshot of the archetype instead.
  35. </div>