How to annotate java generated code from xsd files

I am new to the xsd stuff. I want to convert a directory of xsd files to java with @Pattern annotations, I am working with a lot of dynamic data. A lot of elements contain patterns, which defines what to expect as input for elements. The patterns are found in following structure in combination with elements, here a fragment of one of the xsd files:

              <xs:element name="preparationDateAndTime" minOccurs="1" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            <aie:name xml:lang="en" value="Preparation date and time"/>
                            <aie:name xml:lang="de" value="Zeitpunkt der Erstellung"/>
                            <aie:description value="Datum und Zeit der Erstellung der Übertragungsdatei"/>
                            <aie:status value="R"/>
                            <aie:format value="DateTime (n14)"/>
                            <aie:pcre value="A(?!....-(?:02|04|06|09|11)-31|....-02-30|..(?:.[13579]|[02468][26]|[13579][048])-02-29)^(?:20[0-9][0-9])-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])T(?:[01][0-9]|2[0-3]):(?:[0-5][0-9]):(?:[0-5][0-9])Z"/>
                        </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                        <xs:restriction base="xs:dateTime">
                            <xs:minInclusive value="2000-01-01T00:00:00"/>
                            <xs:maxInclusive value="2099-12-31T23:59:59"/>
                            <xs:pattern value="[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:element>
                <xs:element name="testIndicator" minOccurs="0" maxOccurs="0">
                    <xs:annotation>
                        <xs:documentation>
                            <aie:name xml:lang="en" value="Test indicator"/>
                            <aie:name xml:lang="de" value="Test-Indikator"/>
                            <aie:status value="N"/>
                            <aie:format value="n1"/>
                            <aie:pcre value="A1Z"/>
                        </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                            <xs:length value="1"/>
                            <xs:enumeration value="1"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:element>
                <xs:element name="messageIdentification" minOccurs="1" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            <aie:name xml:lang="en" value="Message identification"/>
                            <aie:name xml:lang="de" value="Nachrichtenkennung"/>
                            <aie:description value="Eindeutige Nachrichtenreferenz"/>
                            <aie:status value="R"/>
                            <aie:format value="an..35"/>
                            <aie:pcre value="A.{1,35}Z"/>
                        </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                        <xs:restriction base="alpha">
                            <xs:minLength value="1"/>
                            <xs:maxLength value="35"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:element>

I did a lot of research without finding what I need. This is the script that I am using in a Spring Boot project using following library in the build.gradle.kts file:

plugins {
   id("de.qaware.gradle.plugin.xsd2java") version "3.0.0"
   // more plugins
}

dependencies {
    implementation("javax.xml.bind:jaxb-api:2.3.1")
    implementation("org.glassfish.jaxb:jaxb-runtime:2.3.2")
    implementation("javax.annotation:javax.annotation-api:1.3.2")
}


xsd2java {
    schemas {
        create("generate$taskName") {
            val packageNameString = "com.example.xsdToJavaProj.backend.generate.${dir.name}"
            schemaDirPath = dir.toPath() // directory with xsd files 
            this.packageName = packageName
         }
    }
    extension = true
    arguments = listOf("-verbose", "-XautoNameResolution")
    outputDir = file("${project.buildDir}/generated-sources/xsd2java")
}

After executing the script, I get the generated java, in the comments I see the pattern and everything but the java implementation does not contain any further annotations:

/**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <element name="identificationNumber">
     *           <simpleType>
     *             <restriction base="{}alpha">
     *               <length value="5"/>
     *               <pattern value="[1-9][0-9]{4}"/>
     *             </restriction>
     *           </simpleType>
     *         </element>
     *         <element name="note">
     *           <simpleType>
     *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
     *               <length value="2"/>
     *               <enumeration value="TB"/>
     *               <enumeration value="TF"/>
     *               <enumeration value="TS"/>
     *             </restriction>
     *           </simpleType>
     *         </element>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     * </pre>
     * 
     * 
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "identificationNumber",
        "note"
    })
    public static class Scenario {

        @XmlElement(required = true)
        protected String identificationNumber;
        @XmlElement(required = true)
        protected String note;

        /**
         * Gets the value of the identificationNumber property.
         * 
         * @return
         *     possible object is
         *     {@link String }
         *     
         */
        public String getIdentificationNumber() {
            return identificationNumber;
        }

        /**
         * Sets the value of the identificationNumber property.
         * 
         * @param value
         *     allowed object is
         *     {@link String }
         *     
         */
        public void setIdentificationNumber(String value) {
            this.identificationNumber = value;
        }

        /**
         * Gets the value of the note property.
         * 
         * @return
         *     possible object is
         *     {@link String }
         *     
         */
        public String getNote() {
            return note;
        }

        /**
         * Sets the value of the note property.
         * 
         * @param value
         *     allowed object is
         *     {@link String }
         *     
         */
        public void setNote(String value) {
            this.note = value;
        }

    }

How can I generate the @Pattern annotations as well for java? I tried the approach with adding -Xannotate to the arguments but it always threw an -Xannotate unknown property error, and I tried creating a bindings.xjb file, which also did not really work as expected.

The expected results would be something like that:

public static class Scenario {

        @XmlElement(required = true)
        @Pattern("[1-9][0-9]{4}")
        protected String identificationNumber;
        @XmlElement(required = true)
        @Pattern("[1-9][0-9]{4}")
        protected String note;

// getters and setters

}

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật