Versions Compared

Key

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

...

Iterate your code more quickly

Reduce the VIVO build time

A full rebuild of VIVO may be necessary if you are changing the Java source code, or the contents of RDF files. However, if you are only making changes to the Freemarker templates, you can run the build script like this:

Code Block
ant deploy -Dskiptests=true

By choosing ant deploy instead of ant all or ant clean deploy, you are selecting an incremental build which will not re-compile all of the Java classes, or copy all of the unchanged files. By setting the option -skiptests=true, you are choosing not to run the unit tests. This is reasonable because the unit tests to not apply to the Freemarker templates.

After making your changes to the templates, you should perform a full build with unit tests.

Code Block
ant all

Don't restart VIVO until you need to

...

As mentioned above, VIVO will detect changes to Freemarker templates. By default, however, VIVO will not detect the changes immediately. The Freemarker framework caches the templates that it uses, and won't even look to see if a template has changed until 1 minute after it was last read from disk. In a production system, of course, that makes the accessing much more efficient. When you are making frequent changes, it's an annoyance.

Use The Developer Panel to defeat the Freemarker cache.

...