Search code examples
mavendependenciesliferayliferay-7

Liferay CE 7.2.1 GA2 - Resolve custom modules dependancies after upgrade


I have complete an upgrade of my Liferay from version CE 7.1.0 GA1 to Liferay CE 7.2.1 GA2.

I'm now stuck on my custom module dependancies to upgrade.

For example :

<dependency>
    <groupId>com.liferay.portal</groupId>
    <artifactId>com.liferay.portal.kernel</artifactId>
    <version>3.0.0</version>
    <scope>provided</scope>
</dependency>

In the portal-kernel.jar available in my bundle, i found the version 4.35.4 but it can't be imported via maven.

Is there a solution to have all version modules compatible with my new liferay versions ?

Thanks,


Solution

  • This could also work :

    <properties>
       <liferay.bom.version>7.2.1-1</liferay.bom.version>
    </properties>
    <dependencyManagement>
       <dependencies>
          <dependency>
                        <groupId>com.liferay.portal</groupId>
                        <artifactId>release.portal.bom</artifactId>
                        <version>${liferay.bom.version}</version>
                        <type>pom</type>
                        <scope>import</scope>
                    </dependency>
                    <dependency>
                        <groupId>com.liferay.portal</groupId>
                        <artifactId>release.portal.bom.compile.only</artifactId>
                        <version>${liferay.bom.version}</version>
                        <type>pom</type>
                        <scope>import</scope>
                    </dependency>
                    <dependency>
                        <groupId>com.liferay.portal</groupId>
                        <artifactId>release.portal.bom.third.party</artifactId>
                        <version>${liferay.bom.version}</version>
                        <type>pom</type>
                        <scope>import</scope>
                    </dependency>
                </dependencies>
            </dependencyManagement>