Skip to content

Commit

Permalink
Add minimal tarball trino-server-core
Browse files Browse the repository at this point in the history
- Reuse new module as core for default tarball
- Avoid duplication of artifact set definitions
  • Loading branch information
mosabua committed Feb 21, 2025
1 parent c1a031d commit 9b29841
Show file tree
Hide file tree
Showing 9 changed files with 221 additions and 32 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ jobs:
!:trino-redis,
!:trino-redshift,
!:trino-resource-group-managers,
!:trino-server-core,
!:trino-server,
!:trino-singlestore,
!:trino-snowflake,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Trino is a distributed SQL query engine.

Please see the website for installation instructions:
See the website for installation instructions:

https://trino.io/
86 changes: 86 additions & 0 deletions core/trino-server-core/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.trino</groupId>
<artifactId>trino-root</artifactId>
<version>472-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>trino-server-core</artifactId>
<packaging>provisio</packaging>
<description>Trino - Server core package</description>

<properties>
<air.check.skip-enforcer>false</air.check.skip-enforcer>
<air.check.skip-duplicate-finder>true</air.check.skip-duplicate-finder>
<air.check.skip-findbugs>true</air.check.skip-findbugs>
<air.check.skip-dependency>true</air.check.skip-dependency>

<!-- Launcher properties -->
<main-class>io.trino.server.TrinoServer</main-class>
<process-name>${project.artifactId}</process-name>

<!-- Special consideration for Takari Lifecycle -->
<!-- This works as trino-server have no sources (is just provisio packaged) -->
<takari.skip>false</takari.skip>
</properties>

<dependencies>
<dependency>
<groupId>io.airlift</groupId>
<artifactId>junit-extensions</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<!-- Needed for provisio to resolve transitive dependencies for server assembly -->
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>confluent</id>
<url>https://packages.confluent.io/maven/</url>
</repository>
</repositories>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<configuration>
<rules combine.self="override">
<requireFilesSize>
<!-- Maven Central has a 1GB limit -->
<maxsize>1073741824</maxsize>
<files>
<file>${project.build.directory}/${project.artifactId}-${project.version}.tar.gz</file>
</files>
</requireFilesSize>
</rules>
</configuration>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.takari.maven.plugins</groupId>
<artifactId>takari-lifecycle-plugin</artifactId>
<version>${dep.takari.version}</version>
<configuration>
<proc>none</proc>
<skip>${takari.skip}</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
88 changes: 88 additions & 0 deletions core/trino-server-core/src/main/provisio/trino-core.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<runtime>
<!-- Target -->
<archive name="${project.artifactId}-${project.version}.tar.gz" hardLinkIncludes="**/*.jar" />

<!-- Launcher -->
<artifactSet to="bin">
<artifact id="io.airlift:launcher:tar.gz:bin:${dep.launcher.version}">
<unpack />
</artifact>
<artifact id="io.airlift:launcher:tar.gz:properties:${dep.launcher.version}">
<unpack filter="true" />
</artifact>
</artifactSet>

<!-- Server -->
<artifactSet to="lib">
<artifact id="${project.groupId}:trino-server-main:${project.version}" />
</artifactSet>

<!-- Configuration Plugins -->
<artifactSet to="secrets-plugin/keystore-secrets-plugin">
<artifact id="io.airlift:secrets-keystore-plugin:zip:${dep.airlift.version}">
<unpack />
</artifact>
</artifactSet>

<!-- Plugins -->
<artifactSet to="plugin/exchange-filesystem">
<artifact id="${project.groupId}:trino-exchange-filesystem:zip:${project.version}">
<unpack />
</artifact>
</artifactSet>

<artifactSet to="plugin/exchange-hdfs">
<artifact id="${project.groupId}:trino-exchange-hdfs:zip:${project.version}">
<unpack />
</artifact>
</artifactSet>

<artifactSet to="plugin/functions-python">
<artifact id="${project.groupId}:trino-functions-python:zip:${project.version}">
<unpack />
</artifact>
</artifactSet>

<artifactSet to="plugin/geospatial">
<artifact id="${project.groupId}:trino-geospatial:zip:${project.version}">
<unpack />
</artifact>
</artifactSet>

<artifactSet to="plugin/memory">
<artifact id="${project.groupId}:trino-memory:zip:${project.version}">
<unpack />
</artifact>
</artifactSet>

<artifactSet to="plugin/ml">
<artifact id="${project.groupId}:trino-ml:zip:${project.version}">
<unpack />
</artifact>
</artifactSet>

<artifactSet to="plugin/password-authenticators">
<artifact id="${project.groupId}:trino-password-authenticators:zip:${project.version}">
<unpack />
</artifact>
</artifactSet>

<artifactSet to="plugin/resource-group-managers">
<artifact id="${project.groupId}:trino-resource-group-managers:zip:${project.version}">
<unpack />
</artifact>
</artifactSet>

<artifactSet to="plugin/session-property-managers">
<artifact id="${project.groupId}:trino-session-property-managers:zip:${project.version}">
<unpack />
</artifact>
</artifactSet>

<artifactSet to="plugin/spooling-filesystem">
<artifact id="${project.groupId}:trino-spooling-filesystem:zip:${project.version}">
<unpack />
</artifact>
</artifactSet>

</runtime>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Licensed 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.
*/
package io.trino.server;

import org.junit.jupiter.api.Test;

public class TestDummy
{
@Test
public void buildRequiresTestToExist() {}
}
8 changes: 8 additions & 0 deletions core/trino-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
</properties>

<dependencies>
<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-server-core</artifactId>
<version>${project.version}</version>
<type>tar.gz</type>
</dependency>
<dependency>
<groupId>io.airlift</groupId>
<artifactId>junit-extensions</artifactId>
Expand All @@ -53,6 +59,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<configuration>
<!-- Temporarily skip until archive is reduced in size -->
<skip>true</skip>
<rules combine.self="override">
<requireFilesSize>
<!-- Maven Central has a 1GB limit -->
Expand Down
39 changes: 8 additions & 31 deletions core/trino-server/src/main/provisio/trino.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,9 @@
<!-- Target -->
<archive name="${project.artifactId}-${project.version}.tar.gz" hardLinkIncludes="**/*.jar" />

<!-- Notices -->
<fileSet to="/">
<directory path="${basedir}">
<include>NOTICE</include>
<include>README.txt</include>
</directory>
</fileSet>

<!-- Launcher -->
<artifactSet to="bin">
<artifact id="io.airlift:launcher:tar.gz:bin:${dep.launcher.version}">
<unpack />
</artifact>
<artifact id="io.airlift:launcher:tar.gz:properties:${dep.launcher.version}">
<unpack filter="true" />
</artifact>
</artifactSet>

<!-- Server -->
<artifactSet to="lib">
<artifact id="${project.groupId}:trino-server-main:${project.version}" />
</artifactSet>

<!-- Configuration Plugins -->
<artifactSet to="secrets-plugin/keystore-secrets-plugin">
<artifact id="io.airlift:secrets-keystore-plugin:zip:${dep.airlift.version}">
<unpack />
</artifact>
<!-- Expand on trino-server-core -->
<artifactSet to="">
<artifact id="${project.groupId}:trino-server-core:tar.gz:${project.version}" />
</artifactSet>

<!-- Plugins -->
Expand Down Expand Up @@ -96,12 +71,13 @@
</artifact>
</artifactSet>

<!--
<artifactSet to="plugin/example-http">
<artifact id="${project.groupId}:trino-example-http:zip:${project.version}">
<unpack />
</artifact>
</artifactSet>

-->
<artifactSet to="plugin/exasol">
<artifact id="${project.groupId}:trino-exasol:zip:${project.version}">
<unpack />
Expand Down Expand Up @@ -159,12 +135,13 @@
</artifact>
</artifactSet>

<!--
<artifactSet to="plugin/http-server-event-listener">
<artifact id="${project.groupId}:trino-http-server-event-listener:zip:${project.version}">
<unpack />
</artifact>
</artifactSet>

-->
<artifactSet to="plugin/hudi">
<artifact id="${project.groupId}:trino-hudi:zip:${project.version}">
<unpack />
Expand Down Expand Up @@ -284,7 +261,7 @@
<unpack />
</artifact>
</artifactSet>

<artifactSet to="plugin/phoenix5">
<artifact id="${project.groupId}:trino-phoenix5:zip:${project.version}">
<unpack />
Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<module>core/trino-main</module>
<module>core/trino-parser</module>
<module>core/trino-server</module>
<module>core/trino-server-core</module>
<module>core/trino-server-main</module>
<module>core/trino-spi</module>
<module>core/trino-web-ui</module>
Expand Down Expand Up @@ -1403,6 +1404,12 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-server-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-session-property-managers</artifactId>
Expand Down

0 comments on commit 9b29841

Please sign in to comment.