[MAGNOLIA-5207] Enable usage of Maven's scope:import for magnolia-project Created: 29/Jul/13  Updated: 08/Oct/13  Resolved: 07/Aug/13

Status: Closed
Project: Magnolia
Component/s: build
Affects Version/s: None
Fix Version/s: 5.0.2, 5.1

Type: Improvement Priority: Major
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones MAGNOLIA-3545 Enable usage of Maven's scope:import ... Closed
is cloned by MGNLUI-1877 Enable usage of Maven's scope:import ... Closed
dependency
is depended upon by MAGNOLIA-3534 Update commons-digester dependency Closed
relation
is related to MGNLEE-284 Use scope:import if possible Closed
is related to MAGNOLIA-4728 Add demo-project / demo-features to c... Closed
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Release notes required:
Yes

 Description   

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



 Comments   
Comment by Magnolia International [ 05/Aug/13 ]

Updated Tika dependency and added exclusions (see MAGNOLIA-5212). Adapted ce-bundle (which now imports the depMgt from info.magnolia:magnolia-project), nothing to do for ee-bundle which already imported ce-bundle.

Comment by Magnolia International [ 07/Aug/13 ]

Had to include an ugly work around for this to working in ee-bundle, due to a Maven 2 bug. See ee-bundle's pom.xml for details.

Generated at Mon Feb 12 04:02:59 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.