close

Filter

loading table of contents...

Frontend Developer Manual / Version 2010

Table Of Contents

5.20.4 Import Released Themes from Maven Repository

Instead of directly uploading a built theme to Studio, you can first deploy the theme artifact to a Maven repository and later consume the theme artifact by a separate upload process. A good reason to do so is to continuously import snapshot builds of themes in development systems but only import released themes in testing and production environments.

Deploying the Theme Artifacts to a Maven Repository Server

The first step in order to deploy released themes is to release the theme artifacts themselves. In the current Blueprint, there is no direct way to deploy them, so you need to add some Maven steps to do so. The example snippet below shows a Maven profile to be added to the frontend/pom.xml using the buildhelper-maven-plugin to attach additional artifacts to the frontend module.

<profile>
<id>deploy-themes</id>
<build><plugins>
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>build-helper-maven-plugin</artifactId>
  <version>3.0.0</version>
  <executions>
  <execution>
    <id>attach-artifacts</id>
    <phase>package</phase>
    <goals>
      <goal>attach-artifact</goal>
    </goals>
    <configuration>
    <artifacts>
      <artifact>
        <file>target/themes/corporate-theme.zip</file>
        <type>zip</type>
        <classifier>corporate-theme</classifier>
      </artifact>
      <artifact>
        <file>target/themes/aurora-theme.zip</file>
        <type>zip</type>
        <classifier>aurora-theme</classifier>
      </artifact>
      <artifact>
        <file>target/themes/calista-theme.zip</file>
        <type>zip</type>
        <classifier>calista-theme</classifier>
      </artifact>
      <artifact>
        <file>target/themes/hybris-theme.zip</file>
        <type>zip</type>
        <classifier>hybris-theme</classifier>
      </artifact>
      <artifact>
        <file>target/themes/sitegenesis-theme.zip</file>
        <type>zip</type>
        <classifier>sitegenesis-theme</classifier>
      </artifact>
    </artifacts>
    </configuration>
  </execution>
  </executions>
</plugin>
</plugins>
</build>
</profile>

Example 5.11. Maven profile to attach artifacts to frontend module


Executing the Maven build with the goal deploy will lead to additional artifacts for each theme, with the artifactId frontend and the additional coordinates:

  • packaging: zip

  • classifier: <themename>-theme

Retrieve the Theme Artifacts

To retrieve the artifacts, you can now either use Maven together with the download-maven-plugin and execute something like this:

mvn com.googlecode.maven-download-plugin:\
    download-maven-plugin:\
    1.4.1:\
    artifact \
  -DgroupId=<your Blueprint groupId> \
  -DartifactId=frontend \
  -Dversion=<VERSION> \
  -Dclassifier=<THEME>-theme
  -Dtype=zip
  -DoutputDirectory=<SOME DIR>

Example 5.12. Retrieve artifact with maven-download-plugin


Alternatively, if your Maven repository server provides a REST API, you can use it in combination with curl or wget. In contrast to the Maven solution, you now will have to pass the credentials, whereas the Maven solution depends on a configured settings.xml.

To import themes without checking out a workspace and without building the Importer and the theme, you will also have to deploy the theme importer tool and retrieve it on your automation server.

Search Results

Table Of Contents