Skip to content

Commit 49fcf93

Browse files
committed
Merge pull request #11 from daveneiman/dev
Update missing documentation and Ant build script descriptions
2 parents dd3c8c5 + 65d7553 commit 49fcf93

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ In order to run the FITS Web Service on a server it’s necessary to modify the
1818
The WAR file can be built from the source code using Ant. Alternatively it is available on the [FITS](http://fitstool.org/downloads#fits-servlet) website. Since the WAR file contains the version, it may be desirable to shorten this file name by removing this version number or just renaming the path to the application within the application server used to deploy the application. Note: The FITS Service version is contained within the WAR file's manifest file.
1919
Here is an example of the base URL for accessing this application without modification to the WAR file:
2020
`http://yourserver.yourdomain.com:<port>/fits/<endpoint>`
21-
Note: If you deploy the WAR file as fits-1.1.0.war then the URL examples contained here will need to contain `fits-1.1.0` instead of `fits`.
21+
Note: If you deploy the WAR file as fits-1.1.1.war (or whatever the version number happens to be then the URL examples contained here will need to contain `fits-1.1.1` instead of `fits`.
2222
The `<endpoint>` is one of the endpoints available within the FITS Service plus parameters to access the service.
2323

2424
### Endpoints
2525
There are currently two services provided by the web applciation.
26-
1. __/examine__ -- Examining a file and returning corresponding metadata containing both FITS output and standard schema output in XML format. (See [FITS](http://fitstool.org) for more information.)
26+
<br>1. __/examine__ -- Examining a file and returning corresponding metadata containing both FITS output and standard schema output in XML format. (See [FITS](http://fitstool.org) for more information.)
2727
Substitute 'examine' for `<endpoint>` (see above) plus add a 'file' parameter name with the path to the input file for a GET request or submit a POST request with form data with a 'file' parameter name containing the contents of the file as its payload.
2828
Examples:
2929
GET (could be from a browser or using curl) `http://yourserver.yourdomain.com:<port>/fits/examine?file=path/to/file`
3030
POST `curl -i --data-urlencode file=path/to/file http://yourserver.yourdomain.com:<port>/fits/examine`
31-
2. __/version__ -- Obtaining the version of FITS being used to examine input files returned in plain text format.
31+
<br>2. __/version__ -- Obtaining the version of FITS being used to examine input files returned in plain text format.
3232
Example:
3333
GET (could be from a browser or using curl) `http://yourserver.yourdomain.com:<port>/fits/version`
3434
### Web Interface
@@ -42,17 +42,17 @@ See <a href="#test-client">below</a> for a Java test client example.
4242
## <a name="tomcat"></a>Deploying to Tomcat 7 and Tomcat 8
4343
### Add Entries to catalina.properties
4444
It’s necessary to add the location of the FITS directory to the file `$CATALINA_BASE/conf/catalina.properties` then add the FITS lib folder JAR files. (See example below.)
45-
1. Add the “fits.home” environment variable.
46-
2. Add all “fits.home”/lib/ JAR files to the shared class loader classpath with a wildcard ‘*’ and the `${fits.home}` property substitution.
45+
<br>1. Add the “fits.home” environment variable.
46+
<br>2. Add all “fits.home”/lib/ JAR files to the shared class loader classpath with a wildcard ‘*’ and the `${fits.home}` property substitution.
4747
**Note: Do NOT add any JAR files that are contained in any of the FITS lib/ subdirectories to this classpath entry. They are added programmatically at runtime by the application.**
48-
3. (optional) Rather than using the default log4j.properties file located within the WAR file (which logs to a file within the Tomcat directory structure) it's possible to set up logging to point to an external log4j.properties file. Add a "log4j.configuration" property to catalina.properties pointing to this file. It can be either a full path or have the `file:` protocol at the beginning of the entry. This is managed by the class `edu.harvard.hul.ois.fits.service.listeners.LoggingConfigurator.java`
48+
<br>3. (optional) Rather than using the default log4j.properties file located within the WAR file (which logs to a file within the Tomcat directory structure) it's possible to set up logging to point to an external log4j.properties file. Add a "log4j.configuration" property to catalina.properties pointing to this file. It can be either a full path or have the `file:` protocol at the beginning of the entry. This is managed by the class `edu.harvard.hul.ois.fits.service.listeners.LoggingConfigurator.java`.
4949
#### catalina.properties example
5050
Add the following to the bottom of the file:
5151
`fits.home=path/to/fits/home'` (note: no final slash in path)
5252
`shared.loader=${fits.home}/lib/*.jar
53-
log4j.configuration=/Users/dan179/Documents/FITS/log4j.properties`
53+
log4j.configuration=/path/to/log4j.properties`
5454
or
55-
`log4j.configuration=file:/Users/dan179/Documents/FITS/log4j.properties`
55+
`log4j.configuration=file:/path/to/log4j.properties`
5656
#### Additional Information:
5757
**Class loading:** Within the WAR file’s META-INF directory is a Tomcat-specific file, context.xml. This file indicates to the Tomcat server to modify the Tomcat default class loader scheme for this application. The result is that, rather than load the WAR’s classes and JAR files first, classes on Tomcat’s shared classpath will be loaded first. This is critical given the nature of the custom class loaders used in FITS. (This file will be ignored if deploying to JBoss.)
5858

build.xml

+5-5
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<mkdir dir="${dist.dir}" />
9595
</target>
9696

97-
<target name="compile" depends="init">
97+
<target name="compile" depends="init" description="Compile all source code">
9898
<javac destdir="${classes.dir}" debug="true" srcdir="${src.dirs}:${test.dirs}" includeantruntime="false" source="1.8" target="1.8">
9999
<classpath>
100100
<fileset dir="WebContent/WEB-INF/lib">
@@ -109,7 +109,7 @@
109109
</javac>
110110
</target>
111111

112-
<target name="war" depends="compile">
112+
<target name="war" depends="compile" description="Build the WAR file">
113113
<antcall target="create-manifest" />
114114
<!-- Put logging configuration file into the classes directory -->
115115
<copy file="WebContent/WEB-INF/log4j.properties" todir="${classes.dir}" />
@@ -122,21 +122,21 @@
122122

123123
<!-- Must set environment variable CATALINA_HOME for location to deploy WAR file. -->
124124
<!-- For Eclipse set an environment variable from any task's "Ant build..." -->
125-
<target name="deploy-to-tomcat" description="Deploy the WAR file to Tomcat at server location.">
125+
<target name="deploy-to-tomcat" description="Deploy the WAR file to Tomcat at (configured) server location.">
126126
<fail unless="env.CATALINA_HOME" message="CATALINA_HOME not set. Cannot deploy ${war.name}."/>
127127
<copy file="${dist.dir}/${war.name}"
128128
todir="${env.CATALINA_HOME}/webapps"></copy>
129129
<echo message="${war.name} deployed to ${env.CATALINA_HOME}/webapps" />
130130
</target>
131131

132-
<target name="undeploy-from-tomcat" description="Undeploy the WAR file from Tomcat.">
132+
<target name="undeploy-from-tomcat" description="Undeploy the WAR file from Tomcat at (configured) server location.">
133133
<fail unless="env.CATALINA_HOME" message="CATALINA_HOME not set. Cannot undeploy ${war.name}."/>
134134
<available file="${env.CATALINA_HOME}/webapps/${war.name}" property="war.file.found"/>
135135
<fail unless="war.file.found" message="${env.CATALINA_HOME}/webapps/${war.name} does not exist." />
136136
<delete file="${env.CATALINA_HOME}/webapps/${war.name}" />
137137
</target>
138138

139-
<target name="clean">
139+
<target name="clean" description="Clean the project">
140140
<delete dir="${dist.dir}" />
141141
<delete dir="${classes.dir}" />
142142
<delete file="${manifest.dir}/${manifest.name}" failonerror="false" />

version.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
build.version=1.1.0
1+
build.version=1.1.1

0 commit comments

Comments
 (0)