...
Check out latest stable release from Subversion repository
Code Block git clone --branch duracloud-3.12.0 https://github.com/duracloud/duracloud
Set environment variables
Code Block export JAVA_OPTS="-XX:MaxPermSize=256m" export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=1024m"
- Configure Tomcat
Add to $CATALINA_HOME/conf/tomcat-users.xml
No Format <tomcat-users> <role rolename="manager-gui"/> <role rolename="manager-script"/> <role rolename="admin"/> <user username="[ANY-USERNAME]" password="[ANY-PASSWORD]" roles="admin,manager-gui,manager-script"/> </tomcat-users>
Add to $CATALINA_HOME/conf/server.xml
Add the config attribute "URIEncoding" with value "UTF-8" to your Tomcat Connector. Your connector may look like the following:
No Format <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" />
Start Tomcat
Code Block $CATALINA_HOME/bin/startup.sh
- Configure Maven3
Add tomcat user to $M2_HOME/conf/settings.xml. Make sure that the username and password used here match those included in the tomcat-users.xml file.
No Format <servers> <server> <id>tomcat-server</id> <username>[ANY-USERNAME]</username> <password>[ANY-PASSWORD]</password> </server> </servers>
- Build
From top of the source tree, execute (note that this build runs unit tests, but not integration tests):
Code Block mvn clean install -DskipIntTests
- Bonus, running Integration Tests
- Grab a copy of the file in the codebase under common-json/src/main/resources/test-config.json and place it somewhere on your system
- You'll need an account for each of the providers to be tested. Update the JSON file to include your credentials. These tests actually communicate with each storage provider and verify that the calls being made work properly
- Add an environment variable called DURACLOUD-TEST-CONFIG with the value being the full path to your updated credentials JSON file
From the top of the source tree, execute
Code Block mvn clean install -pl integration
...
To create a distributable zip of the storeclient , serviceclient, or reportclient which includes their dependencies, from within the project directory (//storeclient, //serviceclient, //reportclient) run
Code Block mvn install -Ppackage-client
- The packaged zip will be found under the project's target directory