Skip to content
Steve Fisher edited this page Aug 17, 2017 · 18 revisions

Purpose

This page is aimed at developers. It does not tell you how to install or use icat.server but how to test any modifications you may make. The build and test relies upon maven - so there is a pom.xml in the top directory. You may choose to develop with an IDE; both Eclipse and NetBeans work with maven however no artefacts from these IDEs are stored in GitHub.

What to do

The development and test procedure requires a dedicated database (MySQL, MariaDB or Oracle) and some dedicated disk space. It is dedicated in the sense that the tests will overwrite the database and the file areas.

Install an authn.db authenticator with the following accounts:

  • notroot / password
  • piOne / piOne
  • piTwo / piTwo
  • root / password
  • guest / guess

Install an icat.server (and if 4.9.0 or greater an icat.lucene)

Create or edit ~/.m2/settings.xml to contain a suitably modified version of:

<settings>
   <profiles>
      <profile>
         <activation>
             <activeByDefault>true</activeByDefault>
         </activation>
         <properties>
             <serverUrl>https://smfisher:8181</serverUrl>
             <luceneUrl>https://smfisher:8181</luceneUrl>
             <javax.net.ssl.trustStore>/home/fisher/pf/glassfish4/glassfish/domains/domain1/config/cacerts.jks</javax.net.ssl.trustStore>
             <containerHome>/home/fisher/pf/glassfish4</containerHome>
         </properties>
      </profile>
   </profiles>
</settings>

When you run maven it will attempt to deploy to glassfish. For this to work you must have asadmin in your path and have one domain configured to run on port 4848. It is deployed with --force=true so that it should overwrite anything currently deployed. Currently it uses whatever configuration files are found in the domains config directory. This will change shortly when we move to packaging property files with the application.

Rather than running mvn install you may prefer to run mvn install -DskipTests and then run the tests from your IDE in which case you should ensure that serverUrl, luceneUrl and serverCert are set as system properties. When running from maven, the properties are taken from the ~/.m2/settings.xml as environment variables and passed into the tests as system properties. These settings are not all required for the icat.server - some are needed for the ids.server.

Clone this wiki locally