-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
starting with 0.23.2 I get
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:0.25.0:build (default) on project demo: Failed to build a runnable JAR: Failed to build a runner jar: Failed to augment application classes: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.arc.deployment.ArcProcessor#registerBeans threw an exception: javax.enterprise.inject.spi.DefinitionException: Bean class com.demo.excmapper.IllegalArgumentExceptionMapper declares multiple scope type annotations: javax.enterprise.context.Dependent, javax.inject.Singleton
Steps to reproduce the behavior:
- Create sample hello project
- Add the class
import org.eclipse.microprofile.metrics.Counter;
import org.eclipse.microprofile.metrics.annotation.Metric;
import javax.inject.Inject;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;
@Provider
public class IllegalArgumentExceptionMapper implements ExceptionMapper<IllegalArgumentException> {
@Inject
@Metric(absolute = true, name = "error_count", description = "count", displayName = "error_count")
private Counter counter;
@Override
public Response toResponse(IllegalArgumentException exception) {
counter.inc();
return Response.status(500).entity("illegal").build();
}
}
- run mvn package
getting-started.zip