This section describes how to use the CoreMedia Webresources Maven Plugin to transform your web resources to serverimportable content.
The CoreMedia Webresources Maven Plugin processes a certain kind of dependency:
The Blueprint's theme modules provide such artifacts by default.
The module which uses this plugin must depend on the themes to be processed. The type and the classifier are important for the plugin to recognize the dependency as a theme to be processed.
<dependency> <groupId>myproject.example.com</groupId> <artifactId>my-theme</artifactId> <version>1.2.3</version> <classifier>theme</classifier> <type>zip</type> <scope>runtime</scope> </dependency>
If the theme depends on other themes, you need an additional pom dependency in order to make your module and this plugin aware of the transitivity:
<dependency> <groupId>myproject.example.com</groupId> <artifactId>my-theme</artifactId> <version>1.2.3</version> <type>pom</type> <scope>runtime</scope> </dependency>
Add the following snippet to the build/plugins section of your pom:
<!-- Create Webresource content in target folder --> <plugin> <groupId>com.coremedia.maven</groupId> <artifactId>coremedia-webresource-content-maven-plugin</artifactId> <!-- Provide doctypes to create web resources as content--> <dependencies> <dependency> <groupId>${project.groupId}</groupId> <artifactId>contentserver-blueprint-component</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>com.coremedia.cms</groupId> <artifactId>cap-importer</artifactId> <version>${cms.version}</version> </dependency> <dependency> <groupId>com.coremedia.cms</groupId> <artifactId>cap-unified-api</artifactId> <version>${cms.version}</version> </dependency> <dependency> <groupId>com.coremedia.cms</groupId> <artifactId>serverimportexport</artifactId> <version>${cms.version}</version> </dependency> <dependency> <groupId>com.coremedia.cms</groupId> <artifactId>cap-client-embedded</artifactId> <version>${cms.version}</version> </dependency> <dependency> <groupId>com.coremedia.cms</groupId> <artifactId>coremedia-xml</artifactId> <version>${cms.version}</version> </dependency> </dependencies> <executions> <execution> <id>compile-resource-corporate-testdata</id> <goals> <goal>compile</goal> </goals> <phase>compile</phase> </execution> </executions> </plugin>
The document type dependency is needed only for technical reasons (the plugin uses a temporary content server internally). It is not for flexibility. The plugin needs the Blueprint document types, esp. CMAbstractCode and its subtypes. Furthermore the plugin needs some components from the cms-core. Your core-version must be injected here.