-
Notifications
You must be signed in to change notification settings - Fork 21
Build SANDAG Jar
This section describes the process to build SANDAG jar file (sandag_abm.jar) and is divided in the following sub-sections:
- Go to https://www.eclipse.org/downloads/ and download Eclipse 2019-06. File: eclipse-inst-win64.exe (52.0 MB)
- During installation choose "Eclipse IDE for Java Developers" and follow instructions to complete the installation
- After finish, launch Eclipse. Set workspace to your desired directory or keep it to default.
- Go to https://maven.apache.org/download.cgi and download "apache-maven-3.6.1-bin.zip"
- Extract to a desired directory and install with help from https://maven.apache.org/install.html
- Add bin directory (ex. software\apache-maven-3.6.1\bin) to PATH in your system environment variables
- Go to https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- Download Windows x64 ("jdk-8u221-windows-x64.exe") under "Java SE Development Kit 8u221" and install
- Add java directory as JAVA_PATH (ex. C:\Program Files\Java\jdk1.8.0_221) in your system environment variables
- Install python 2.7.15 64-bit version (https://www.python.org/downloads/release/python-2715/) - download "Windows x86-64 MSI installer" and install
Instructions are available at https://phoenixnap.com/kb/install-pip-windows
- Check if you already have pip. On a command prompt run: pip --version
- If an error then pip is not installed and would need to be installed
- download "get-pip.py" from here: https://bootstrap.pypa.io/get-pip.py
- open command prompt as administrator
- navigate to the get download directory and run: python get-pip.py
- try pip --version on a newly opened command prompt
- if pip is still not found. Then you have to mare sure that your environment variables are set correctly. Double check "Set Environment Variables" steps.
- Go to https://www.microsoft.com/en-us/download/details.aspx?id=44266
- Click on download to save "VCForPython27.msi"
- Double click on the installer to install
Instructions are available here: https://stackoverflow.com/questions/23734172/install-py2exe-for-python-2-7-over-pip-this-package-requires-python-3-3-or-late
- open command prompt as Administrator
- Run on the command prompt: pip install http://sourceforge.net/projects/py2exe/files/latest/download?source=files
Instructions are available here: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
- download installer for windows: https://git-scm.com/download/win
- To install, double click on the installer and follow instructions
- Go to https://tortoisegit.org/download/
- Download installer for windows
- To install, double click on the installer and follow instructions
Set environment variable to python install - python 2.7.15
- Open system properties --> Advanced System Settings --> Environment variables.. --> Select PATH under "System Variables" --> Click Edit and add your python installation path at the end of it, ex. C:\Program Files\Python27
- under system variables
- New --> PY_HOME = C:\Program Files\Python27
- Again, new --> PYTHONPATH = %PY_HOME%\Lib;%PY_HOME%\DLLs;%PY_HOME%\Lib\lib-tk;C:\another-library
- click on "PATH" and then "Edit.."
- Click on "New" and add "%PY_HOME%
- Again, click on "New" and add "%PY_HOME%\Scripts"
- Click OK on all windows
-
Create a Local Git Repository
- Download SANDAG GitHub repository from here: https://github.com/SANDAG/ABM
- You can use git and tortoise git and clone the directory to your local machine
- Clone the desired branch, ex. "ABM2_TRUNK"
-
Open eclipse
- Import Local Git Repository
- File --> import --> Git --> Projects from Git --> Existing local repository --> Add the cloned SANDAG ABM repository and finish.
- Import --> import as general project
- Keep default project name
- Convert to Maven project.
- Open Package Explorer
- Right click on the project and go to configure--> convert to Maven
- Will take some time so be patient
- Make sure JRE is set to JDK 1.8.0_221
- Right click on the project --> Properties --> Java Build Path
- If JRE System Library (jdk1.8.0_221) is not present under Libraries then click on "Add Library..."
- Choose "JRE System Library and click "Next >"
- If Workspace default JRE is "jdk1.8.0.221" click Finish
- Else select "Alternate JRE" and select "jdk1.8.0.221" from drop down.
- If not present in drop down, click on "Installed JREs..."
- Click "Add...", choose JRE Type as "Standard VM"
- For "JRE Home", click on "Directory..." and Select your jdk installation directory (ex. C:\Program Files\Java\jdk1.8.0_221)
- Click "Finish"
- Bring you back to "Installed JREs" window, Select the just added jdk under installed JREs and click "Apply and Close"
- Bring you back to "Add Library" window. Double check that the aded jdk is selected for "Alternate JRE"
- Click "Finish"
- Bring you back to Properties window. Click "Apply and Close"
- Import Local Git Repository
-
Build a Maven Project
- Connect to SANDAG VPN (required to download Maven dependencies)
- Right click on the maven project under package explorer
- Choose Run As --> 4 Maven build... (sometimes it is 5 Maven build...)
- Under the "Edit Configuration" window
- Set the following under the tab "JRE"
- Make sure Runtime JRE is set to jdk1.8
- If not, select the jdk1.8 under "Alternate JRE:"
- Set the following under the tab "Main"
- Goals: clean package
- Profiles: 2016
- Base Directory must be already set to your project
- User settings must be already set to settings.xml under your local user directory
- Click "Run"
- Set the following under the tab "JRE"
-
This should results in a successful build. The build files are stored here: {project_directory}\target\SANDAG CT-RAMP Activity Based Model\version_14_2_0
If build fails, contact Wu.Sun@sandag.org for support.