|
105 | 105 | <groupId>it.geosolutions.jaiext.jiffle</groupId> |
106 | 106 | <artifactId>jt-jiffle-language</artifactId> |
107 | 107 | </dependency> |
108 | | - <!-- These test dependencies are for running map algebra tests --> |
109 | | - <dependency> |
110 | | - <groupId>org.antlr</groupId> |
111 | | - <artifactId>antlr4-runtime</artifactId> |
112 | | - <version>${antlr-runtime.version}</version> |
113 | | - <scope>test</scope> |
114 | | - </dependency> |
115 | | - <dependency> |
116 | | - <groupId>org.codehaus.janino</groupId> |
117 | | - <artifactId>janino</artifactId> |
118 | | - <version>${janino-version}</version> |
119 | | - <scope>test</scope> |
120 | | - </dependency> |
121 | 108 | <dependency> |
122 | 109 | <groupId>edu.ucar</groupId> |
123 | 110 | <artifactId>cdm-core</artifactId> |
|
134 | 121 | <target>8</target> |
135 | 122 | </configuration> |
136 | 123 | </plugin> |
| 124 | + <plugin> |
| 125 | + <!-- Skip running resolved-pom-maven-plugin since shade will |
| 126 | + generate dependency reduced pom which substitutes property |
| 127 | + values. resolved-pom-maven-plugin will break pom |
| 128 | + installation when working with maven-shade-plugin. --> |
| 129 | + <groupId>io.paradoxical</groupId> |
| 130 | + <artifactId>resolved-pom-maven-plugin</artifactId> |
| 131 | + <version>1.0</version> |
| 132 | + <executions> |
| 133 | + <execution> |
| 134 | + <id>resolve-my-pom</id> |
| 135 | + <phase>none</phase> |
| 136 | + </execution> |
| 137 | + </executions> |
| 138 | + </plugin> |
| 139 | + <plugin> |
| 140 | + <!-- |
| 141 | + We need to shade jiffle and its antlr and janino dependencies for the following reasons: |
| 142 | +
|
| 143 | + 1. Databricks runtime uses an older version of janino (3.0.16) that does not work |
| 144 | + with jiffle in Spark repl. See https://github.com/apache/sedona/discussions/1945 |
| 145 | +
|
| 146 | + 2. Spark 4 uses an incompatible version of antlr at runtime. |
| 147 | + --> |
| 148 | + <groupId>org.apache.maven.plugins</groupId> |
| 149 | + <artifactId>maven-shade-plugin</artifactId> |
| 150 | + <executions> |
| 151 | + <execution> |
| 152 | + <phase>package</phase> |
| 153 | + <goals> |
| 154 | + <goal>shade</goal> |
| 155 | + </goals> |
| 156 | + <configuration> |
| 157 | + <artifactSet> |
| 158 | + <includes> |
| 159 | + <include>it.geosolutions.jaiext.jiffle:*</include> |
| 160 | + <include>org.antlr:*</include> |
| 161 | + <include>org.codehaus.janino:*</include> |
| 162 | + </includes> |
| 163 | + </artifactSet> |
| 164 | + <relocations> |
| 165 | + <relocation> |
| 166 | + <pattern>it.geosolutions.jaiext.jiffle</pattern> |
| 167 | + <shadedPattern>org.apache.sedona.shaded.jiffle</shadedPattern> |
| 168 | + <excludes> |
| 169 | + <exclude>it.geosolutions.jaiext.jiffle.runtime.*</exclude> |
| 170 | + </excludes> |
| 171 | + </relocation> |
| 172 | + <relocation> |
| 173 | + <pattern>org.antlr.v4.runtime</pattern> |
| 174 | + <shadedPattern>org.apache.sedona.shaded.antlr</shadedPattern> |
| 175 | + </relocation> |
| 176 | + <relocation> |
| 177 | + <pattern>org.codehaus</pattern> |
| 178 | + <shadedPattern>org.apache.sedona.shaded.codehaus</shadedPattern> |
| 179 | + </relocation> |
| 180 | + </relocations> |
| 181 | + <filters> |
| 182 | + <!-- filter to address "Invalid signature file" issue - see http://stackoverflow.com/a/6743609/589215 --> |
| 183 | + <filter> |
| 184 | + <artifact>*:*</artifact> |
| 185 | + <excludes> |
| 186 | + <exclude>META-INF/*.SF</exclude> |
| 187 | + <exclude>META-INF/*.DSA</exclude> |
| 188 | + <exclude>META-INF/*.RSA</exclude> |
| 189 | + </excludes> |
| 190 | + </filter> |
| 191 | + </filters> |
| 192 | + </configuration> |
| 193 | + </execution> |
| 194 | + </executions> |
| 195 | + </plugin> |
137 | 196 | </plugins> |
138 | 197 | </build> |
139 | 198 | </project> |
0 commit comments