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

With autodetection enabled, generateTestResourceConfig should look at processed test resources only #566

Open
alvarosanchez opened this issue Jan 31, 2024 · 0 comments
Labels
bug Something isn't working maven-plugin Related to Maven plugin

Comments

@alvarosanchez
Copy link
Member

What happens currently, given that resources.autodetection.enabled is set, is the following:

generateResourceConfig

  • ✅ Detects resources in target/classes.
[INFO] [INFO] --- native:0.9.28:generateResourceConfig (default-generateResourceConfig) @ package-native-image ---
[INFO] [INFO] Detected resources for /Users/alvaro/Dev/micronaut-projects/micronaut-maven-plugin/target/it/package-native-image/target/classes are [logback.xml, application.yml]
[INFO] [INFO] Resources configuration written into /Users/alvaro/Dev/micronaut-projects/micronaut-maven-plugin/target/it/package-native-image/target/native/generated/generateResourceConfig/resource-config.json

generateTestResourceConfig

  • ❌ Detects resources in target/classes. It should be in target/test-classes.
  • ❌ Detects resources in src/test/resources. This shouldn't be attempted since a) those are unprocessed; and b) processed test resources will already be in target/test-classes.
[INFO] [INFO] --- native:0.9.28:generateTestResourceConfig (default-generateTestResourceConfig) @ package-native-image ---
[INFO] [INFO] Detected resources for /Users/alvaro/Dev/micronaut-projects/micronaut-maven-plugin/target/it/package-native-image/target/classes are [logback.xml, application.yml]
[INFO] [INFO] Detected resources for /Users/alvaro/Dev/micronaut-projects/micronaut-maven-plugin/target/it/package-native-image/src/test/resources are [application-test.yml]
[INFO] [INFO] Resources configuration written into /Users/alvaro/Dev/micronaut-projects/micronaut-maven-plugin/target/it/package-native-image/target/native/generated/generateTestResourceConfig/resource-config.json
@alvarosanchez alvarosanchez added bug Something isn't working maven-plugin Related to Maven plugin labels Jan 31, 2024
@alvarosanchez alvarosanchez removed their assignment Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working maven-plugin Related to Maven plugin
Projects
None yet
Development

No branches or pull requests

1 participant