0

What could be a reason for not updated module version in Magnolia 5.7

In Magnolia java project I have submodule with XML descriptor in META-INF/magnolia/mymodule.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module SYSTEM "module.dtd" >
<module>
  <name>mymodule</name>
  <displayName>mymodule</displayName>
  <description>my module</description>
  <version>${project.version}</version>
  <!-- <version>1.3</version> -->
  <dependencies>
    <dependency>
      <name>core</name>
      <version>5.7.4/*</version>
    </dependency>
  </dependencies>

</module>

When I rebuild the whole project with version changed in project maven pom.xml and deploy on a server I don't see an updated version in Magnolia's Author configuration console. I have to manually remove the old version node in the configuration console (remove JCR node) and then restart the server. After these steps, I can confirm the new version in the configuration console. Which is a pain if you have to deploy to several dev/stage/prod environments needless to say that I have no access to a public instance in a production environment.

The problem with not updated version sounds like not important, but I'm also not seeing new or renamed pages associated with this module. They appear only if I force to reload module by removing version.

One additional detail which may help identify the problem: I can delete version node in JCR, but can NOT delete the whole module node. I receive an error message "Level 1 and 2 nodes in config workspace cannot be unpublished".

1 Answer 1

1

What version do you see in the config:/modules/your_module/version before you delete it? Is it lower than version number of version you are trying to install? I would suspect that it's same or higher. Ie you are trying to reinstall same version or downgrade the version. Neither of those is supported hence it doesn't trigger the installation process. Or perhaps you are trying to move up from SNAPSHOT to full version for which there's no install delta either.

As for the warning you get when trying to delete those nodes, it is on purpose. You are not supposed to be deleting those nodes as a normal user since you could cause breakage of dependent (public) instances. Only as admin (via JCR Browser) you are allowed to delete, assuming you know what and why you are doing.

4
  • In production build we are switch from 1.2-SNAPSHOT to 1.2; This isn't supported?
    – AlexeiP
    May 4, 2020 at 11:41
  • Just realize the pretty simple fact that the module version not the same as the whole project version and probably should not be aligned with the version taken from the pom file.
    – AlexeiP
    May 4, 2020 at 14:53
  • No update from snapshot to final version is not supported. When you install snapshot it's expected that you do so in your development or test env to actually test the upgrade to this given snapshot before making it final and installing in production. It is not expected that you would ever run snapshot in production. Upgrade mechanism exists as a means to make changes to production in controlled way and since you are not expected to run snapshot there, there never was need to add support for upgrading from snapshot to final (not mentioning technical difficulties such support would bring).
    – Jan
    May 5, 2020 at 6:46
  • Excellent explanation. Thank you, Jan!
    – AlexeiP
    May 9, 2020 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.