[ARCH-58] rename version property to magonlia-bundle-version to avoid confusion Created: 15/Mar/18  Updated: 23/Apr/18  Resolved: 23/Apr/18

Status: Closed
Project: Archetypes
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2.3

Type: Bug Priority: Neutral
Reporter: Richard Gange Assignee: Robert Šiška
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by ARCH-62 Module archetype fails when supplying... Closed
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:
Epic Link: Support
Sprint: Kromeriz 142

 Description   

 If you create a "Module" with the magnolia archetypes and enter the version of the latest bundle (such as "5.6.3") to the "magnolia version" prompt, then the maven build will fail.

(Originally reported here: https://documentation.magnolia-cms.com/display/DOCS56/Release+notes+for+Magnolia+CORE+5.6.3?focusedCommentId=156404514#comment-156404514)

This ticket introduces some renaming in the archetypes to make things a little clearer.

ARCH-62 Is introduced to solve the problem.



 Comments   
Comment by Mikaël Geljić [ 29/Mar/18 ]

There is indeed a problem for project-archetype due to an old maven2 workaround which we can now discard. => i.e. import only depMgmt from a bundle parent, and simply remove the imports to main/ui parent poms; they're coming transitively just fine.

—besides (minor):

  • war plugin version seems to be missing
  • java version is 1.6 (which we dropped since 5.4) and servlet is still 2.5 as well (should come in managed)

rgange what you're showing here is a module archetype; it's using the given version as magnolia-core version—latest of which is 5.6.2 atm. Indeed that's tough to explain to whoever's running that command, though I wouldn't consider any immediate change here.

EDIT:
These issues are not there on archetypes 1.2.3-SNAPSHOT; which cmeier fixed over 2 years ago; I don't know why we did not release archetypes back then.

Comment by Richard Gange [ 17/Apr/18 ]

Wouldn't it make more sense to add a section like this to the module archetype:

<dependencyManagement>
    <dependencies>

      <!-- Option A -->
      <!-- Importing dependencyManagement of CE bundle. -->
      <!--
      <dependency>
        <groupId>info.magnolia.bundle</groupId>
        <artifactId>magnolia-bundle-parent</artifactId>
        <version>${magnoliaVersion}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      -->

      <!-- Option B -->
      <!-- If you want to use the Enterprise Edition. -->
      <dependency>
        <groupId>info.magnolia.eebundle</groupId>
        <artifactId>magnolia-enterprise-bundle-parent</artifactId>
        <version>${magnoliaVersion}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
  </dependencies>
<dependencyManagement>
Comment by Richard Gange [ 17/Apr/18 ]

The only reason that I'm bringing this up is I feel like it's confusing for people that are outside of Magnolia. Consider the following scenario.

  1. I create a new project (parent pom and webpp)
  2. I choose to use the latest version of Magnolia, at this point that is 5.6.5.
  3. I then decide to add a module to hold my templating project.
  4. I create a new module using the archetype.
  5. I choose to use the latest version of Magnolia, at this point that is 5.6.5.
  6. Now my module is broken because I choose 5.6.5.

In the end my module pom looks like this:

  <properties>
    <magnoliaVersion>5.6.5</magnoliaVersion>
    <javaVersion>1.8</javaVersion>
  </properties>

  <dependencies>
    <dependency>
      <groupId>info.magnolia</groupId>
      <artifactId>magnolia-core</artifactId>
      <version>${magnoliaVersion}</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.5</version>
      <scope>provided</scope>
    </dependency>

the output of the build looks like this:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building test Magnolia Module 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://nexus.magnolia-cms.com/content/groups/staff/org/apache/maven/plugins/maven-compiler-plugin/3.7.0/maven-compiler-plugin-3.7.0.pom
Downloaded: https://nexus.magnolia-cms.com/content/groups/staff/org/apache/maven/plugins/maven-compiler-plugin/3.7.0/maven-compiler-plugin-3.7.0.pom (11 KB at 39.3 KB/sec)
Downloading: https://nexus.magnolia-cms.com/content/groups/staff/org/apache/maven/plugins/maven-compiler-plugin/3.7.0/maven-compiler-plugin-3.7.0.jar
Downloaded: https://nexus.magnolia-cms.com/content/groups/staff/org/apache/maven/plugins/maven-compiler-plugin/3.7.0/maven-compiler-plugin-3.7.0.jar (57 KB at 406.1 KB/sec)
Downloading: https://nexus.magnolia-cms.com/content/groups/staff/info/magnolia/magnolia-core/5.6.5/magnolia-core-5.6.5.pom
[WARNING] The POM for info.magnolia:magnolia-core:jar:5.6.5 is missing, no dependency information available
Downloading: https://nexus.magnolia-cms.com/content/groups/staff/info/magnolia/magnolia-core/5.6.5/magnolia-core-5.6.5.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.411 s
[INFO] Finished at: 2018-04-17T10:14:27+02:00
[INFO] Final Memory: 9M/163M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project magnolia-test: Could not resolve dependencies for project info.magnolia.test:magnolia-test:jar:1.0-SNAPSHOT: Could not find artifact info.magnolia:magnolia-core:jar:5.6.5 in magnolia.nexus (https://nexus.magnolia-cms.com/content/groups/staff) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

At this point there is no core 5.6.5. If I'm an outside developer this would be confusing for me.

Let me just say, I totally understand why we have made the changes we have made. Without a doubt this is more efficient. But the side effect of that is it's going to be a source of confusion for those that have been using Magnolia for years. Bundle version and core version have always aligned. I think we can save some frustration for people if we do something with the module archetype. Perhaps some comments or something.

Comment by Christopher Zimmermann [ 17/Apr/18 ]

Reopening because the problem still exists. 

 

Comment by Christopher Zimmermann [ 23/Apr/18 ]

Updated ticket description based on decisions logged in https://jira.magnolia-cms.com/browse/DEV-918

Comment by Christopher Zimmermann [ 23/Apr/18 ]

Updated title of ticket to reflect what was actually done.

Generated at Sun Feb 11 23:23:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.