Page tree
Skip to end of metadata
Go to start of metadata

Related Tickets

SUPPORT-8601 - Getting issue details... STATUS

SUPPORT-8188 - Getting issue details... STATUS

SUPPORT-8535 - Getting issue details... STATUS

ARCH-60 - Getting issue details... STATUS

ARCH-58 - Getting issue details... STATUS

Related Comments

https://documentation.magnolia-cms.com/display/DOCS56/Release+notes+for+Magnolia+CORE+5.6.5?focusedCommentId=157689649#comment-157689649

https://documentation.magnolia-cms.com/display/DOCS56/Release+notes+for+Magnolia+CORE+5.6.3?focusedCommentId=156403946#comment-156403946

The Problem

Consider a customer/partner which used version 1.2.2 of the magnolia-project-archetype. Their pom would look like this:

1.2.2 Version
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>info.magnolia.webapps</groupId>
  <artifactId>enterprise</artifactId>
  <name>enterprise (parent pom)</name>
  <version>1.0-SNAPSHOT</version>
  <packaging>pom</packaging>

  <properties>
    <magnoliaVersion>5.6.5</magnoliaVersion>
    <javaVersion>1.6</javaVersion>
  </properties>

  <!-- Fill the following in, so you can use the release plugin -->
  <scm>
    <connection/>
    <developerConnection/>
    <url/>
  </scm>

  <dependencyManagement>
    <dependencies>
      <!-- Due to a bug in Maven 2, we have to import info.magnolia:magnolia-project here.
           It would normally not be needed, since info.magnolia:magnolia-bundle-parent already imports it. (see below)
           The dependency to info.magnolia:magnolia-project needs to be BEFORE the dependency
           to info.magnolia:magnolia-bundle-parent, otherwise it doesn't work either.
           Also note that this is assuming magnolia-project and magnolia-ui-project have the same version number as
           magnolia-bundle-parent, which not always be true in the future.
           If you are using Maven 3, you should not need the 2 dependencies below, and all should be well.
       -->
      <dependency>
        <groupId>info.magnolia</groupId>
        <artifactId>magnolia-project</artifactId>
        <version>${magnoliaVersion}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>info.magnolia.ui</groupId>
        <artifactId>magnolia-ui-project</artifactId>
        <version>${magnoliaVersion}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- Importing dependencyManagement of CE bundle. This means you don't have to specify versions of modules you depend on (unless you want a different version than that of the bundle). -->
      <dependency>
        <groupId>info.magnolia.bundle</groupId>
        <artifactId>magnolia-bundle-parent</artifactId>
        <version>${magnoliaVersion}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- If you want to use the Enterprise Edition, use info.magnolia.eebundle:magnolia-enterprise-bundle-parent.
      If you are using Maven 2, for the same reasons as above, you will have to keep the dependency to the CE bundle as well. If you are using Maven 3, just keep this one dependency below and remove the above 3.
      <dependency>
        <groupId>info.magnolia.eebundle</groupId>
        <artifactId>magnolia-enterprise-bundle-parent</artifactId>
        <version>${magnoliaVersion}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      -->

      <!-- TEST -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>


  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>${javaVersion}</source>
          <target>${javaVersion}</target>
        </configuration>
      </plugin>
    </plugins>

    <!-- default resources configuration which will filter your module descriptors -->
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*</include>
        </includes>
      </resource>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
        <includes>
          <include>META-INF/magnolia/*</include>
        </includes>
      </resource>
    </resources>
  </build>

  <repositories>
    <repository>
      <id>magnolia.public</id>
      <url>https://nexus.magnolia-cms.com/content/groups/public</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
    <!-- IF YOU NEED MODULES FROM THE ENTERPRISE VERSION, UNCOMMENT THE FOLLOWING REPOSITORY -->
    <!--
    <repository>
      <id>magnolia.enterprise.releases</id>
      <url>https://nexus.magnolia-cms.com/content/repositories/magnolia.enterprise.releases</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    -->
    <repository>
      <id>vaadin-addons</id>
      <url>https://maven.vaadin.com/vaadin-addons</url>
    </repository>
  </repositories>

  <modules>
    <module>enterprise-webapp</module>
  </modules>
</project>

The Solution

My proposal is to suggest that dependencies should be made on bundle poms and the other dependencies need to be removed. So we need a section in the release notes which describes this issue.

This change has been made in the latest version magnolia-project-archetype (1.2.4-SNAPSHOT). However you can still run into problems like the one described in ARCH-58.

Community
<dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>info.magnolia.bundle</groupId>
        <artifactId>magnolia-bundle-parent</artifactId>
        <version>${magnoliaVersion}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
</dependencyManagement>
Enterprise
<dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>info.magnolia.eebundle</groupId>
        <artifactId>magnolia-enterprise-bundle-parent</artifactId>
        <version>${magnoliaVersion}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
</dependencyManagement>
  • No labels