Skip to content

Commit 1e40b92

Browse files
wendigoelectrum
authored andcommitted
Update to Trino
1 parent 5348a85 commit 1e40b92

File tree

16 files changed

+110
-64
lines changed

16 files changed

+110
-64
lines changed

pom.xml

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
<version>24</version>
99
</parent>
1010

11-
<groupId>io.prestosql</groupId>
12-
<artifactId>presto-maven-plugin</artifactId>
11+
<groupId>io.trino</groupId>
12+
<artifactId>trino-maven-plugin</artifactId>
1313
<version>10-SNAPSHOT</version>
1414
<packaging>takari-maven-plugin</packaging>
1515

16-
<name>Presto Maven Build Extension</name>
17-
<description>The Presto Maven Plugin provides a packing and lifecycle for Presto plugins</description>
18-
<url>https://github.com/prestosql/presto-maven-plugin</url>
16+
<name>Trino Maven Build Extension</name>
17+
<description>The Trino Maven Plugin provides a packing and lifecycle for Trino plugins</description>
18+
<url>https://github.com/trinodb/trino-maven-plugin</url>
1919

2020
<scm>
21-
<connection>scm:git:git://github.com/prestosql/presto-maven-plugin.git</connection>
22-
<url>https://github.com/prestosql/presto-maven-plugin</url>
21+
<connection>scm:git:git://github.com/trinodb/trino-maven-plugin.git</connection>
22+
<url>https://github.com/trinodb/trino-maven-plugin</url>
2323
<tag>HEAD</tag>
2424
</scm>
2525

src/main/java/io/prestosql/maven/ServiceDescriptorGenerator.java renamed to src/main/java/io/trino/maven/ServiceDescriptorGenerator.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* See the License for the specific language governing permissions and
1212
* limitations under the License.
1313
*/
14-
package io.prestosql.maven;
14+
package io.trino.maven;
1515

1616
import org.apache.maven.artifact.Artifact;
1717
import org.apache.maven.plugin.AbstractMojo;
@@ -39,15 +39,15 @@
3939
import static java.nio.charset.StandardCharsets.UTF_8;
4040

4141
/**
42-
* Mojo that generates the service descriptor JAR for Presto plugins.
42+
* Mojo that generates the service descriptor JAR for Trino plugins.
4343
*/
4444
@Mojo(name = "generate-service-descriptor", defaultPhase = LifecyclePhase.PACKAGE, requiresDependencyResolution = ResolutionScope.COMPILE)
4545
public class ServiceDescriptorGenerator
4646
extends AbstractMojo
4747
{
4848
private static final String LS = System.getProperty("line.separator");
4949

50-
@Parameter(defaultValue = "io.prestosql.spi.Plugin")
50+
@Parameter(defaultValue = "io.trino.spi.Plugin")
5151
private String pluginClassName;
5252

5353
@Parameter(defaultValue = "${project.build.directory}/${project.build.finalName}-services.jar")

src/main/java/io/prestosql/maven/SpiDependencyChecker.java renamed to src/main/java/io/trino/maven/SpiDependencyChecker.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.prestosql.maven;
1+
package io.trino.maven;
22

33
import org.apache.maven.artifact.Artifact;
44
import org.apache.maven.plugin.AbstractMojo;
@@ -30,10 +30,10 @@
3030
public class SpiDependencyChecker
3131
extends AbstractMojo
3232
{
33-
@Parameter(defaultValue = "io.prestosql")
33+
@Parameter(defaultValue = "io.trino")
3434
private String spiGroupId;
3535

36-
@Parameter(defaultValue = "presto-spi")
36+
@Parameter(defaultValue = "trino-spi")
3737
private String spiArtifactId;
3838

3939
@Parameter(defaultValue = "false")
@@ -70,17 +70,17 @@ public void execute()
7070
String name = artifact.getGroupId() + ":" + artifact.getArtifactId();
7171
if (spiDependencies.contains(name)) {
7272
if (!"jar".equals(artifact.getType())) {
73-
throw new MojoExecutionException(format("%n%nPresto plugin dependency %s must have type 'jar'.", name));
73+
throw new MojoExecutionException(format("%n%nTrino plugin dependency %s must have type 'jar'.", name));
7474
}
7575
if (artifact.getClassifier() != null) {
76-
throw new MojoExecutionException(format("%n%nPresto plugin dependency %s must not have a classifier.", name));
76+
throw new MojoExecutionException(format("%n%nTrino plugin dependency %s must not have a classifier.", name));
7777
}
7878
if (!"provided".equals(artifact.getScope())) {
79-
throw new MojoExecutionException(format("%n%nPresto plugin dependency %s must have scope 'provided'. It is part of the SPI and will be provided at runtime.", name));
79+
throw new MojoExecutionException(format("%n%nTrino plugin dependency %s must have scope 'provided'. It is part of the SPI and will be provided at runtime.", name));
8080
}
8181
}
8282
else if ("provided".equals(artifact.getScope()) && !allowedProvidedDependencies.contains(name)) {
83-
throw new MojoExecutionException(format("%n%nPresto plugin dependency %s must not have scope 'provided'. It is not part of the SPI and will not be available at runtime.", name));
83+
throw new MojoExecutionException(format("%n%nTrino plugin dependency %s must not have scope 'provided'. It is not part of the SPI and will not be available at runtime.", name));
8484
}
8585
}
8686
}
@@ -114,12 +114,12 @@ private Artifact getSpiDependency()
114114
for (Artifact artifact : project.getArtifacts()) {
115115
if (isSpiArtifact(artifact)) {
116116
if (!"provided".equals(artifact.getScope())) {
117-
throw new MojoExecutionException(format("%n%nPresto plugin dependency %s must have scope 'provided'.", spiName()));
117+
throw new MojoExecutionException(format("%n%nTrino plugin dependency %s must have scope 'provided'.", spiName()));
118118
}
119119
return artifact;
120120
}
121121
}
122-
throw new MojoExecutionException(format("%n%nPresto plugin must depend on %s.", spiName()));
122+
throw new MojoExecutionException(format("%n%nTrino plugin must depend on %s.", spiName()));
123123
}
124124

125125
private boolean isSpiArtifact(Artifact artifact)

src/main/resources-filtered/META-INF/plexus/components.xml

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<components>
44
<component>
55
<role>org.apache.maven.artifact.handler.ArtifactHandler</role>
6-
<role-hint>presto-plugin</role-hint>
6+
<role-hint>trino-plugin</role-hint>
77
<implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
88
<configuration>
9-
<type>presto-plugin</type>
9+
<type>trino-plugin</type>
1010
<extension>zip</extension>
1111
<language>java</language>
1212
<addedToClasspath>false</addedToClasspath>
@@ -15,15 +15,15 @@
1515

1616
<component>
1717
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
18-
<role-hint>presto-plugin</role-hint>
18+
<role-hint>trino-plugin</role-hint>
1919
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
2020
<configuration>
2121
<lifecycles>
2222
<lifecycle>
2323
<id>default</id>
2424
<phases>
2525
<validate>
26-
io.prestosql:presto-maven-plugin:${project.version}:check-spi-dependencies
26+
io.trino:trino-maven-plugin:${project.version}:check-spi-dependencies
2727
</validate>
2828
<process-resources>
2929
org.apache.maven.plugins:maven-resources-plugin:2.6:resources
@@ -32,7 +32,7 @@
3232
org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
3333
</compile>
3434
<process-classes>
35-
io.prestosql:presto-maven-plugin:${project.version}:generate-service-descriptor
35+
io.trino:trino-maven-plugin:${project.version}:generate-service-descriptor
3636
</process-classes>
3737
<process-test-resources>
3838
org.apache.maven.plugins:maven-resources-plugin:2.6:testResources

src/test/java/io/prestosql/maven/CheckerIntegrationTest.java renamed to src/test/java/io/trino/maven/CheckerIntegrationTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.prestosql.maven;
1+
package io.trino.maven;
22

33
import io.takari.maven.testing.TestResources;
44
import io.takari.maven.testing.executor.MavenRuntime;
@@ -64,7 +64,7 @@ public void testInvalidExtraProvided()
6464
File basedir = resources.getBasedir("invalid-extra");
6565
maven.forProject(basedir)
6666
.execute("verify")
67-
.assertLogText("[ERROR] Presto plugin dependency com.google.guava:guava must not have scope 'provided'.");
67+
.assertLogText("[ERROR] Trino plugin dependency com.google.guava:guava must not have scope 'provided'.");
6868
}
6969

7070
@Test
@@ -95,7 +95,7 @@ public void testInvalidAndExcludedExtraProvided()
9595
maven.forProject(basedir)
9696
.execute("verify")
9797
.assertNoLogText("dependency com.google.guava:guava must")
98-
.assertLogText("[ERROR] Presto plugin dependency org.scala-lang:scala-library must not have scope 'provided'.");
98+
.assertLogText("[ERROR] Trino plugin dependency org.scala-lang:scala-library must not have scope 'provided'.");
9999
}
100100

101101
@Test
@@ -105,7 +105,7 @@ public void testInvalidMissingProvided()
105105
File basedir = resources.getBasedir("invalid-missing");
106106
maven.forProject(basedir)
107107
.execute("verify")
108-
.assertLogText("[ERROR] Presto plugin dependency io.airlift:units must have scope 'provided'.");
108+
.assertLogText("[ERROR] Trino plugin dependency io.airlift:units must have scope 'provided'.");
109109
}
110110

111111
@Test

src/test/java/io/prestosql/maven/GeneratorIntegrationTest.java renamed to src/test/java/io/trino/maven/GeneratorIntegrationTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.prestosql.maven;
1+
package io.trino.maven;
22

33
import io.takari.maven.testing.TestResources;
44
import io.takari.maven.testing.executor.MavenRuntime;

src/test/projects/abstract-plugin-class/pom.xml

+10-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<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">
33
<modelVersion>4.0.0</modelVersion>
44

5-
<groupId>io.prestosql.maven.its</groupId>
5+
<groupId>io.trino.maven.its</groupId>
66
<artifactId>abstract-plugin-class</artifactId>
77
<version>1.0</version>
8-
<packaging>presto-plugin</packaging>
8+
<packaging>trino-plugin</packaging>
99

1010
<properties>
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -23,10 +23,16 @@
2323
<build>
2424
<plugins>
2525
<plugin>
26-
<groupId>io.prestosql</groupId>
27-
<artifactId>presto-maven-plugin</artifactId>
26+
<groupId>io.trino</groupId>
27+
<artifactId>trino-maven-plugin</artifactId>
2828
<version>${it-plugin.version}</version>
2929
<extensions>true</extensions>
30+
<configuration>
31+
<!-- TODO: remove after trino-spi is released -->
32+
<pluginClassName>io.prestosql.spi.Plugin</pluginClassName>
33+
<spiGroupId>io.prestosql</spiGroupId>
34+
<spiArtifactId>presto-spi</spiArtifactId>
35+
</configuration>
3036
</plugin>
3137
</plugins>
3238
</build>

src/test/projects/basic/pom.xml

+10-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<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">
33
<modelVersion>4.0.0</modelVersion>
44

5-
<groupId>io.prestosql.maven.its</groupId>
5+
<groupId>io.trino.maven.its</groupId>
66
<artifactId>basic</artifactId>
77
<version>1.0</version>
8-
<packaging>presto-plugin</packaging>
8+
<packaging>trino-plugin</packaging>
99

1010
<properties>
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -23,10 +23,16 @@
2323
<build>
2424
<plugins>
2525
<plugin>
26-
<groupId>io.prestosql</groupId>
27-
<artifactId>presto-maven-plugin</artifactId>
26+
<groupId>io.trino</groupId>
27+
<artifactId>trino-maven-plugin</artifactId>
2828
<version>${it-plugin.version}</version>
2929
<extensions>true</extensions>
30+
<configuration>
31+
<!-- TODO: remove after trino-spi is released -->
32+
<pluginClassName>io.prestosql.spi.Plugin</pluginClassName>
33+
<spiGroupId>io.prestosql</spiGroupId>
34+
<spiArtifactId>presto-spi</spiArtifactId>
35+
</configuration>
3036
</plugin>
3137
</plugins>
3238
</build>

src/test/projects/excluded-extra/pom.xml

+8-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<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">
33
<modelVersion>4.0.0</modelVersion>
44

5-
<groupId>io.prestosql.maven.its</groupId>
5+
<groupId>io.trino.maven.its</groupId>
66
<artifactId>invalid-extra</artifactId>
77
<version>1.0</version>
8-
<packaging>presto-plugin</packaging>
8+
<packaging>trino-plugin</packaging>
99

1010
<properties>
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -31,14 +31,18 @@
3131
<build>
3232
<plugins>
3333
<plugin>
34-
<groupId>io.prestosql</groupId>
35-
<artifactId>presto-maven-plugin</artifactId>
34+
<groupId>io.trino</groupId>
35+
<artifactId>trino-maven-plugin</artifactId>
3636
<version>${it-plugin.version}</version>
3737
<extensions>true</extensions>
3838
<configuration>
3939
<allowedProvidedDependencies>
4040
<allowedProvidedDependency>com.google.guava:guava</allowedProvidedDependency>
4141
</allowedProvidedDependencies>
42+
<!-- TODO: remove after trino-spi is released -->
43+
<pluginClassName>io.prestosql.spi.Plugin</pluginClassName>
44+
<spiGroupId>io.prestosql</spiGroupId>
45+
<spiArtifactId>presto-spi</spiArtifactId>
4246
</configuration>
4347
</plugin>
4448
</plugins>

src/test/projects/interface-plugin-class/pom.xml

+10-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<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">
33
<modelVersion>4.0.0</modelVersion>
44

5-
<groupId>io.prestosql.maven.its</groupId>
5+
<groupId>io.trino.maven.its</groupId>
66
<artifactId>interface-plugin-class</artifactId>
77
<version>1.0</version>
8-
<packaging>presto-plugin</packaging>
8+
<packaging>trino-plugin</packaging>
99

1010
<properties>
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -23,10 +23,16 @@
2323
<build>
2424
<plugins>
2525
<plugin>
26-
<groupId>io.prestosql</groupId>
27-
<artifactId>presto-maven-plugin</artifactId>
26+
<groupId>io.trino</groupId>
27+
<artifactId>trino-maven-plugin</artifactId>
2828
<version>${it-plugin.version}</version>
2929
<extensions>true</extensions>
30+
<configuration>
31+
<!-- TODO: remove after trino-spi is released -->
32+
<pluginClassName>io.prestosql.spi.Plugin</pluginClassName>
33+
<spiGroupId>io.prestosql</spiGroupId>
34+
<spiArtifactId>presto-spi</spiArtifactId>
35+
</configuration>
3036
</plugin>
3137
</plugins>
3238
</build>

src/test/projects/invalid-and-excluded-extra/pom.xml

+8-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<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">
33
<modelVersion>4.0.0</modelVersion>
44

5-
<groupId>io.prestosql.maven.its</groupId>
5+
<groupId>io.trino.maven.its</groupId>
66
<artifactId>invalid-extra</artifactId>
77
<version>1.0</version>
8-
<packaging>presto-plugin</packaging>
8+
<packaging>trino-plugin</packaging>
99

1010
<properties>
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -39,14 +39,18 @@
3939
<build>
4040
<plugins>
4141
<plugin>
42-
<groupId>io.prestosql</groupId>
43-
<artifactId>presto-maven-plugin</artifactId>
42+
<groupId>io.trino</groupId>
43+
<artifactId>trino-maven-plugin</artifactId>
4444
<version>${it-plugin.version}</version>
4545
<extensions>true</extensions>
4646
<configuration>
4747
<allowedProvidedDependencies>
4848
<allowedProvidedDependency>com.google.guava:guava</allowedProvidedDependency>
4949
</allowedProvidedDependencies>
50+
<!-- TODO: remove after trino-spi is released -->
51+
<pluginClassName>io.prestosql.spi.Plugin</pluginClassName>
52+
<spiGroupId>io.prestosql</spiGroupId>
53+
<spiArtifactId>presto-spi</spiArtifactId>
5054
</configuration>
5155
</plugin>
5256
</plugins>

src/test/projects/invalid-extra/pom.xml

+9-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>io.prestosql.maven.its</groupId>
66
<artifactId>invalid-extra</artifactId>
77
<version>1.0</version>
8-
<packaging>presto-plugin</packaging>
8+
<packaging>trino-plugin</packaging>
99

1010
<properties>
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -31,10 +31,16 @@
3131
<build>
3232
<plugins>
3333
<plugin>
34-
<groupId>io.prestosql</groupId>
35-
<artifactId>presto-maven-plugin</artifactId>
34+
<groupId>io.trino</groupId>
35+
<artifactId>trino-maven-plugin</artifactId>
3636
<version>${it-plugin.version}</version>
3737
<extensions>true</extensions>
38+
<configuration>
39+
<!-- TODO: remove after trino-spi is released -->
40+
<pluginClassName>io.prestosql.spi.Plugin</pluginClassName>
41+
<spiGroupId>io.prestosql</spiGroupId>
42+
<spiArtifactId>presto-spi</spiArtifactId>
43+
</configuration>
3844
</plugin>
3945
</plugins>
4046
</build>

0 commit comments

Comments
 (0)