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.zipto the directory you wish to install Scalate 1.4.0. These instructions assume you choseC:\Program Files\Scala. The subdirectoryscalate-1.4.0will be created from the archive. - Add the
C:\Program Files\Scala\scalate-1.4.0\bindirectory to thePATHenvironment variable:- Opening up the system properties using (WinKey + Pause).
- Selecting the Advanced tab.
- Click the Environment Variables button.
- Update/create the
PATHvariable 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\_HOMEexists 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%\binis in yourPATHenvironment 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.gzto the directory you wish to install Scalate 1.4.0. These instructions assume you chose/usr/local/scala. The subdirectoryscalate-1.4.0will be created from the archive. In a command terminal, prepend the
PATHvariable with thebindirectory in the scalate release.export PATH=/usr/local/scala/scalate-1.4.0/bin:$PATHMake sure that
JAVA\_HOMEis set to the location of your JDK.export JAVA_HOME=/usr/java/jdk1.5.0_02Make sure that
$JAVA\_HOME/binis in yourPATHenvironment variable.export PATH=$JAVA_HOME/bin:$PATHRun 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 scalateThe 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