|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | + |
| 3 | +<!-- |
| 4 | +Licensed to the Apache Software Foundation (ASF) under one |
| 5 | +or more contributor license agreements. See the NOTICE file |
| 6 | +distributed with this work for additional information |
| 7 | +regarding copyright ownership. The ASF licenses this file |
| 8 | +to you under the Apache License, Version 2.0 (the |
| 9 | +"License"); you may not use this file except in compliance |
| 10 | +with the License. You may obtain a copy of the License at |
| 11 | +
|
| 12 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | +
|
| 14 | +Unless required by applicable law or agreed to in writing, |
| 15 | +software distributed under the License is distributed on an |
| 16 | +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 17 | +KIND, either express or implied. See the License for the |
| 18 | +specific language governing permissions and limitations |
| 19 | +under the License. |
| 20 | +--> |
| 21 | + |
| 22 | + |
| 23 | +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 24 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 25 | + <modelVersion>4.0.0</modelVersion> |
| 26 | + <parent> |
| 27 | + <groupId>org.apache.datafusion</groupId> |
| 28 | + <artifactId>comet-parent-spark${spark.version.short}_${scala.binary.version}</artifactId> |
| 29 | + <version>0.17.0-SNAPSHOT</version> |
| 30 | + <relativePath>../pom.xml</relativePath> |
| 31 | + </parent> |
| 32 | + |
| 33 | + <artifactId>comet-enable-if-version-annotation-macros-spark${spark.version.short}_${scala.binary.version}</artifactId> |
| 34 | + <name>comet-enable-if-version-annotation-macros</name> |
| 35 | + |
| 36 | + <!-- |
| 37 | + Defines the @enableIfVer (and @enableIfAllVer / @enableIfAnyVer / @implementIfVer / |
| 38 | + @enableOverrideIfVer) macro annotations used for conditional, version-specific compilation |
| 39 | + in a single source file (instead of parallel spark-3.x / spark-4.x source folders). |
| 40 | +
|
| 41 | + The targeted versions are fed to the macro at expansion time via the compiler flag |
| 42 | + -Xmacro-settings:enableIfVer.<dimension>=<version> (configured in the parent pom's |
| 43 | + scala-maven-plugin). Expanding the annotations requires macro-paradise on Scala 2.12 and the |
| 44 | + -Ymacro-annotations flag on Scala 2.13 — both wired up in the parent pom. |
| 45 | +
|
| 46 | + This module is compile-time-only: expanded annotations leave no runtime reference to it, so |
| 47 | + consumers depend on it with "provided" scope and it is not published. |
| 48 | + --> |
| 49 | + |
| 50 | + <dependencies> |
| 51 | + <dependency> |
| 52 | + <groupId>org.scala-lang</groupId> |
| 53 | + <artifactId>scala-library</artifactId> |
| 54 | + </dependency> |
| 55 | + <!-- Needed to define the macro implementations (scala.reflect.macros.whitebox). --> |
| 56 | + <dependency> |
| 57 | + <groupId>org.scala-lang</groupId> |
| 58 | + <artifactId>scala-reflect</artifactId> |
| 59 | + <scope>provided</scope> |
| 60 | + </dependency> |
| 61 | + <!-- Backs the macro's semver range matching; runs at the *consumer's* compile time, so it is |
| 62 | + "provided" (expanded annotations leave no runtime reference to it). --> |
| 63 | + <dependency> |
| 64 | + <groupId>org.semver4j</groupId> |
| 65 | + <artifactId>semver4j</artifactId> |
| 66 | + <scope>provided</scope> |
| 67 | + </dependency> |
| 68 | + </dependencies> |
| 69 | + |
| 70 | + <build> |
| 71 | + <plugins> |
| 72 | + <!-- scala-maven-plugin compiles the macro definitions; macro-annotation enablement |
| 73 | + (paradise / -Ymacro-annotations) is inherited from the parent pom. --> |
| 74 | + <plugin> |
| 75 | + <groupId>net.alchim31.maven</groupId> |
| 76 | + <artifactId>scala-maven-plugin</artifactId> |
| 77 | + </plugin> |
| 78 | + </plugins> |
| 79 | + </build> |
| 80 | + |
| 81 | +</project> |
0 commit comments