Skip to content

Module Development setup

Sam Tyson edited this page Aug 19, 2014 · 9 revisions

Required software

Install JDK 1.7. The JRE that comes with VASSAL is not sufficient for compiling the code. Make sure that the JAVA_HOME variable is set in your system environment and is pointing to the correct directory.

Install Maven 3.1.0 from http://maven.apache.org/. Add the path to the mvn command to your PATH environment variable.

Configuring Maven

You need a special settings.xml in order to be able to build VASL. This file goes into your home directory in the .m2 subdirectory (the ~/.m2 folder). Use These contents but do replace the path to your JDK (if you have a path with spaces, you DON'T need to quote it):

	<settings>
		<profiles>
			<profile>
				<id>vasl</id>
				<activation>
					<activeByDefault>true</activeByDefault>
				</activation>
				<properties>
					<jdk>C:\your\path\to\jdk</jdk>
				</properties>
				<repositories>
					<repository>
						<name>Google Code</name>
						<id>googelcode</id>
						<releases>
							<enabled>true</enabled>
							<updatePolicy>always</updatePolicy>
							<checksumPolicy>warn</checksumPolicy>
						</releases>
						<snapshots>
							<enabled>true</enabled>
							<updatePolicy>never</updatePolicy>
							<checksumPolicy>fail</checksumPolicy>
						</snapshots>
						<url>https://oss.sonatype.org/content/groups/googlecode/</url>
						<layout>default</layout>
					</repository>
				</repositories>
			</profile>
		</profiles>
	</settings>

For an x64 program files location of the jdk, this worked:

<jdk>C:\Program Files\Java\jdk1.7.0_67</jdk>

Building VASL

In order to build VASL, checkout the code from GithUb on the command line or from within your favorite IDE. Then switch to the trunk directory that contains the Maven pom.xml and call it:

mvn clean install

You do not have to always call clean here. Clean will delete the target Directory. After you called clean, an install will rebuild the entire thing. With almost 7000 Counter files, that takes a while. It's usually enough to just call "mvn install". That will rebuild only the stuff you changed.

Coding

Within your IDE import the Project from the provided Maven pom.xml. Simple.

Running VASL

Run VASSAL with VASL from the command line with Maven using this command:

mvn exec:exec