Skip to content

Commit 7a89288

Browse files
pdabre12Pratik Joseph Dabre
authored andcommitted
Fix plugin packaging
1 parent 6d36242 commit 7a89288

File tree

2 files changed

+43
-11
lines changed

2 files changed

+43
-11
lines changed

presto-product-tests/conf/docker/common/compose-commons.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@ if [[ -z "${PRESTO_SERVER_DIR:-}" ]]; then
3939
source "${PRODUCT_TESTS_ROOT}/target/classes/presto.env"
4040
PRESTO_SERVER_DIR="${PROJECT_ROOT}/presto-server/target/presto-server-${PRESTO_VERSION}/"
4141
fi
42-
43-
# The following plugin results in a function signature conflict when loaded in Java/ sidecar disabled native clusters.
44-
# This plugin is only meant for sidecar enabled native clusters, hence exclude it.
45-
PLUGIN_TO_EXCLUDE="native-sql-invoked-functions-plugin"
46-
47-
if [[ -d "${PRESTO_SERVER_DIR}/plugin/${PLUGIN_TO_EXCLUDE}" ]]; then
48-
echo "Excluding plugin: $PLUGIN_TO_EXCLUDE"
49-
rm -rf "${PRESTO_SERVER_DIR}/plugin/${PLUGIN_TO_EXCLUDE}"
50-
fi
51-
5242
export_canonical_path PRESTO_SERVER_DIR
5343

5444
if [[ -z "${PRESTO_CLI_JAR:-}" ]]; then

presto-server/pom.xml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,26 @@
3434
<groupId>ca.vanzyl.provisio.maven.plugins</groupId>
3535
<artifactId>provisio-maven-plugin</artifactId>
3636
</plugin>
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-antrun-plugin</artifactId>
40+
<version>3.1.0</version>
41+
<executions>
42+
<execution>
43+
<id>prune-plugins</id>
44+
<phase>package</phase>
45+
<goals><goal>run</goal></goals>
46+
<configuration>
47+
<target>
48+
<!-- delete based on profile property -->
49+
<delete includeemptydirs="true" quiet="true">
50+
<fileset dir="${project.build.directory}/presto-server-${project.version}/plugin" includes="${plugin.excludes}"/>
51+
</delete>
52+
</target>
53+
</configuration>
54+
</execution>
55+
</executions>
56+
</plugin>
3757
</plugins>
3858
<pluginManagement>
3959
<plugins>
@@ -59,7 +79,29 @@
5979
uses the nexus-staging-maven-plugin for deployment -->
6080
<skipTakariLifecyclePlugin>true</skipTakariLifecyclePlugin>
6181
<air.check.skip-modernizer>true</air.check.skip-modernizer>
62-
</properties>
82+
</properties>
6383
</profile>
84+
85+
<!-- Java cluster -->
86+
<profile>
87+
<id>java</id>
88+
<activation><activeByDefault>true</activeByDefault></activation>
89+
<properties>
90+
<!-- remove native sidecar plugins -->
91+
<plugin.excludes>
92+
native-sidecar-plugin/**,
93+
native-sql-invoked-functions-plugin/**
94+
</plugin.excludes>
95+
</properties>
96+
</profile>
97+
98+
<!-- Native cluster -->
99+
<profile>
100+
<id>native</id>
101+
<properties>
102+
<!-- remove SQL functions plugin -->
103+
<plugin.excludes>sql-invoked-functions-plugin/**</plugin.excludes>
104+
</properties>
105+
</profile>
64106
</profiles>
65107
</project>

0 commit comments

Comments
 (0)