Skip to content

Setting Up Command Line Environment with SVN

manny kung edited this page May 18, 2018 · 1 revision

Setting Up Command Line Environment with SVN

(1) Required tools

a. Java SE Development Kit version 8u71 or higher.

b. Subversion version 1.6 or newer.

c. Maven version 3.0 or newer.

d. GitHub's Git

(2) Checking out from GitHub's Repository via SVN Client

A. The url for the current codebase is at https://github.com/mars-sim/mars-sim.git

B. Get the trunk branch and make a copy of the git on your hard drive. The Subversion bridge maps trunk to the Git HEAD branch (which is usually master). Type:

svn co --depth empty https://github.com/mars-sim/mars-sim.git
cd mars-sim.git
svn up trunk

Note: the step above needs to be done only once.

(3) Building and Running mars-sim

a. From the directory in which you checked out the Mars Simulation Project code, go to the "mars-sim" subdirectory.

b. Run the following three commands in one line to compile the classes in all of the maven projects.

mvn clean package install

Note that this will wipe clean the old compiled files, run unit tests on all of the maven projects and generate artifact jar files for them in the local maven repository.

c. Go to the mars-sim-main/target/ directory. You should see the compiled jar called "mars-sim-main-version#-jar-with-dependencies.jar".

d. To start the simulation, just double click this jar to run it.

e. Alternatively, you may want to see the logging statements in the console by typing in the following to start the simulation:

java -jar mars-sim-main-version#-jar-with-dependencies.jar 

(4) Working with the Subversion Code Repository

A. If other developers committed changes recently,

i. Get an empty checkout of the branches directory where all of the non-HEAD branches live and making feature branches :

svn up --depth empty branches

ii. Update the trunk branch, type :

svn update

iii. To see what files are different from your local checked-out copy of the project and the subversion repository, type:

svn status

B. If you want to commit new changes,

i. Get an empty checkout of the branches directory where all of the non-HEAD branches live and making feature branches :

svn up --depth empty branches

ii. Add new features and bug fixes

iii. To commit the changes in your local checked-out copy of the project back into the repository, type:

svn commit -m 'svn commit test 1'

Note: see GH's help on Support for Subversion clients.

Note : for more information on using subversion, see Version Control with Subversion.