com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Adding and Removing XML Element Touchpoint Actions

A p2 Installable Unit is installed using the facilities provided by touchpoint actions. There are two sets of touchpoints available, which are namely native touchpoints and eclipse touchpoints. In addition to the latter mentioned two touchpoints two new touchpoints actions have been introduced in Carbon, for adding and removing element to and from a XML file. There are touchpoints actions to copy, delete, rename and move files, but there wasn’t any touchpoint action to modify a file. The usage of these touchpoint actions are the same as other touchpoint actions and they can be executed in any p2 engine phase (such as, install, configure, uninstall, unconfigure). 

Touchpoint Formats

To add a touchpoint:

org.wso2.carbon.p2.touchpoint.addXMLElement(file:/path/to/xml/file,xpath:xpath/expression,element:<testElement name="sample"/>);

For example:

instructions.configure = \
org.wso2.carbon.p2.touchpoint.addXMLElement(file:${installFolder}/../../../repository/conf/tomcat/webapp-classloading-environments.xml,xpath:/Classloading/ExclusiveEnvironments,element:<ExclusiveEnvironment><Name>J2EE</Name></ExclusiveEnvironment>); \

To remove a touchpoint:

org.wso2.carbon.p2.touchpoint.removeXMLElement(file:path/to/xml/file,xpath:xpath/expression/testElement[@name='sample']);

For example:

instructions.uninstall = \
org.wso2.carbon.p2.touchpoint.removeXMLElement(file:${installFolder}/../../../repository/conf/tomcat/webapp-classloading-environments.xml,xpath:/Classloading/ExclusiveEnvironments/ExclusiveEnvironment[Name/text()="J2EE"]); \
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.