Policy webservice for OpenTox
Java
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 11 commits ahead, 3 commits behind amaunz:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
README
pom.xml

README

This is OpenTox Policy service. 

1. Compile

1.1. Make sure the following entry is configured in your .m2/settings.xml 

<!-- Start config -->
<profiles>
...
    <profile>
      <id>policy-test</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
	<openssouser>user</openssouser>
	<openssopassword>The password</openssopassword>
	<openssoservice>URI of the The OpenSSO/OpenAM service</openssoservice>
      </properties>
    </profile>
</profiles>    
<!-- End config-->

1.2. Build by 
>mvn package

The output looks like:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Policy service
[INFO]    task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 1 resource
[....
[INFO] Packaging webapp
[INFO] Assembling webapp[Pol] in [{your-dir}/Pol-0.0.3-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources[{your-dir}/Pol/src/main/webapp]
[INFO] Webapp assembled in[516 msecs]
[INFO] Building war: {your-dir}/target/Pol-0.0.3-SNAPSHOT.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 28 seconds
[INFO] Finished at: Wed Jul 20 12:22:19 EEST 2011
[INFO] Final Memory: 19M/220M
[INFO] ------------------------------------------------------------------------

The .war file will be in the target folder. 

2. Run by
>mvn tomcat:run

3. Or deploy into a servlet container
3.1. MySQL
The Policy service requires MySQL and existing 'pol' database :

CREATE DATABASE Pol;

Create database table(s) as in https://github.com/vedina/Pol/blob/master/src/main/resources/org/opentox/pol/db.sql

3.2. Configuration

If the Pol.war was not compiled with the correct settings, as described in 1), these could be changed after deployment:

Edit the following file:

{tomcat}/webapps/Pol/WEB-INF/classes/org/opentox/pol/admin.properties 

# Start admin.properties
# Admin account that was chosen at installation of OpenAM. Used to connect to localhost only.
user=[OPENSSO/OPENAM ADMIN USER]
pw=[YOUR OPENSSO/OPENAM PASSWORD]
# Give the base URI of the deployed OpenAM service here, e.g. http://myhost.mydomain:8180/opensso
host=[OPENSSO/OPENAM URI]
# End admin.properties