Implementing Framework Extensions using Java
Some of the most advanced framework customizations can be implemented using Java extensions.
To create such a Java extension, follow these steps:
- Create a Maven project that have access to the Oxygenxml Maven Repository by following the procedure from the Oxygen SDK page.
- Add a dependency on the oxygen-sdkin the pom.xml file:
 where you replace<dependency> <groupId>com.oxygenxml</groupId> <artifactId>oxygen-sdk</artifactId> <version>OXYGEN_VERSION</version> </dependency>OXYGEN_VERSIONwith the SDK version that corresponds to the version of Oxygen XML Web Author you are using.
- Implement a Java class that extends ro.sync.ecss.extensions.api.ExtensionsBundle.Important:The built-in frameworks already have such an implementation. It is recommended to extend this class for your particular framework so that you get the benefits of all the built-in features. For example, the name of this class for the DITA framework isro.sync.ecss.extensions.dita.DITAExtensionsBundle.To be able to compile your code, you should add the JAR files of the base framework to the Maven's classpath. For example:<dependency> <groupId>com.oxygenxml</groupId> <artifactId>oxygen-jars</artifactId> <classifier>framework-dita</classifier> <version>${oxygen.sdk.version}</version> <exclusions> <exclusion> <groupId>*</groupId> <artifactId>*</artifactId> </exclusion> </exclusions> </dependency>If you depend on a custom dita.jar file, you can declare a dependency with the scope of "system" like this: 
 where you replace<dependency> <groupId>fake.group</groupId> <artifactId>dita-jar</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>[PATH_TO_FRAMEWORKS_FOLDER]/dita/dita.jar</systemPath> </dependency>PATH_TO_FRAMEWORKS_FOLDERwith the path to your frameworks/ folder.
- Build your Maven project
          using:mvn package
- Copy the resulting JAR found in the target/ folder to a location in your framework folder.
- Add a reference to that JAR file in the Classpath tab of the Document Type Configuration dialog box for your particular framework.
