Message Boards

Liferay Maven Workspace

Michael Chang, modified 3 Years ago.

Liferay Maven Workspace

New Member Posts: 2 Join Date: 9/24/20 Recent Posts

Hello, 

in the last days and weeks I experimented different setups of Liferay using maven workspaces.

I generated these workspaces with blade cli

[code]

blade init v 7.3 -b maven

[/code]

and the root pom always contained a dependencyManagement section like this:

[code]

<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>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <version>4.3.0</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

[/code]

In the submodules which had dependencies with groupId com.liferay I had to uncomment the version, in order to deploy the module.

Today I created another maven workspace and it had not this dependencyManagemement section and the submodules are deployable, which is fine, but my colleagues asked me what`s the best setup for a maven workspace and I told them to do it with the dependencyManagement section in the root pom, but now it seems unnecessary.

So my question is, is there some work in progress right now and what`s the best setup for a new maven workspace?

Thanks,

Michael