Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SEDONA-212] Rework dependency management #735

Merged
merged 26 commits into from
Jan 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
bd7fd8b
Rework dependencies
Kimahriman Dec 10, 2022
5c17662
Add guava exclusion
Kimahriman Dec 10, 2022
c4b1ee4
Add missing optionals
Kimahriman Dec 10, 2022
8dc19b0
Core needs spark-sql now
Kimahriman Dec 10, 2022
13b76a2
Fix some geotools things and use separate shaded artifact
Kimahriman Dec 11, 2022
10190c9
More rework
Kimahriman Dec 11, 2022
f12b7da
Comment out jackson and make scala opt-in
Kimahriman Dec 13, 2022
caf1844
Fix datasyslab deps
Kimahriman Dec 14, 2022
2b1e724
Add epsg to python-adapter
Kimahriman Dec 14, 2022
c4d85fd
Actually include scala code in python-adapter
Kimahriman Dec 14, 2022
55911a1
Get mini hdfs test working
Kimahriman Dec 15, 2022
3f13c14
Create separate shaded modules
Kimahriman Dec 22, 2022
8d54691
Search for shaded module too to get version
Kimahriman Dec 22, 2022
c09ed45
Add geotools to spark-shaded for python tests
Kimahriman Dec 22, 2022
64fc58b
Make the cdm dependency provided by default and included in shaded mo…
Kimahriman Dec 25, 2022
588dabb
Re-enable resolve pom plugin for python-adapter
Kimahriman Dec 26, 2022
4b50ec8
FIx guava for python-adapter tests
Kimahriman Dec 26, 2022
06320de
Merge branch 'master' into rework-deps2
Kimahriman Dec 26, 2022
8c0e1fd
Fix new module versions
Kimahriman Dec 26, 2022
eb4ce52
Remove spark compat version from flink shaded
Kimahriman Dec 26, 2022
cf4aae3
Merge branch 'master' into rework-deps2
Kimahriman Dec 28, 2022
cd4ab98
Revert CI triggers
Kimahriman Dec 28, 2022
908a41b
Skip deploying parent pom with scala 2.13 profile
Kimahriman Dec 31, 2022
d8ede5f
Merge branch 'master' into rework-deps2
Kimahriman Dec 31, 2022
c56cd6e
Merge branch 'master' into rework-deps2
Kimahriman Jan 1, 2023
472f56e
Remove java.net repo
Kimahriman Jan 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,26 @@ jobs:
include:
- spark: 3.3.0
scala: 2.13.8
jackson: 2.13.3
jdk: '8'
skipTests: ''
- spark: 3.3.0
scala: 2.12.15
jackson: 2.13.3
jdk: '8'
skipTests: ''
- spark: 3.3.0
scala: 2.12.15
jackson: 2.13.3
jdk: '11'
skipTests: '-DskipTests'
- spark: 3.2.0
scala: 2.12.15
jackson: 2.12.3
jdk: '8'
skipTests: ''
- spark: 3.1.2
scala: 2.12.15
jackson: 2.10.0
jdk: '8'
skipTests: ''
- spark: 3.0.3
scala: 2.12.15
jackson: 2.10.0
jdk: '8'
skipTests: ''

Expand All @@ -65,9 +59,8 @@ jobs:
- env:
SPARK_VERSION: ${{ matrix.spark }}
SCALA_VERSION: ${{ matrix.scala }}
JACKSON_VERSION: ${{ matrix.jackson }}
SKIP_TESTS: ${{ matrix.skipTests}}
run: mvn -q clean install -Dscala=${SCALA_VERSION:0:4} -Dspark.version=${SPARK_VERSION} -Dsedona.jackson.version=${JACKSON_VERSION} ${SKIP_TESTS}
SKIP_TESTS: ${{ matrix.skipTests }}
run: mvn -q clean install -Dscala=${SCALA_VERSION:0:4} -Dspark.version=${SPARK_VERSION} ${SKIP_TESTS}
- run: mkdir staging
- run: cp core/target/sedona-*.jar staging
- run: cp sql/target/sedona-*.jar staging
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
- env:
SPARK_VERSION: ${{ matrix.spark }}
HADOOP_VERSION: ${{ matrix.hadoop }}
run: find python-adapter/target -name sedona-* -exec cp {} spark-${SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}/jars/ \;
run: find spark-shaded/target -name sedona-*.jar -exec cp {} spark-${SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}/jars/ \;
- env:
SPARK_VERSION: ${{ matrix.spark }}
HADOOP_VERSION: ${{ matrix.hadoop }}
Expand Down
21 changes: 20 additions & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-main</artifactId>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-referencing</artifactId>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-epsg-hsql</artifactId>
</dependency>
<dependency>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
</dependency>
<dependency>
<groupId>org.wololo</groupId>
<artifactId>jts2geojson</artifactId>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
Expand Down Expand Up @@ -63,4 +83,3 @@
</profile>
</profiles>
</project>

106 changes: 89 additions & 17 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,46 +41,118 @@
<groupId>org.apache.sedona</groupId>
<artifactId>sedona-common</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Test -->
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_${scala.compat.version}</artifactId>
<exclusions>
<!-- Make sure Hadoop's guava version is used for older versions of Spark tests -->
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<!-- These break the tests involving the mini HDFS cluster -->
<exclusion>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client-runtime</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_${scala.compat.version}</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-minicluster</artifactId>
<version>${hadoop.version}</version>
<scope>test</scope>
<artifactId>hadoop-client</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<scope>test</scope>
<groupId>edu.ucar</groupId>
<artifactId>cdm-core</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-main</artifactId>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-referencing</artifactId>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-epsg-hsql</artifactId>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-shapefile</artifactId>
<version>${geotools.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
</dependency>
<dependency>
<groupId>org.wololo</groupId>
<artifactId>jts2geojson</artifactId>
<exclusions>
<exclusion>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</dependency>

<!-- Test -->
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_${scala.compat.version}</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-minicluster</artifactId>
<version>${hadoop.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.scalastyle</groupId>
<artifactId>scalastyle-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

12 changes: 12 additions & 0 deletions flink-shaded/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/target/
/.settings/
/.classpath
/.project
/dependency-reduced-pom.xml
/doc/
/.idea/
*.iml
/latest/
/spark-warehouse/
/metastore_db/
*.log
105 changes: 105 additions & 0 deletions flink-shaded/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<!--
~ 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">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>sedona-parent</artifactId>
<groupId>org.apache.sedona</groupId>
<version>1.3.2-incubating-SNAPSHOT</version>
</parent>
<artifactId>sedona-flink-shaded_${scala.compat.version}</artifactId>

<name>${project.groupId}:${project.artifactId}</name>
<description>A cluster computing system for processing large-scale spatial data: Flink Shaded. Apache Sedona is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.</description>
<url>http://sedona.apache.org/</url>
<packaging>jar</packaging>

<properties>
<maven.deploy.skip>false</maven.deploy.skip>
<cdm.scope>compile</cdm.scope>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.sedona</groupId>
<artifactId>sedona-flink_${scala.compat.version}</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Define this to be shaded since it is provided in other modules -->
<dependency>
<groupId>edu.ucar</groupId>
<artifactId>cdm-core</artifactId>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/scala</sourceDirectory>
<plugins>
<plugin>
<groupId>io.paradoxical</groupId>
<artifactId>resolved-pom-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>resolve-my-pom</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<!-- use transformer to handle merge of META-INF/services - see http://java.net/jira/browse/JERSEY-440?focusedCommentId=14822&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_14822 -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>reference.conf</resource>
</transformer>
</transformers>
<artifactSet>
<excludes>
<exclude>org.scala-lang:scala-library</exclude>
</excludes>
</artifactSet>
<filters>
<!-- filter to address "Invalid signature file" issue - see http://stackoverflow.com/a/6743609/589215 -->
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading