Metadoor 2 Installation Instructions
1- Java 1.5 or higher
2- Apache ant 1.6.5 or higher
3- Jakarta tomcat 5.X or higher
4- Struts 1.2.4 or higher
5- mp (metdata parser)
1- PostgreSQL 8.1 and pgAdmin III
2- Hibernate 3.0
Download the source code and build files: http://nautilus.baruch.sc.edu/twiki_carocoops/pub/Metadoor/DeveloperNotes/meta-door2.zip.
Extract it to webapps folder inside your tomcat installation. Example: tomcatPath\webapps\meta-door2. Create a new context under tomcat with path /meta-door2 and docBase pointing to tomcatPath\webapps\meta-door2. You can easily do that using your tomcat admin application. Consult tomcat documentation if you are not sure how to do that.
Download the common java library jar files. http://nautilus.baruch.sc.edu/twiki_carocoops/pub/Metadoor/DeveloperNotes/common.zip
Copy the jar files to the common folder inside your tomcat installation. Example: tomcatPath\common
Metadoor 2 uses PostgreSQL database. You can use any database you like but you will need to change the database connection settings to match your database. I assume here that you will be using PostgreSQL database. You can Download PostgreSQL database along with pgAdminIII from here.
Download the SQL schema (metadoor_schema.sql) and base population records (metadoor_lookup.sql) from here. Start pgAdminIII and create a new database called metadata (this can be changed if you want). Load the metadoor_schema.sql file followed by metadoor_lookup.sql. You might get some foreign key violation errors upon executing metadoor_lookup.sql as the SQL was generated using pg_dump -a which apparently doesn't maintain the order that data needs to be inserted to avoid foreign key constraints violations. To resolve this issue move TOC entry 59 and TOC entry 63 before TOC entry 58 in metadoor_schema.sql and execute the file again.
Open the file tomcatPath\webapps\meta-door2\WEB-INF\src\build.properties. Change your tomcat and database settings here:
project.context.path=/meta-door2 (or whatever your context path is)
tomcat.dir=path to your tomcat installation directory
tomcat.manager.url=The URL to tomcat manager application. Usually in the form: http://ip:port/manager
tomcat.manager.username=Your tomcat manager user name
tomcat.manager.password=Your tomcat manager password
db.url=The URL to your database. If you are using PostgreSQL it should look something like this: jdbc:postgresql://ip:port/database name
db.driver=Your database driver. If you are using PostgreSQL it should be: org.postgresql.Driver
db.username=Your database user name
db.password=Your database password.
db.schema=Your database schema.
Open the file tomcatPath\webapps\meta-door2\WEB-INF\src\java\log4j.properties. Change your logging settings here:
log4j.appender.file.File=Path to where your want the log file to be saved
log4j.appender.rolling.File=Path to where your want the log file to be saved
Open the file: tomcatPath\conf\Catalina\localhost\meta-door2.xml (it will be named after your context path). Between the Context open and close tag you should enter a Resource tag. It should look something similar like this
username="Your database user name"
password="Your data base pasword"
driverClassName="Your database driver”
url="URL to your database”
The application assumes that mp (metadata parser install package at http://geology.usgs.gov/tools/metadata/all_win.exe) has been installed under the default option of C:\USGS and the files currently used to configure and run mp at webapps\meta-door2\exec
When you are done with all the above, run ant all from inside tomcatPath\webapps\meta-door2. If you did everything right this should compile all the files to the right locations successfully. Start tomcat and point it to your metadoor context path. If you are successful you will see the metadoor welcome page.