Uploaded image for project: 'PUBLIC - Liferay Documentation'
  1. PUBLIC - Liferay Documentation
  2. LRDOCS-7092

Configuring Target Platform in Maven

    Details

      Description

      Steps to configure Target Platform in a Maven Workspace are explained below. This is the manual way of completing this. A more efficient way of doing this is being tracked for development in LPS-90524.

      1. Create Maven Workspace
      2. Add the following three BOM dependencies to the root pom.xml:

      <dependencyManagement>
          <dependencies>
              <dependency>
                  <groupId>com.liferay.portal</groupId>
                  <artifactId>release.portal.bom</artifactId>
                  <version>${liferay.workspace.target.platform.version}</version>
                  <type>pom</type>
                  <scope>import</scope>
              </dependency>
              <dependency>
                  <groupId>com.liferay.portal</groupId>
                  <artifactId>release.portal.bom.compile.only</artifactId>
                  <version>${liferay.workspace.target.platform.version}</version>
                  <type>pom</type>
                  <scope>import</scope>
              </dependency>
              <dependency>
                  <groupId>com.liferay.portal</groupId>
                  <artifactId>release.portal.bom.third.party</artifactId>
                  <version>${liferay.workspace.target.platform.version}</version>
                  <type>pom</type>
                  <scope>import</scope>
              </dependency>
          </dependencies>
      </dependencyManagement>
      

      3. Go through the rest of the POMs and remove <version> tags for all "managed" artifacts, which would be where the <groupId>, <artifactId>, and versions point to Liferay BOMs.

        Attachments

          Activity

            People

            • Assignee:
              richard.sezov Rich Sezov
              Reporter:
              cody.hoag Cody Hoag
              Subject Matter Expert:
              Gregory Amerson
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                7.2.x