Skip to content

Export same package to two modules errors #178

@koppor

Description

@koppor

I am experimenting with this plugin to replace java9-modularity plugin.

I tried:

    module("org.openjfx:javafx-controls", "org.jabref") {
        exports("com.sun.javafx.scene.control")
        opens("javafx.scene.control", "com.sun.javafx.scene.control", "javafx.scene.control.skin")
        patchRealModule()
        preserveExisting()
    }
    module("org.openjfx:javafx-controls", "org.controlsfx.controls") {
        exports("com.sun.javafx.scene.control") // already done for org.jabref
        exports("com.sun.javafx.scene.control.behavior")
        exports("com.sun.javafx.scene.control.inputmap")
        opens("javafx.scene")
        patchRealModule()
        preserveExisting()
    }

I get

Error occurred during initialization of boot layer
java.lang.module.FindException: Error reading module: C:\Users\koppor\.gradle\caches\8.14\transforms\80abc631dd58aa95aae8dfa0745697fd\transformed\javafx-controls-24-win-module.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Exported package com.sun.javafx.scene.control already declared

Could not write standard input to Gradle Test Executor 9.
java.io.IOException: The pipe is being closed

It seems, I cannot export a package to different modules?

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions