| <?xml version="1.0" encoding="UTF-8"?> |
| |
| <!-- |
| Copyright 2026 Contributors to the Eclipse Foundation. |
| |
| This program and the accompanying materials are made available under the |
| terms of the Eclipse Public License v. 2.0, which is available at |
| http://www.eclipse.org/legal/epl-2.0. |
| |
| This Source Code may also be made available under the following Secondary |
| Licenses when the conditions for such availability set forth in the |
| Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| version 2 with the GNU Classpath Exception, which is available at |
| https://www.gnu.org/software/classpath/license.html. |
| |
| SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| |
| --> |
| |
| <project xmlns="http://maven.apache.org/POM/4.0.0" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <groupId>org.glassfish.jersey</groupId> |
| <artifactId>project</artifactId> |
| <version>${revision}</version> |
| </parent> |
| |
| <groupId>org.hibernate.validator</groupId> |
| <artifactId>hibernate-validator</artifactId> |
| <version>9.1.0.Final-ee12patch1</version> |
| <packaging>pom</packaging> |
| |
| <name>Hibernate Validator OSGi Patch</name> |
| |
| <properties> |
| <hibernate.validator.groupId>org.hibernate.validator</hibernate.validator.groupId> |
| <hibernate.validator.artifactId>hibernate-validator</hibernate.validator.artifactId> |
| <hibernate.validator.originalVersion>9.1.0.Final</hibernate.validator.originalVersion> |
| |
| <jakara.validation.upper>5.0.0</jakara.validation.upper> |
| <jakara.persistence.upper>5.0.0</jakara.persistence.upper> |
| |
| <hibernate.validator.work.dir>${project.build.directory}/hv-work</hibernate.validator.work.dir> |
| <hibernate.validator.in.jar>${project.build.directory}/hv-in/${hibernate.validator.artifactId}-${hibernate.validator.originalVersion}.jar</hibernate.validator.in.jar> |
| <hibernate.validator.out.jar>${project.build.directory}/${project.artifactId}-${project.version}.jar</hibernate.validator.out.jar> |
| <hibernate.validator.manifest>${hibernate.validator.work.dir}/META-INF/MANIFEST.MF</hibernate.validator.manifest> |
| </properties> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-dependency-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>copy-hv</id> |
| <phase>generate-resources</phase> |
| <goals> |
| <goal>copy</goal> |
| </goals> |
| <configuration> |
| <artifactItems> |
| <artifactItem> |
| <groupId>${hibernate.validator.groupId}</groupId> |
| <artifactId>${hibernate.validator.artifactId}</artifactId> |
| <version>${hibernate.validator.originalVersion}</version> |
| <type>jar</type> |
| <outputDirectory>${project.build.directory}/hv-in</outputDirectory> |
| <destFileName>${hibernate.validator.artifactId}-${hibernate.validator.originalVersion}.jar</destFileName> |
| </artifactItem> |
| </artifactItems> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>patch-manifest</id> |
| <phase>process-resources</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <target> |
| <mkdir dir="${hibernate.validator.work.dir}"/> |
| <copy file="${hibernate.validator.in.jar}" tofile="${hibernate.validator.out.jar}" overwrite="true"/> |
| |
| <unzip src="${hibernate.validator.out.jar}" dest="${hibernate.validator.work.dir}"> |
| <patternset><include name="META-INF/MANIFEST.MF"/></patternset> |
| </unzip> |
| |
| <replaceregexp file="${hibernate.validator.manifest}" |
| match="\r?\n " |
| replace="" |
| flags="g"/> |
| |
| <replaceregexp file="${hibernate.validator.manifest}" |
| byline="false" |
| flags="g" |
| match="(jakarta\.validation(?:\.[^;,\r\n]+)?)\s*;\s*version="\[([^,"]+),4\.0\.0\)"" |
| replace="\1;version="[\2,${jakara.validation.upper})""/> |
| |
| <replaceregexp file="${hibernate.validator.manifest}" |
| byline="false" |
| flags="g" |
| match="(jakarta\.persistence(?:\.[^;,\r\n]+)?)\s*;\s*version="\[([^,"]+),4\.0\.0\)"" |
| replace="\1;version="[\2,${jakara.persistence.upper})""/> |
| |
| <replaceregexp file="${hibernate.validator.manifest}" |
| byline="false" |
| flags="g" |
| match="org\.jboss\.logging\s*;\s*version="\[3\.1\.0,4\.0\.0\)"" |
| replace="org.jboss.logging;version="[3.6.0,4.0.0)""/> |
| |
| <jar destfile="${hibernate.validator.out.jar}" update="true" manifest="${hibernate.validator.manifest}" /> |
| |
| <echo>Patched and wrote: ${hibernate.validator.out.jar}</echo> |
| </target> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>attach-patched-jar</id> |
| <phase>package</phase> |
| <goals> |
| <goal>attach-artifact</goal> |
| </goals> |
| <configuration> |
| <artifacts> |
| <artifact> |
| <file>${hibernate.validator.out.jar}</file> |
| <type>jar</type> |
| </artifact> |
| </artifacts> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.sonatype.central</groupId> |
| <artifactId>central-publishing-maven-plugin</artifactId> |
| <extensions>true</extensions> |
| <configuration> |
| <skipPublishing>true</skipPublishing> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |