Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5207

Enable usage of Maven's scope:import for magnolia-project

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 5.0.2, 5.1
    • None
    • build
    • None
    • Yes
    • Yes

      This issue was cloned from MAGNOLIA-3545 - work has already been done with bundles and webapps.

      For magnolia_main, see patch attached to MAGNOLIA-3545 which gives an indication of what to do.

      When applying, check and compare before/after dependency:tree outputs of webapps and bundles, as well as contents of webapps.

      To facilitate project builds, our webapps (magnolia-empty-webapp, magnolia-bundled-webapp, magnolia-enterprise-webapp) should have their dependencies (Magnolia jars) in a dependencyManagement section. Instead of "just" depending on the magnolia-empty-webapp's pom, they should do so with the import scope.

      As a consequence, a webapp project would be able to do the following:

          <dependency>
            <groupId>info.magnolia</groupId>
            <artifactId>magnolia-bundled-webapp</artifactId>
            <version>4.3.8</version>
            <type>pom</type>
            <scope>import</scope>
          </dependency>
      
          <dependency>
            <groupId>info.magnolia</groupId>
            <artifactId>magnolia-module-dms</artifactId>
          </dependency>
      

      This essentially "injects" the dependencyManagement section of magnolia-bundled-webapp:4.3.8 into the current project, so the project can now depend on magnolia-module-dms (for example) without specifying its version. This frees project developer from having to dig out exactly which version of each and every module they need was bundled with the Magnolia bundle they want to use. (which is a pita) And of course, they can still specify a specific version it they need to.

      http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope

        Acceptance criteria

              gjoseph Magnolia International
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD