The Missing Maven Elements

I mentioned last time in The State of Maven Development, that we were missing a few items for our Maven users.

Well I have good news...

You can now build themes in Maven!

In pom.xml:

<build>
    <plugins>
        <plugin>
            <artifactid>maven-dependency-plugin</artifactid>
            <executions>
                <execution>
                    <phase>generate-resources</phase>
                    <goals>
                        <goal>copy-dependencies</goal>
                    </goals>
                    <configuration>
                        <outputdirectory>${project.build.directory}/deps</outputdirectory>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupid>com.liferay</groupid>
            <artifactid>com.liferay.portal.tools.theme.builder</artifactid>
            <version>1.0.0</version>
            <executions>
                <execution>
                    <phase>process-resources</phase>
                    <goals>
                        <goal>build-theme</goal>
                    </goals>
                    <configuration>
                        <diffsdir>src/main/webapp/</diffsdir>
                        <name>sample-maven-theme</name>
                        <outputdir>${project.build.directory}/${project.build.finalName}</outputdir>
                        <parentdir>${project.build.directory}/deps/com.liferay.frontend.theme.styled-2.0.13.jar</parentdir>
                        <parentname>_styled</parentname>
                        <templateextension>ftl</templateextension>
                        <unstyleddir>${project.build.directory}/deps/com.liferay.frontend.theme.unstyled-2.0.13.jar</unstyleddir>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupid>com.liferay</groupid>
            <artifactid>com.liferay.css.builder</artifactid>
            <version>1.0.20</version>
            <executions>
                <execution>
                    <id>default-build-css</id>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>build-css</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <portalcommonpath>/</portalcommonpath>
                <docrootdirname>src/main/resources</docrootdirname>
            </configuration>
        </plugin>
    </plugins>
</build>

<dependencies>
    <dependency>
        <groupid>com.liferay</groupid>
        <artifactid>com.liferay.frontend.theme.styled</artifactid>
        <version>2.0.13</version>
    </dependency>
    <dependency>
        <groupid>com.liferay</groupid>
        <artifactid>com.liferay.frontend.theme.unstyled</artifactid>
        <version>2.0.13</version>
    </dependency>
</dependencies>

 

We’ve also published 18 maven archetypes with many more on the way!

 

  • com.liferay:com.liferay.project.templates.activator
  • com.liferay:com.liferay.project.templates.api
  • com.liferay:com.liferay.project.templates.content.targeting.report
  • com.liferay:com.liferay.project.templates.content.targeting.rule
  • com.liferay:com.liferay.project.templates.content.targeting.tracking.action
  • com.liferay:com.liferay.project.templates.control.menu.entry
  • com.liferay:com.liferay.project.templates.fragment
  • com.liferay:com.liferay.project.templates.mvc.portlet
  • com.liferay:com.liferay.project.templates.panel.app
  • com.liferay:com.liferay.project.templates.portlet
  • com.liferay:com.liferay.project.templates.portlet.configuration.icon
  • com.liferay:com.liferay.project.templates.portlet.provider
  • com.liferay:com.liferay.project.templates.portlet.toolbar.contributor
  • com.liferay:com.liferay.project.templates.service
  • com.liferay:com.liferay.project.templates.service.builder
  • com.liferay:com.liferay.project.templates.service.wrapper
  • com.liferay:com.liferay.project.templates.simulation.panel.entry
  • com.liferay:com.liferay.project.templates.template.context.contributor

 

Check back with us as we continue to work on documentation, more archetypes including one new one that should make starting your next project much easier.

Blogs
That's amazing David ! Great news !

Any idea if Spring MVC Portlets are included in the "many more on the way" ?

Keep up the good work ! Liferay 7 seems like a huge step in the good direction !