Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Upgrading from 1.8.x to 1.9.x

There are no ontology changes, and no significant changes to the code. However, there are a few small changes that you will need to make to your configuration in order for everything to work - in particular, see the Upgrading VIVO (*) web.xml change.

You will also need to move your customisations customizations into the new Maven structure.

Maven Structure

...

In moving to Maven, the code has now been re-organized to follow standard Maven conventions. As well as separating out the Java code into "API" projects for both Vitro and VIVO, with the templates, etc. in "webapp" projects, it also means that the directory structure follows the standard. So in "API", all the Java code is in the "src/main/java" directory, and in "webapp" the templates are in "src/main/webapp".

It is recommended that you treat the "installer" (or standard distribution) project(s) as a third tier, and keep local customizations only in these project(s).

For Java files, you can place them directly in the "webapp/src/main/java" directory - these will be compiled and included into your web application as class files. As class files are loaded ahead of jars in WEB-INF/lib, this even allows you to completely overwrite and replace classes that are supplied by the Vitro / VIVO jars.

Your theme - and any other template modifications, etc. - should be placed in the "webapp/src/main/webapp" directory.

Any additional dependencies that you need can be added to the webapp/pom.xml, and they will be retrieved from Maven central and included in the packaged application.

Making changes to the home directory

In order to add files to your home directory - e.g. to include additional filegraph RDF - they should be added to the "home/src/main/resources" directory.

If you need to remove a file that is supplied by Vitro / VIVO, then you will need to edit the home/src/main/assembly/home.xml file:

Code Block
<dependencySet>
    <outputDirectory>/</outputDirectory>
    <unpack>true</unpack>
    <unpackOptions>
        <excludes>
            <exclude></exclude>
        </excludes>
    </unpackOptions>
</dependencySet>

Code / Environment Changes

Capability Map

The Capability Map is only linked from the main menu bar, which is dynamically generated from statements in the triple store. The file that includes those these definitions is only loaded once during the first startup of VIVO.

...

Once saved, you should see the new entry in the menu bar , and be able to navigate to the capability map.

Note

The Capability Map depends on having People with Research Areas defined. If you do not have enough research areas to make the capability map useful, you can remove the menu entry by using the Page Management.page from the menu via Page Management.

AltMetrics on Profiles

In order for AltMetric badges to be displayed in publication lists in profiles, the AltMetric script needs to be included in the page. This would usually be in the individual--foaf-person.ftl, which is included in the "wilma" theme.

If you are using your own theme, you will need to ensure the following is part of your theme's templates/individual--foaf-person.ftl:

Code Block
${scripts.add('<script type="text/javascript" src="https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js"></script>')}

Map of Science

You should obtain a developer key from Google to use the Maps API. Please follow the guide here: https://developers.google.com/maps/documentation/javascript/get-api-key.

When you have a key, you will need to add it to your runtime.properties:

Code Block
google.maps.key=<insert your key>

Freemarker 2.3.23

The Freemarker library has been updated to 2.3.23. The only known code conflict - edu.cornell.mannlib.vitro.webapp.freemarker.config.FreemarkerConfigurationImpl.java - has been updated to have the correct method signature for getTemplate(). This is unlikely to affect any custom templates, however you should make a note to check them.

Anchor
web.xml
web.xml
web.xml

There are two important additions and one change that have been made to the web.xml file. If you are using a custom web.xml file, you need to ensure that you replicate them.

ImageProcessor Filter

In order for the new OpenJDK compatible ImageProcessor to function, you need to have the listener configured. Please add the following just after the StartupManager listener:

Code Block
<!-- TwelveMonkeys ImageIO listener -->
<listener>
   <display-name>ImageIO service provider loader/unloader</display-name>
   <listener-class>com.twelvemonkeys.servlet.image.IIOProviderContextListener</listener-class>
</listener>

SiteAdminController

The relationship between VIVO and Vitro code has been cleaned up, such that there are now no files in VIVO that entirely overwrite and replace a class of the same name in Vitro. However, in doing this, one VIVO specific servlet was introduced, requiring that the configuration in web.xml is updated.

...

Code Block
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.freemarker.VIVOSiteAdminController</servlet-class>

SiteMap and robots.txt

In order to produce the sitemap for profiles, and to embed the correct link to it in the robots.txt, a servlet has been introduced to provide that functionality.

...

Code Block
<servlet>
  <description>SiteMap support</description>
  <servlet-name>SiteMapServlet</servlet-name>
  <servlet-class>org.vivoweb.webapp.sitemap.SiteMapServlet</servlet-class>
</servlet>
<servlet-mapping>
  <servlet-name>SiteMapServlet</servlet-name>
  <url-pattern>/robots.txt</url-pattern>
</servlet-mapping>
<servlet-mapping>
  <servlet-name>SiteMapServlet</servlet-name>
  <url-pattern>/sitemap.xml</url-pattern>
</servlet-mapping>

head.ftl and propStatement-*.ftl

To support the output of citation meta tags, a new collection has been introduced called "metaTags". This is output by the theme in the head.ftl template. In your theme, please ensure that the head.ftl includes the following:

...

Also, if you have any custom templates for output property and data statements, please check them against the ones in VIVO that use the lib-meta-tags.ftl import and addCitationTags macro.

applicationSetup.n3

To use the new OpenJDK compatible ImageProcessor, you will need to adjust your applicationSetup.n3.

...