/scalate-website/src/documentation/war-overlay.page

http://github.com/scalate/scalate · Visualforce Page · 38 lines · 29 code · 9 blank · 0 comment · 0 complexity · 7a941f0370c7918a870a95774e52662c MD5 · raw file

  1. ---
  2. title: WAR Overlay
  3. in_menu: false
  4. sort_info: 2
  5. --- name:overview
  6. # WAR Overlay
  7. Adding Scalate console to your web application
  8. --- name:content pipeline:jade
  9. .left
  10. :markdown
  11. # Overview
  12. .right
  13. :markdown
  14. The Scalate War Overlay is a [feature](http://maven.apache.org/plugins/maven-war-plugin/overlays.html) of the [maven war plugin](http://maven.apache.org/plugins/maven-war-plugin/) which allows you to depend on a WAR in your maven dependencies.
  15. The war plugin then copies all the contents of the war overlay into your web application. This saves you copy and pasting various shared resources and templates across web applications.
  16. For example to use the Scalate WAR overlay in any maven web application just add this section to your pom.xml
  17. {pygmentize:: xml}
  18. <dependencies>
  19. ...
  20. <dependency>
  21. <groupId>org.fusesource.scalate</groupId>
  22. <artifactId>scalate-war_${scala_compat_tag}</artifactId>
  23. <version>${project_version}</version>
  24. <type>war</type>
  25. </dependency>
  26. ...
  27. </dependencies>
  28. {pygmentize}
  29. Note that if you are already using one of the [scalate archetypes](getting-started.html) you don't have to worry about this; your archetype is already setup correctly for you.