-
Notifications
You must be signed in to change notification settings - Fork 21
Build SANDAG Jar
Nagendra S Dhakar edited this page May 23, 2020
·
10 revisions
This section describes the process to build SANDAG jar file (sandag_abm.jar). The section 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 default.
- got to https://maven.apache.org/download.cgi
- download "apache-maven-3.6.1-bin.zip"
- extract to the desired directory
- install with help from https://maven.apache.org/install.html
- add bin directory (ex. C:\Projects\SANDAG Maintenance\JarBuild\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
- check if you already have pip. On a command prompt run: pip --version
- if an error then pip is not installaed and you need to install
- 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.
- These instructions are available at https://phoenixnap.com/kb/install-pip-windows)
- 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 this 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 --> PYTHON_PATH = %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. "ABM_EMME"
-
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" This should results in a successful build. If build fails contact [email protected] for support.
- Set the following under the tab "JRE"
The build files are stored here: {project_directory}\target\SANDAG CT-RAMP Activity Based Model\version_14_2_0
When recent changes are pulled from Git
- Right click on the project --> Compare with --> HEAD revision
- Build the project using steps in "Build A Maven Project"