[MAGNOLIA-5902] magnolia-bundled-webapp 5.3.2 brings in 5.2 dependencies Created: 02/Sep/14  Updated: 06/Sep/14  Resolved: 06/Sep/14

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Joerg von Frantzius Assignee: Unassigned
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File magnolia-ui-framework.png    
Template:
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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

When using magnolia-bundled-webapp 5.3.2 as a POM type dependency, it brings in wrong dependency versions for:

  • magnolia-ui-framework version
  • magnolia-ui-contentapp
  • magnolia-rendering

That's hard to find out for newbies, and cumbersome to add the exclusions and then having to add explicit dependencies on the 5.3.2 versions manually. The workaround is the following:

		<dependency>
			<groupId>info.magnolia.eebundle</groupId>
			<artifactId>magnolia-enterprise-webapp</artifactId>
			<type>pom</type>
			<exclusions>
				<!-- see comment in next dependency -->
				<exclusion>
					<artifactId>magnolia-ui-framework</artifactId>
					<groupId>info.magnolia.ui</groupId>
				</exclusion>
				<exclusion>
					<artifactId>magnolia-ui-contentapp</artifactId>
					<groupId>info.magnolia.ui</groupId>
				</exclusion>
				<exclusion>
					<artifactId>magnolia-rendering</artifactId>
					<groupId>info.magnolia</groupId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- 
			must exclude wrong magnolia dependencies versions brought in by magnolia-enterprise-webapp above 
			and explicitly depend on 5.3.2 versions of those dependencies until 
			http://jira.magnolia-cms.com/browse/MAGNOLIA-5902 is fixed 
		-->
		<dependency>
			<artifactId>magnolia-ui-framework</artifactId>
			<groupId>info.magnolia.ui</groupId>
			<version>${magnolia.version}</version>		
		</dependency>
		<dependency>
			<artifactId>magnolia-ui-contentapp</artifactId>
			<groupId>info.magnolia.ui</groupId>
			<version>${magnolia.version}</version>		
		</dependency>
		<dependency>
			<artifactId>magnolia-rendering</artifactId>
			<groupId>info.magnolia</groupId>
			<version>${magnolia.version}</version>		
		</dependency>

Without this workaround Magnolia will complain about incompatible module versions during startup.



 Comments   
Comment by Jan Haderka [ 02/Sep/14 ]

Can you please attach your pom?

Comment by Jan Haderka [ 02/Sep/14 ]

hmm, why not to use import scope on the parent project to resolve dependencies correctly?

     <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>

      <!-- 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>

With this in the parent pom's dependency management section, you can than use still have following in the pom building the war file, but your deps should be resolved correctly:

    <!-- Overlay Magnolia Empty Webapp. Alternatively, use the bundled-webapp or the enterprise-webapp. Dependencies versions are already imported by parent, so no need to replicate here. -->
    <dependency>
      <groupId>info.magnolia.eebundle</groupId>
      <artifactId>magnolia-enterprise-webapp</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>info.magnolia.eebundle</groupId>
      <artifactId>magnolia-enterprise-webapp</artifactId>
      <type>war</type>
    </dependency>
Comment by Magnolia International [ 02/Sep/14 ]

Confirmed, you need to use dependencyManagement and scope:import. As shown by the screenshot those versions are brought in by the mail module, actually. It has a different lifecycle and won't be (doesn't need to be) released with every versions of main/ui/bundle.

Comment by Joerg von Frantzius [ 02/Sep/14 ]

Will try tomorrow, thanks for answering at this time of the day

Comment by Joerg von Frantzius [ 05/Sep/14 ]

With your help I discovered that I was missing the <scope>import</scope> in the parent pom's dependencyManagement section where the magnolia-enterprise-bundle-parent is included. Thanks!

Uhm, it seems I cannot close this issue myself?

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