Uploaded image for project: 'PUBLIC - Liferay Maven'
  1. PUBLIC - Liferay Maven
  2. MAVEN-265

Building a JSF / Primefaces portlet for DXP using Maven


    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Completed
    • Affects Version/s: Master
    • Fix Version/s: None
    • Component/s: Archetypes
    • Labels:


      My customer is trying to build a JSF / Primefaces portlet for DXP using Maven.
      He tried to follow the official documentation but he failed many times. I have tried the same and experienced the same.
      The customer would like to receive a set of detailed steps on how to create such a portlet.

      Here are the steps we tried so far:

      1. Tried to follow the instructions from here:
      These points were not clear for the customer:
      A) in settings.xml, are these settings correct?:
      B) when we generate a JSF or Primefaces plugin from scratch (using the IDE or mvn archetype:generate -Dfilter=liferay as described here https://customer.liferay.com/documentation/7.0/develop/tutorials/-/official_documentation/tutorials/generating-new-projects-using-archetypes) we get a resulting project that won't build because it has dependencies that don't exist anymore in DXP:


      2. Tried to follow the instructions from here:
      These points were not clear for the customer:
      A) The article talks about CE version and not the EE version:
      Namely: this file is mentioned: liferay-ce-portal-maven-[version].zip

      B) The article: https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/generating-new-projects-using-archetypes points us here http://www.liferayfaces.org/ to generate a JSF portlet, so we did:

      	mvn archetype:generate \
       -DarchetypeGroupId=com.liferay.faces.archetype \
       -DarchetypeArtifactId=com.liferay.faces.archetype.jsf.portlet \
       -DarchetypeVersion=5.0.1 \
       -DgroupId=com.mycompany \

      which works OK. Now we import the project into the (new) IDE, right-click the project, do liferay, liferay-maven, liferay:deploy, resulting in "Build Failure"

      3. Tried to follow the instructions from here: https://customer.liferay.com/documentation/7.0/develop/tutorials/-/official_documentation/tutorials/generating-new-projects-using-archetypes , we do:

      • mvn -e -X archetype:generate -Dfilter=liferay
      • choose 38 (liferay-servicebuilder-archetype)
      • choose the latest number 36: 7.0.0-m2
      • select some random groupId and artifactId, accept defaults for the rest

      This generates a project with java 1.6, using portal-service instead of kernel etc. Clearly not a DXP portlet.

      Please advise how to build a JSF / Primefaces portlet for DXP using Maven.




            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created:
                Days since last comment:
                3 years, 25 weeks ago


                Version Package