Annotation processor is not aware of new constraint @Currency and validators for type MonetaryAmount

Description

When using hibernate-validator-annotation-processor (5.4.0) at compile time, I have the following errors :

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] .../Invoice.java:[17,5] The annotation @Currency is disallowed for this data type.
[ERROR] .../Invoice.java:[16,5] The annotation @DecimalMax is disallowed for this data type.
[INFO] 2 errors

I used this annotations in a POJO :

@DecimalMax("1000.00")
@Currency("EUR")
private MonetaryAmount totalAmount;

I tested it with Java Money API (JSR-354) and Java 8 :

<dependency>
<groupId>javax.money</groupId>
<artifactId>money-api</artifactId>
<version>1.0.1</version>
</dependency>

I suppose that the constraint has not been registered in the class org.hibernate.validator.ap.util.TypeNames.HibernateValidatorTypes and org.hibernate.validator.ap.util.ConstraintHelper.

Environment

Java 8 + JSR-354

Assignee

Guillaume Smet

Reporter

Guillaume Husta

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

Priority

Major
Configure