I have two projects A and B in project B and i want to injcet a CDI bean from project A however, this fails due too
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: jakarta.enterprise.inject.spi.DeploymentException: jakarta.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type test.xml.filereader and qualifiers [@Default] - java member: org.acme.hibernate.orm.XmlResource#fileReader - declared on CLASS bean [types=[org.acme.hibernate.orm.XmlResource, java.lang.Object], qualifiers=[@Default, @Any], target=org.acme.hibernate.orm.XmlResource]
Project A has a CDI bean like this
@Slf4j
@ApplicationScoped
public class FileReader {
@Inject
Configuration configuration;
public void testCDIInject() {
}
}
project B wants to use this
@Path("/test")
public class XmlResource {
@Inject
FileReader fileReader;
@GET
public String get() {
fileReader.testCDIInject();
return "asdf";
}
}
for some reason i get the error above. why?
i install project A with mvn clean install -U
and have it in project Bs pom.xml
beans.xmlfile?