This section explains the required steps to add, disable or remove an extension from the CoreMedia Blueprint workspace in general.
Note | |
---|---|
For most of the extensions, there is no single extension in the technical sense. See the Elastic Social extension, for instance. Instead, there is an integration, which consists of multiple extensions. The Elastic social integration, for example, consists of multiple Elastic Social extensions which augment other extensions, such as lc or p13n. The reason for this is, that in order to use an extension generally, but disable some particular extensions (lc for example), it must be possible to disable only the lc related aspect of this extension. On the other hand, it must be possible to use the lc extension without the other extension. So, it is not possible, for example, to put all Elastic Social modules into a single extension nor include them directly in other extensions. Therefore, you have an integration which consists of several extensions. |
Adding an Extension to the CoreMedia Blueprint workspace
To add an extension to CoreMedia Blueprint open the
project's root POM and move to the dependencyManagement
section. Import the
Extension Descriptor (a POM import) as shown in Example 4.27, “Activation of an Extension in the project's root POM”.
<dependencyManagement> <dependencies> ... <dependency> <groupId>${project.groupId}</groupId> <artifactId>my-blueprint-extension-bom</artifactId> <version>${project.version}</version> <scope>import</scope> </dependency> ... </dependencies> </dependencyManagement>
Example 4.27. Activation of an Extension in the project's root POM
Update the extensions configuration with the following call in the root folder of the workspace :
mvn com.coremedia.maven:\ coremedia-blueprint-maven-plugin:\ update-extensions
Disabling or Removing an Extension from the Blueprint workspace
The CoreMedia Blueprint Maven Plugin is a tool which supports developers to disable an extension in or remove an extension from the Blueprint workspace. Disabling an extension using this tool means that the provided feature will not be available and the source files are no longer part of the build process.
Caution | |
---|---|
Removing an extension means, that the source code of the extension will be disabled and removed from the workspace as well. Before you can remove an extension, you have to build the workspace once. |
To disable an extension, open a console and go to the Blueprint workspace. Call the disable-extensions
goal and identify the affected extension(s) by the Maven artifactId
of the extension descriptor (a BOM POM)
using the coremedia.project.extensions
option.
$ cd $BLUEPRINT_HOME $ mvn com.coremedia.maven:coremedia-blueprint-maven-plugin:\ disable-extensions \ -Dcoremedia.project.extensions=my-extension.bom,\ another-extension.bom
To remove an extension, use the remove-extensions
goal of this Maven plugin instead of
disable-extensions
. The next sections describe how you remove the predefined CoreMedia extensions.
Preparing the Workspace for Further Development
As described in the documentation of the CoreMedia Blueprint Maven Plugin
the POMs in the module modules/extension-config
will be
modified. The CoreMedia components in this workspace depend on these modules.
Therefore, when you want to start a web application like the CAE from the workspace using the Maven Tomcat 7 plugin. for example, the modified POMs must be available in the local Maven repository. To install them do the following:
$ cd $CM_BLUEPRINT_HOME/modules/extension-config $ mvn clean install
During further development the CoreMedia components of the Blueprint workspace will consider the changed set of extensions, that is, added extensions will be enabled and removed extensions will no longer be available.