Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 9 same Package 'org.springdoc.api' exported by 'springdoc.openapi.core' and 'springdoc.openapi.common' Modules #461

Closed
luismospinam opened this issue Mar 2, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@luismospinam
Copy link

luismospinam commented Mar 2, 2020

Describe the bug
When trying to modularize the application I get the following error because of openapi dependencie:
java.lang.module.ResolutionException: Modules springdoc.openapi.core and springdoc.openapi.common export package org.springdoc.api to module spring.boot

Currently using the dependency:

        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-ui</artifactId>
            <version>1.2.32</version>
        </dependency>

Expected behavior
Packages exported by each Module should be unique, so maybe rename the exported package in one of the modules?

@bnasslahsen
Copy link
Contributor

@luismospinam,

The project is not based on java 9 modules.
You can create you own fork of the project and use them if needed.

@guyv
Copy link

guyv commented Apr 5, 2020

Are you willing to accept PR to make it compatible with java 9? (so, not based on java 9 modules, but just making sure it also works on java 9 modules): which mainly means making sure you have unique package names, and change some access modifiers accordingly

@bnasslahsen
Copy link
Contributor

@guyv,

I have just renamed, some the packages of the other modules, in order to be unique.
You can have a look. And If you have any complementary PR, to improve the support for java 9 modules, please feel free to contribute.

@guyv
Copy link

guyv commented Apr 5, 2020

@bnasslahsen @luismospinam

Thx for the swift response! Now I managed to get springdoc running on the module-path in a spring boot application!

There was one issue left I had to work around: webjars-locator also has a split package. I excluded the transitive webjars-locator from the springdoc dependency and I added webjars-locator-core in my pom.

webjars-locator only contains 1 class: RequireJS, which springdoc doesn't use. Do you consider to also depend on webjars-locator-core instead of webjars-locator? Shall I make a PR?

Spring boot depends on the classes in webjars-locator-core, so that will still work!

I also created an issue in the webjars-locator project: webjars/webjars-locator#4

@bnasslahsen
Copy link
Contributor

bnasslahsen commented Apr 5, 2020

@guyv,

The change is now available on master to use webjars-locator-core instead of webjars-locator.
It should be available on the next release, v1.3.1.

Please, feel free to add any complementary PR, to improve the support for java 9.

@bnasslahsen bnasslahsen added the enhancement New feature or request label Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants