[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: To build a java package with maven



Le 21/06/2020 à 08:01, Mechtilde Stehmann a écrit :

> do I understand it in a right way?
> 
> I patch the entry for the dependency part from javax.validation to
> jakarta.vvalidation etc
> 
> then I use in maven.rules
> s/javax.validation/jakarta.validation/
> s/validation-api/jakarta.validation-api/ * s/.*/debian/ * *
> 
> So the import line import javax.validation.ConstraintViolation;
> etc. should work.

No it won't, because the classes in the jakarta artifact are in the
jakarta.* package, not javax.*, so you would have to patch the Java files
to change the import statements.

The easiest solution is to depend on libgeronimo-validation-1.1-spec-java
and use this substitution rule:

  s/javax.validation/org.apache.geronimo.specs/ s/validation-api/geronimo-validation_1.1_spec/ * s/.*/debian/ * *

That's what the eclipselink package does for example:

  https://sources.debian.org/src/eclipselink/2.6.6-1/debian/maven.rules/?hl=2#L2

Emmanuel Bourg


Reply to: