public static Version getVersion( Path pluginDir )
    {
        final String value = getElementValue( pluginDir, "/plugin/version" );

        if ( value == null || value.trim().isEmpty() )
        {
            return null;
        }

        return new Version( value );
    }
Returns the version of a plugin. The value is retrieved from the plugin.xml file of the plugin. If the value
could not be found, {@code null} will be returned.

@param pluginDir the path of the plugin directory.
@return the plugin's version.
xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginMetadataHelper.java