Skip to content

Library that allows to setup a number of Liferay Portal artifacts in the DB. It uses xml configuration and Liferay APIs to add all configured artifacts.

License

Notifications You must be signed in to change notification settings

mimacom/liferay-db-setup-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Liferay Portal DB Setup core Build Status Gitter chat

Library that allows to setup a number of Liferay artifacts in the DB. It uses xml configuration and Liferay APIs to add all configured artifacts.

Usage

Setup

We didn't publish binary yet so you'll need to build the jar yourself. Here are the steps to do it:

  1. Download sources.
  2. Install Maven 3.x.
  3. cd db-setup-core
  4. run mvn clean install
  5. grab jar from db-setup-core/target or use as a dependency in your maven project
<dependency>
    <groupId>com.mimacom.liferay</groupId>
    <artifactId>db-setup-core</artifactId>
    <version>2.1.2</version>
</dependency>

Integration

Run com.mimacom.liferay.portal.setup.LiferaySetup#setup(java.io.File) with following xml configuration:

<?xml version="1.0" encoding="UTF-8" ?>
<setup xmlns="http://www.mimacom.com/liferay/setup">
    <configuration>
        <runasuser>[email protected]</runasuser>
    </configuration>
 
    <!--
    This will add new custom field that can be used in theme to control if ads should display on
    particular page.
    -->
    <customFields>
        <field name="showAds" type="boolean" className="com.liferay.portal.model.Layout">
            <role-permission role-name="Guest" permission="view"/>
        </field>
    </customFields>
</setup>

When adding the library to a liferay OSGI module it will be necessary to specify the dependency into the bnd file:

Include-Resource: @db-setup-core-2.1.2.jar

the name of the file is the same that you will find inside the maven/gradle repository.

Compatibility

  • Version 2.x.x: Liferay Portal DXP/7.0.x
  • Version 1.x.x: Liferay Portal EE/CE 6.2.x

About

Library that allows to setup a number of Liferay Portal artifacts in the DB. It uses xml configuration and Liferay APIs to add all configured artifacts.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages