blob: 9bf51dd11a952dc03189a431eddfc182321735c4 [file]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>be-java-extensions</artifactId>
<groupId>org.apache.doris</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jni-bootstrap</artifactId>
<name>Doris BE JNI Plugin Bootstrap</name>
<description>
The plugin runtime: the classloader that isolates a plugin from BE's own classpath, and the
registry BE calls to obtain scanners, writers and UDF executors from it.
Deployed next to jni-spi on BE's system classpath, so it lives under the same purity rule -
the only dependency it may have is jni-spi itself. That is also why it logs through
java.util.logging: a logging implementation here would be visible to nothing (plugins
cannot see this classpath) yet would still have to be shipped and version-managed.
</description>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.doris</groupId>
<artifactId>jni-spi</artifactId>
<version>${project.version}</version>
</dependency>
<!--
Test scope, and it stays test scope: statusJson() writes JSON by hand precisely so that
this module ships no parser, and PluginRuntimeTest needs a real one to assert that what it
writes IS JSON. Substring assertions were what it had, and they stayed green with the
whole escaping deleted - while the one consumer of /api/jni_plugin_status is a parser.
-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>test</scope>
</dependency>
<!--
Narrowed to test scope for the same reason as in jni-spi: the fe parent pom declares
these for every module, and a child cannot drop an inherited dependency. See that pom
for the full explanation. Do not "fix" these to compile scope.
-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>doris-jni-bootstrap</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<!--
Same gate as jni-spi, with jni-spi itself re-admitted. Both jars sit on BE's
system classpath; anything that reaches this one has to be deployed there
too, and would be one more thing whose version has to agree with everything
else BE loads.
-->
<execution>
<id>enforce-jni-bootstrap-depends-only-on-spi</id>
<phase>validate</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<searchTransitive>true</searchTransitive>
<excludes>
<exclude>*</exclude>
</excludes>
<includes>
<include>org.apache.doris:jni-spi</include>
<include>*:*:*:*:test</include>
</includes>
<message>
jni-bootstrap may depend on jni-spi and nothing else. It is
deployed on BE's system classpath; a library added here has
to ship with BE and can never be upgraded independently by
a plugin. Logging goes through java.util.logging, which the
JDK provides and every plugin can bridge into.
</message>
</bannedDependencies>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>