Skip to content

Commit

Permalink
Improve project setup
Browse files Browse the repository at this point in the history
- Add airbase as parent to enable release in future
- Add necessary details for release
- Add airbase property overrides to skip various checks to allow passing build
- Move test code into correct path
- Centralize property declarations in parent pom
- Improve dependency declarations and add version overrides as minimally needed
  • Loading branch information
mosabua committed Sep 13, 2023
1 parent d31bf70 commit df4c3f5
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 77 deletions.
19 changes: 11 additions & 8 deletions baseapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
<artifactId>baseapp</artifactId>
<packaging>jar</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<dropwizard.version>1.3.29</dropwizard.version>
<guice.version>4.1.0</guice.version>
<reflections.version>0.9.10</reflections.version>
</properties>

<dependencies>
<dependency>
<groupId>io.dropwizard</groupId>
Expand All @@ -38,6 +30,10 @@
<artifactId>guice</artifactId>
<version>${guice.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
Expand Down Expand Up @@ -85,6 +81,13 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<failIfNoTests>false</failIfNoTests>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
14 changes: 1 addition & 13 deletions gateway-ha/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@
<name>gateway-ha</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<jetty.version>9.4.48.v20220622</jetty.version>
<dropwizard.version>1.3.29</dropwizard.version>
<guice.version>4.1.0</guice.version>
<guava.version>23.0</guava.version>
<jeasy.version>4.1.0</jeasy.version>
<reflections.version>0.9.10</reflections.version>
<ehcache.version>3.8.1</ehcache.version>
<activejdbc.version>2.3</activejdbc.version>
<mysqlconnector.version>8.0.17</mysqlconnector.version>
<environments>development</environments>
<app.main.class>io.trino.gateway.ha.HaGatewayLauncher</app.main.class>
</properties>
Expand All @@ -51,7 +40,6 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>io.trino.gateway</groupId>
Expand Down Expand Up @@ -140,7 +128,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.17</version>
<version>${mysqlconnector.version}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
Expand Down
112 changes: 61 additions & 51 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,79 @@

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.airlift</groupId>
<artifactId>airbase</artifactId>
<version>144</version>
</parent>

<groupId>io.trino.gateway</groupId>
<artifactId>trinogateway-parent</artifactId>
<name>trinogateway-parent</name>
<packaging>pom</packaging>
<version>3-SNAPSHOT</version>

<name>trinogateway-parent</name>
<description>A smart load balancer and query router for Trino</description>
<url>https://github.com/trinodb/trino-gateway</url>
<inceptionYear>2018</inceptionYear>

<licenses>
<license>
<name>Apache License 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>Trino Gateway contributors</name>
<url>https://github.com/trinodb/trino-gateway/graphs/contributors</url>
</developer>
<developer>
<name>Lyft Presto Gateway contributors</name>
<url>https://github.com/lyft/presto-gateway/graphs/contributors</url>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/trinodb/trino-gateway.git</connection>
<tag>HEAD</tag>
<url>https://github.com/trinodb/trino-gateway</url>
</scm>

<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<project.build.targetJdk>17</project.build.targetJdk>
<air.java.version>17</air.java.version>
<air.check.skip-checkstyle>true</air.check.skip-checkstyle>
<air.check.skip-enforcer>true</air.check.skip-enforcer>
<air.check.skip-license>true</air.check.skip-license>
<air.check.skip-dependency>true</air.check.skip-dependency>
<air.check.skip-duplicate-finder>true</air.check.skip-duplicate-finder>
<air.check.skip-modernizer>true</air.check.skip-modernizer>
<air.check.fail-spotbugs>false</air.check.fail-spotbugs>
<air.check.skip-pmd>true</air.check.skip-pmd>

<!-- overriding version from airbase -->
<dep.jackson.version>2.10.1</dep.jackson.version>
<dep.logback.version>1.2.12</dep.logback.version>
<dep.slf4j.version>${slf4j.version}</dep.slf4j.version>

<!-- dependency versions -->
<activejdbc.version>2.3</activejdbc.version>
<dropwizard.version>1.3.29</dropwizard.version>
<ehcache.version>3.8.1</ehcache.version>
<guava.version>23.0</guava.version>
<guice.version>4.1.0</guice.version>
<jeasy.version>4.1.0</jeasy.version>
<jetty.version>9.4.48.v20220622</jetty.version>
<slf4j.version>1.7.25</slf4j.version>
<lombok.version>1.18.22</lombok.version>
<testng.version>6.10</testng.version>
<mockwebserver.version>1.2.1</mockwebserver.version>

<maven.checkstyle.plugin.version>3.0.0</maven.checkstyle.plugin.version>
<puppycrawl.tools.checkstyle.version>7.7</puppycrawl.tools.checkstyle.version>
<checkstyle.violation.ignore>NonEmptyAtclauseDescription,JavadocMethod,AbbreviationAsWordInName,MemberName
</checkstyle.violation.ignore>
<mysqlconnector.version>8.0.17</mysqlconnector.version>
<reflections.version>0.9.10</reflections.version>
<slf4j.version>1.7.25</slf4j.version>
<testng.version>6.10</testng.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -99,45 +150,4 @@
<module>gateway-ha</module>
</modules>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven.checkstyle.plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${puppycrawl.tools.checkstyle.version}</version>
</dependency>
</dependencies>
<configuration>
<configLocation>google_checks.xml</configLocation>
<consoleOutput>true</consoleOutput>
<logViolationsToConsole>true</logViolationsToConsole>
<failOnViolation>true</failOnViolation>
<failsOnError>true</failsOnError>
<violationIgnore>${checkstyle.violation.ignore}</violationIgnore>
<violationSeverity>warning</violationSeverity>
<includeResources>false</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
</configuration>
<executions>
<!--
Execute checkstyle after compilation but before tests.
This ensures that any parsing or type checking errors are from
javac, so they look as expected. Beyond that, we want to
fail as early as possible.
-->
<execution>
<phase>test-compile</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
5 changes: 0 additions & 5 deletions proxyserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
<artifactId>proxyserver</artifactId>
<packaging>jar</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>
Expand Down

0 comments on commit df4c3f5

Please sign in to comment.