Child pages
  • How to publish an app in the Liferay Marketplace
Skip to end of metadata
Go to start of metadata


Liferay 6.2

Preparing the app

General Requirements

  1. App Name:

    1. Must not be longer than 50 characters.

  2. Compatibility:

    1. Please include a "+" at the end of the latest version when specifying version constraints in your liferay-plugin-package.properties file.

      liferay-versions=6.2.0+,6.2.10+

  3. Icon:

    1. Icons for your app must be exactly 90 pixels in both height and width.

    2. Must be in PNG, JPG, or GIF format. 

    3. The image size cannot exceed 512kb. 

    4. Animated images are prohibited.

  4. Screenshots:

    1. Screenshots for your app must not exceed 1080 pixels in width x 678 pixels in height.

    2. Must be in the JPG format. 

    3. The file size of each screenshot must not exceed 384KB.

    4. Each screenshot should preferably be the same size (each will be automatically scaled to match the aspect ratio of the above dimensions)

    5. It is preferable if they are named sequentially, for example fluffy-puppies-01.jpg, fluffy-puppies-02.jpg, and so on.

Deployment Requirements

  1. JRE: 
    1. Liferay Portal 6.2 targets Java 1.7.
    2. Set the Java version by overriding the ant.build.javac.target property in the Plugins SDK’s build.properties file.
  2. WAR:
    1. WAR files must contain a WEB-INF/liferay-plugin-package.properties file.
    2. WAR files must NOT contain any WEB-INF/liferay-plugin-package.xml file.
    3. WAR file names must NOT contain any commas.
    4. WAR file names must conform to the following naming convention: rl-context_name-plugin_type-A.B.C.D.war
      1. context_name: Alpha-numeric (including - and _) short name of your app. This name is used as the deployment context, and must not duplicate any other app’s context 
      2. plugin_type: one of the following: hooklayouttplportlettheme, or web.
      3. A.B.C.D: The 4 digit version of your WAR file. 4 digits must be used.
      4. Example: rl-address-validator-portlet-1.0.0.0.war
  3. WEB-INF/liferay-plugin-package.properties file:
    1. Property recommended.deployment.context must NOT be set.
    2. Setting property security-manager-enabled to true is mandatory for all paid apps on 6.1 CE GA3, 6.1 EE GA3, and later; the setting is optional for free apps.
    3. Setting this property to true enables Liferay’s Plugin Security Manager. If you’re enabling the security manager, you’ll also need to define your Portal Access Control List (PACL) in this file.
  4. Define the Portal Access Control List (PACL):
    1. Setup a empty liferay CE portal instance with the latest release and fix pack. Log in as Alaaeldin El-Nattar and download the latest release here: https://web.liferay.com/group/customer/products/portal/6.2
    2. Start the server as usual so the database is populated with the portal tables.
    3. Shutdown the server.
    4. Add the next property in the portal-ext.properties file: 

      portal.security.manager.strategy=liferay
    5. Add the next parameters in the /tomcat-7.0.62/bin/setenv.sh file

      -Djava.security.manager -Djava.security.policy==$CATALINA_BASE/conf/catalina.policy
    6. Open the next file: liferay-portal-6.2-ce-ga6/tomcat-7.0.62/conf/server.xml
    7. Find the <Host> tag and add the next attribute: deployXML="true". So it looks like this:

      <Host name="localhost" appBase="webapps"
      unpackWARs="true" autoDeploy="true" deployXML="true">
    8. Start the server with the next command: ./startup.sh -security
    9. A log saying "Using Security Manager" should be displayed.
    10. Wait for the server to be up.
    11. Before deploying any plugin make sure the property security-manager-enabled is set to "generate"

      liferay-plugin-package.properties

      security-manager-enabled=generate
    12. When you deploy your plugins and you will see a file like this: liferay-portal-6.2-ce-ga6/pacl-policy/plugin-name.pacl-policy
    13. Copy the content of plugin-name.pacl-policy and paste it in the liferay-plugin-package.properties file.
    14. Change the property security-manager-enabled to true.
    15. The file liferay-plugin-package.properties should look like this:

      name=Address Validator
      module-group-id=rivetlogic
      module-incremental-version=1
      tags=validator, validation, verification, verificator, address, google geocode, map, location
      short-description=The Address validator plugin enables the verification of \
      addresses entered by the user. It uses some third party services or APIs for that purpose.
      change-log=
      page-url=http://rivetlogic.com/
      author=Rivet Logic Corporation
      licenses=GPLv3
      portal-dependency-jars=\
      jstl-api.jar,\
      jstl-impl.jar
      long-description=The initial implementation uses Google Geocoding API, \
      but it can be extended to use different APIs. The Address validation is optional, \
      this means users can choose not use it and they can store not invalid addresses.

      liferay-versions=6.2.0+,6.2.10+

      security-manager-enabled=true

      security-manager-files-read=\
      ${liferay.web.portal.dir}/WEB-INF/lib/velocity.jar

      security-manager-hook-custom-jsp-dir-enabled=\
      true

      security-manager-hook-portal-properties-keys=\
      application.startup.events,\
      portlet.add.default.resource.check.whitelist,\
      rivetlogic.address.validation.api,\
      value.object.listener.com.liferay.portal.model.Address

      security-manager-properties-read=\
      file.separator,\
      java.version,\
      line.separator,\
      log4j.configDebug,\
      log4j.configuration,\
      log4j.configuratorClass,\
      log4j.debug,\
      log4j.defaultInitOverride,\
      log4j.ignoreTCL,\
      portal:velocity.engine.logger,\
      portal:velocity.engine.logger.category

      security-manager-services[portal]=\
      com.liferay.portal.service.ResourcePermissionLocalService#setResourcePermissions,\
      com.liferay.portal.service.RoleLocalService#getRole,\
      com.liferay.portlet.expando.service.ExpandoColumnLocalService#addColumn,\
      com.liferay.portlet.expando.service.ExpandoColumnLocalService#getColumn,\
      com.liferay.portlet.expando.service.ExpandoTableLocalService#addDefaultTable,\
      com.liferay.portlet.expando.service.ExpandoTableLocalService#getDefaultTable,\
      com.liferay.portal.service.RegionService#getRegion,\
      com.liferay.portal.service.CountryService#getCountry,\
      com.liferay.portal.service.CountryService#fetchCountryByA2,\
      com.liferay.portlet.expando.service.ExpandoValueLocalService#deleteValues,\
      com.liferay.portal.service.RoleLocalService#getRole,\
      com.liferay.portal.service.ResourcePermissionLocalService#setResourcePermissions

      security-manager-sockets-connect=\
      maps.googleapis.com:443

      security-manager-expando-bridge=\
      com.liferay.portal.model.Address

      Please be sure the plugin has not been deployed to the portal before. Many scripts runs when the plugin is installed the first time.

      If the plugin was installed before, please generate the PACL security file in another portal OR do these steps:

      + undeploy the plugin, remove it from webapps (tomcat), wait the logs shows the plugin is undeployed

      + shutdown liferay

      + clean tmp and work folders (tomcat)

      + drop the database and create it again

      + start liferay 

      + drop the plugin in the deploy folder

Liferay 7


  • No labels