-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Unable to define stork discovery provider in extension #23656
Comments
to reproduce you can also make a build without tests, and run:
|
Does it work for you if you move the classes out to a separate project, i.e. not an extension? What are the benefits of having it as an extension? |
@michalszynkiewicz why would it not work in the runtime module of an extension? |
I don't know, weird that it doesn't work at all. I looked at the code and it seems to be good. |
@michalszynkiewicz to support better our application teams, we try to factor as much as possible some of the transversal technical concerns into a common set of extensions that all applications will depend on. |
in the reproducer's |
Just as an FYI, @michalszynkiewicz let me know if you want me to look into this at all (sounds like it could be classloader related) |
@geoand if you have time for it, it would be great. I have quite a few bugs to look into at the moment. If you're busy too I should get to this one this week too |
Turns out there is an easy explanation for this :) As you know, Stork uses an annotation processor, which under normal circumestances is on the compiler's classpath because of the presense of: <dependency>
<groupId>io.smallrye.stork</groupId>
<artifactId>stork-configuration-generator</artifactId>
<scope>provided</scope>
</dependency> in the application's In the cases of Quarkus extensions however, the <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-processor</artifactId>
<version>${quarkus.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin> This configuration leads to the annotation processor in the The fix is easy and demonstrated by this diff:
|
ok. thanks for taking a look @geoand |
yw |
Describe the bug
I have created an extension to host a stork service discovery custom implementation.
I use the extension from my application.
The application fails to start because it does not find the service discovery from the extension.
If I move the service discovery into the application, it works.
In addition the discovery configuration class does not get generated.
/cc @michalszynkiewicz
Expected behavior
A custom service discovery can be implemented in an extension, as if it was located in the application itself.
Actual behavior
The service discovery can not be found.
The configuration class does not get generated.
How to Reproduce?
fetch
https://github.com/vsevel/stork-issue/tree/provider_in_ext
and execute:
The build fails with:
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.7.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: