Requirements
To use Scalate you will need:
- Maven 2
- JDK 1.5 or greater
To run the sitegen
sample you will need to install:
- Python
- Pygments
Scalate Tool
Windows 2000/XP
- Download a distribution such as 1.4.0 zip or tar.gz
- Unzip the distribution archive, i.e.
scalate-1.4.0-windows-bin.zip
to the directory you wish to install Scalate 1.4.0. These instructions assume you choseC:\Program Files\Scala
. The subdirectoryscalate-1.4.0
will be created from the archive. - Add the
C:\Program Files\Scala\scalate-1.4.0\bin
directory to thePATH
environment variable:- Opening up the system properties using (WinKey + Pause).
- Selecting the Advanced tab.
- Click the Environment Variables button.
- Update/create the
PATH
variable in the user variables prepending the valueC:\Program Files\Scala\scalate-1.4.0
. - Be sure to omit any quotation marks around the path even if it contains spaces.
- In the same dialog, make sure that
JAVA\_HOME
exists in your user variables or in the system variables and it is set to the location of your JDK (e.g.C:\Program Files\Java\jdk1.5.0\_02
). - Make sure that
%JAVA\_HOME%\bin
is in yourPATH
environment variable. - Open a new command prompt:
- Click Winkey + R.
- Type
cmd
.
Run the following to verify that it is correctly installed.
scalate
Unix-based Operating Systems (Linux, Solaris and Mac OS X)
- Download a distribution such as 1.4.0 zip or tar.gz
- Extract the distribution archive, i.e.
scalate-1.4.0-unix-bin.tar.gz
to the directory you wish to install Scalate 1.4.0. These instructions assume you chose/usr/local/scala
. The subdirectoryscalate-1.4.0
will be created from the archive. In a command terminal, prepend the
PATH
variable with thebin
directory in the scalate release.export PATH=/usr/local/scala/scalate-1.4.0/bin:$PATH
Make sure that
JAVA\_HOME
is set to the location of your JDK.export JAVA_HOME=/usr/java/jdk1.5.0_02
Make sure that
$JAVA\_HOME/bin
is in yourPATH
environment variable.export PATH=$JAVA_HOME/bin:$PATH
Run the following to verify that it is installed correctly
scalate
Mac OS X and Homebrew
If you use OS X then we highly recommend using Homebrew to manage installation of tools.
- If you have not done so already please Install Homebrew.
Once you have Homebrew installed you can install Scalate via this command
brew install scalate
The scalate executable should now be available from any terminal.
To verify this works try typing
scalate
Maven
Scalate can be used as part of a Maven build by adding the following dependencies into your POM:
<dependencies>
<dependency>
<groupId>org.fusesource.scalate</groupId>
<artifactId>scalate-wikitext</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.fusesource.scalate</groupId>
<artifactId>scalate-page</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.fusesource.scalamd</groupId>
<artifactId>scalamd</artifactId>
<version>${scalamd-version}</version>
</dependency>
<!-- testing -->
<dependency>
<groupId>org.fusesource.scalate</groupId>
<artifactId>scalate-test</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Note: The path to your local Maven repository .m2
cannot have any spaces.
Diving deeper
Once you have the application working and you've played with the Console you might want to dive deeper into Scalate and understand how it works.
- Scalate Console
- Documentation for further information on user guides and template references
- FAQ if you hit any issues along the way