How to Build the Global Javadoc and Update SRD

Last modified by Ecaterina Moraru (Valica) on 2017/09/04 14:06

Building the Javadocs

The code for building the Global Javadoc is on GitHub in xwiki-contrib.

It users the following scripts:

  • javadoc.sh: general script launching all the scripts. You need to edit this script to change the TAG and VERSION

The choose the tag you either use majorVersion.minorVersion.x if it's one of the last 2 branches, or majorVersion.minorVersion.latestRevision if it's an older version.
The version should be majorVersion.minorVersion.x and is used for naming the files and directories.

  • javadoc-updatecode.sh: clones the github repositories or updates them, makes sure the proper tag or branch is checked out, builds some modules which need to be build (wikimodel, rest model, etc.) because they generate java sources
  • listapis.sh: lists the available scripting bindings in the java sources. 

This is used to compare bindings from one version to another in order to create new entries in the Wiki. The entries need to be created manually (see below).

  • javadoc-build.sh: builds the global javadoc

Updating the Wiki

If a new service is available in XWiki a diff between the previous api list and the new one will show the Java class and the name of the binding. Here is an example:

61,62d63
< @Named("localization")
< public class LocalizationScriptService implements ScriptService
85,87d85
< @Component
< @Named("solr")
< public class SolrIndexScriptService implements ScriptService

This shows that there are 2 new bindings $services.localization and $services.solr which are implemented by LocalizationScriptService and SolrIndexScriptService.
We find the code using the following command:

ludovic:current ludovic$ find . -name LocalizationScriptService\*
./xwiki-platform/xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-script/src/main/java/org/xwiki/localization/script/internal/LocalizationScriptService.java

We get the class name which is "org.xwiki.localization.script.internal.LocalizationScriptService" and the module from the pom which is "xwiki-platform-localization-script". This information is filled in the binding page in the platform wiki below. Note that we also need to verify that the module is bundled in XWiki, otherwise we should not document it on SRD.

localization.png

It's important to fill in the starting version from which the binding appeared in XWiki. 

Future

An experimental pom.xml has also been created but right now is excludes internal classes from the javadoc build, and we for now need these classes.

Tags:
Created by Ludovic Dubost on 2012/08/06 21:29
   

Get Connected