Theme Builder Plugin

The Theme Builder plugin lets you build Liferay theme files in your project. Visit the Building Themes in a Maven Project tutorial to learn more about applying Theme Builder to your Maven project.

Usage

To use the plugin, include it in your project’s root pom.xml file:

<build>
    <plugins>
    ...
        <plugin>
            <groupId>com.liferay</groupId>
            <artifactId>com.liferay.portal.tools.theme.builder</artifactId>
            <version>1.1.7</version>
            <executions>
                <execution>
                    <phase>generate-resources</phase>
                    <goals>
                        <goal>build</goal>
                    </goals>
                    <configuration>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        ...
    </plugins>
</build>

You can view an example POM containing the Theme Builder configuration here.

Goals

The plugin adds one Maven goal to your project:

NameDescription
theme-builder:buildBuilds the theme files.

Available Parameters

You can set the following parameters in the <configuration> section of the POM:

Parameter NameTypeDefault ValueDescription
diffsDirFile${maven.war.src}The directory that contains the files to copy over the parent theme.
nameString${project.artifactId}The name of the new theme.
outputDirFile${project.build.directory}/${project.build.finalName}The directory where to build the theme.
parentDirFilenullThe directory of the parent theme.
parentNameStringnullThe name of the parent theme.
templateExtensionString"ftl"The extension of the template files, usually "ftl" or "vm".
unstyledDirFilenullThe directory of Liferay Frontend Theme Unstyled.

You can also manage the com.liferay.frontend.theme.styled and com.liferay.frontend.theme.unstyled default theme dependencies provided by the Theme Builder in your pom.xml. They can be modified by adding them as project dependencies:

<project>
    ...
    <dependencies>
        ...
        <dependency>
            <groupId>com.liferay</groupId>
            <artifactId>com.liferay.frontend.theme.styled</artifactId>
            <version>3.0.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.liferay</groupId>
            <artifactId>com.liferay.frontend.theme.unstyled</artifactId>
            <version>3.0.4</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>

There is an additional Liferay theme-related dependency you can manage this way that’s provided by the CSS Builder. See this section for more information.

« Source Formatter PluginTLD Formatter Plugin »
この記事は役に立ちましたか?
0人中0人がこの記事が役に立ったと言っています