Version 6 (modified by 8 years ago) ( diff ) | ,
---|
OpenSpecimen HowTo Build from Source Code
Tags: OpenSpecimen Summary HowTo
This is the procedure for building the war
file. The Gradle build script can also be used to deploy OpenSpecimen to a local instance, but that is not covered here.
Prerequisites
- Java JDK v1.8
- Gradle 2.0
- git
- node.js 10+
- npm
- bower -
npm install -g bower
- grunt -
npm install -g grunt-cli
$JAVA_HOME
set to the JDK directory
Gotchas
- The first time I build OpenSpecimen using this method I had to upgrade node and npm before installing bower and grunt.
- Gradle could not find node because on Ubuntu it is called nodejs so I had to create a symbolic link
sudo ln -s nodejs node
in the directory/usr/local/bin/
.
Procedure
See: https://openspecimen.atlassian.net/wiki/pages/viewpage.action?pageId=1115955
- Download the source code from the releases tab of the Open Specimen Github Repository - Make sure to get the correct branch for the required version
- Edit the
build.properties
file with the correct values. Here are the values for the university LAMP servers. The other values not in this list can be deleted:app_home = /local/openspecimen_{version_number}/app app_data_dir = /local/openspecimen_{version_number}/app/osdata datasource_jndi = java:/comp/env/jdbc/openspecimen deployment_type = upgrade database_type = mysql show_sql = false plugin_dir = /local/openspecimen_{version_number}/app/plugins
cd
into thewww
directory- Run the command
npm install
- Run the command
bower install
cd ..
- Run the command
gradle build
Deploying to Tomcat
- Copy the
war
file to the Tomcatwebapps
directory. - Amend the file in the Tomcat directory
conf/context.xml
to set up the resource:<Resource name="jdbc/openspecimen" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="{database_username}" password="{database_password}" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/openspecimen" validationInterval="3600" testOnBorrow="true" validationQuery="Select 1 from dual" />
Note:
See TracWiki
for help on using the wiki.