Skip to content

Address deprecated code when handling import.xml files outside of /settings/ #619

@dgriffon

Description

@dgriffon

Environment and versions used

Js module 1.2.0-SNAPSHOT

Steps to reproduce

Given a js module with the following:

  • an import.xml at root level
  • an import.xml under the /settings folder

Current Behavior

As the import file at root level is copied under /META-INF and all the content of /settings is copied under /META-INF it ends up with 2 files with the same name into the jar file.
The module fail to start with the following error:

2026-01-12 08:22:24,182: INFO  [ModuleManagerImpl] - Installation failed for bundles [URL [js://file:/var/jahia/modules/package.tgz]] on target null (took 87 ms). Operation error: duplicate entry: META-INF/import.xml

java.util.zip.ZipException: duplicate entry: META-INF/import.xml

	at java.base/java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:244) ~[?:?]

	at java.base/java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:115) ~[?:?]

	at org.jahia.modules.javascript.modules.engine.jshandler.JavascriptProtocolConnection.getInputStream(JavascriptProtocolConnection.java:147) ~[?:?]

Desired Behavior

As documented only the /settings/import.xml is supported, it means that we have to remove the current support of the import.xml at the root level of the js module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions