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

Resources added via "addPackage" are not registered in some cases #55

Open
andrus opened this issue Jul 7, 2020 · 0 comments
Open

Resources added via "addPackage" are not registered in some cases #55

andrus opened this issue Jul 7, 2020 · 0 comments
Labels

Comments

@andrus
Copy link
Contributor

andrus commented Jul 7, 2020

Environment:

  • Bootique 2.0
  • Maven: 3.6.1
  • Java version: 11.0.6, vendor: AdoptOpenJDK
  • OS: "mac os x", version: "10.15.5", arch: "x86_64", family: "mac"
  • IDE: IntelliJ Idea

Description:

I can't get a reproducible test case that I can debug yet, but I am seeing a weird behavior. Application has a bunch of resources registered by package name:

JerseyModule.extend(binder).addPackage(OneOfTheResources.class);

It also has integration tests with a static @BQApp instance. Scenarios:

  • [works] App is run from IDE
  • [works] Assembled app is run on command line as a .jar (runnable jar with lib folder)
  • [works] Tests are run from IDE
  • [broken] Tests are run from command line with Maven (mvn clean verify)

In the last scenario all REST API tests fail with 404 errors, hinting that the endpoints are not known to Jersey. Changing the registration above from addPackage to addResource fixes the issue. Something wrong with package scanning under Maven and Java 11?

@andrus andrus added the bug label Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant