diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 68d198f..7f57671 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -38,10 +38,6 @@ jobs:
with:
distribution: zulu
java-version: ${{ matrix.java }}
- - name: Build MatCalciteDependencies
- run: |
- cd MatCalciteDependencies
- ../mvnw --color=always -B install
- name: Test
run: |
./mvnw --color=always -B verify
diff --git a/MatCalciteDependencies/.gitignore b/MatCalciteDependencies/.gitignore
deleted file mode 100644
index 921beba..0000000
--- a/MatCalciteDependencies/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/META-INF/MANIFEST.MF
\ No newline at end of file
diff --git a/MatCalciteDependencies/pom.xml b/MatCalciteDependencies/pom.xml
deleted file mode 100644
index 665e7d7..0000000
--- a/MatCalciteDependencies/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
- 4.0.0
- com.github.vlsi.mat.calcite
- MatCalciteDependencies
- 1.6.0-SNAPSHOT
- bundle
-
-
-
- net.minidev
- accessors-smart
- 2.5.0
-
-
- net.minidev
- json-smart
- 2.5.0
-
-
- org.apache.calcite
- calcite-core
- 1.36.0
-
-
- com.google.guava
- guava
- 32.1.3-jre
-
-
- com.google.code.findbugs
- jsr305
- 3.0.2
-
-
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
- 5.1.9
- true
-
- META-INF
-
-
- *;scope=compile|runtime;inline=true
-
- <_exportcontents>*
- {maven-resources}, {maven-dependencies}
- .,{maven-dependencies}
- true
- jars
- *;resolution:=optional
-
- <_failok>true
- <_nouses>true
- <_srouces>true
-
-
-
-
-
-
-
-
-
- org.eclipse.m2e
- lifecycle-mapping
- 1.0.0
-
-
-
-
- bundle
- org.sonatype.tycho.m2e.wrapperBundle
-
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
- 5.1.9
-
- bundle
-
-
-
-
- org.sonatype.tycho.m2e.wrapperBundle
-
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
- 5.1.9
-
- manifest
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MatCalcitePlugin/META-INF/MANIFEST.MF b/MatCalcitePlugin/META-INF/MANIFEST.MF
index bdb066c..6598214 100644
--- a/MatCalcitePlugin/META-INF/MANIFEST.MF
+++ b/MatCalcitePlugin/META-INF/MANIFEST.MF
@@ -11,5 +11,37 @@ Require-Bundle: org.eclipse.mat.api;bundle-version="1.14.0",
org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.jface.text;bundle-version="3.7.2",
org.eclipse.core.resources;bundle-version="3.7.101"
-Bundle-ClassPath: .,target/dependency/MatCalciteDependencies.jar
Export-Package: com.github.vlsi.mat.calcite
+Import-Package: com.fasterxml.jackson.core.util,
+ com.google.common.base,
+ com.google.common.cache,
+ com.google.common.collect,
+ com.google.protobuf,
+ com.jayway.jsonpath.spi.mapper,
+ org.apache.calcite.adapter.enumerable,
+ org.apache.calcite.adapter.java,
+ org.apache.calcite.avatica,
+ org.apache.calcite.jdbc,
+ org.apache.calcite.linq4j,
+ org.apache.calcite.linq4j.tree,
+ org.apache.calcite.plan,
+ org.apache.calcite.rel,
+ org.apache.calcite.rel.core,
+ org.apache.calcite.rel.rules,
+ org.apache.calcite.rel.type,
+ org.apache.calcite.rex,
+ org.apache.calcite.schema,
+ org.apache.calcite.schema.impl,
+ org.apache.calcite.sql,
+ org.apache.calcite.sql.advise,
+ org.apache.calcite.sql.parser,
+ org.apache.calcite.sql.type,
+ org.apache.calcite.sql.validate,
+ org.apache.calcite.tools,
+ org.apache.calcite.util,
+ org.apache.commons.codec,
+ org.apache.commons.math3.fraction,
+ org.apache.commons.text.similarity,
+ org.codehaus.commons.compiler,
+ org.codehaus.janino,
+ org.locationtech.jts.geom
diff --git a/MatCalcitePlugin/build.properties b/MatCalcitePlugin/build.properties
index ea54891..31ffbdf 100644
--- a/MatCalcitePlugin/build.properties
+++ b/MatCalcitePlugin/build.properties
@@ -3,7 +3,5 @@ output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
- target/dependency/MatCalciteDependencies.jar,\
resources/
jars.compile.order = .
-jars.extra.classpath = target/dependency/MatCalciteDependencies.jar
diff --git a/MatCalcitePlugin/pom.xml b/MatCalcitePlugin/pom.xml
index 5dc03e2..130e144 100644
--- a/MatCalcitePlugin/pom.xml
+++ b/MatCalcitePlugin/pom.xml
@@ -16,9 +16,49 @@
- com.github.vlsi.mat.calcite
- MatCalciteDependencies
- ${project.version}
+ net.minidev
+ accessors-smart
+ 2.5.0
+
+
+ net.minidev
+ json-smart
+ 2.5.0
+
+
+ org.apache.calcite
+ calcite-core
+ 1.36.0
+
+
+ org.apache.commons
+ commons-dbcp2
+ 2.11.0
+
+
+ com.google.guava
+ guava
+ 32.1.3-jre
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+ org.apache.geronimo.specs
+ geronimo-jta_1.1_spec
+ 1.1.1
+
+
+ org.codehaus.janino
+ commons-compiler
+ 3.1.9
+
+
+ org.codehaus.janino
+ janino
+ 3.1.9
@@ -33,6 +73,20 @@
+
+ org.apache.felix
+ maven-bundle-plugin
+ 5.1.9
+
+
+ bundle-manifest
+ process-classes
+
+ manifest
+
+
+
+
maven-dependency-plugin
@@ -67,13 +121,6 @@
${tycho-version}
true
-
-
- com.github.vlsi.mat.calcite
- MatCalciteDependencies
- ${project.version}
-
-
diff --git a/MatCalcitePlugin/src/com/github/vlsi/mat/calcite/CalciteDataSource.java b/MatCalcitePlugin/src/com/github/vlsi/mat/calcite/CalciteDataSource.java
index 2684c36..1fdf742 100644
--- a/MatCalcitePlugin/src/com/github/vlsi/mat/calcite/CalciteDataSource.java
+++ b/MatCalcitePlugin/src/com/github/vlsi/mat/calcite/CalciteDataSource.java
@@ -9,6 +9,7 @@
import org.apache.calcite.schema.Schema;
import org.apache.calcite.schema.SchemaPlus;
import org.codehaus.commons.compiler.CompilerFactoryFactory;
+import org.codehaus.janino.CompilerFactory;
import org.eclipse.mat.snapshot.ISnapshot;
import java.sql.Connection;
@@ -85,7 +86,7 @@ private static void initJanino() throws SQLException {
Thread currentThread = Thread.currentThread();
ClassLoader cl = currentThread.getContextClassLoader();
try {
- currentThread.setContextClassLoader(CompilerFactoryFactory.class.getClassLoader());
+ currentThread.setContextClassLoader(CompilerFactory.class.getClassLoader());
if (CompilerFactoryFactory.getDefaultCompilerFactory() == null) {
throw new SQLException("Janino compiler is not initialized: CompilerFactoryFactory.getDefaultCompilerFactory" +
"() == null");
diff --git a/MatCalciteTargetPlatform/MatCalciteTargetPlatform.target b/MatCalciteTargetPlatform/MatCalciteTargetPlatform.target
index 3e7c108..33090c1 100644
--- a/MatCalciteTargetPlatform/MatCalciteTargetPlatform.target
+++ b/MatCalciteTargetPlatform/MatCalciteTargetPlatform.target
@@ -1,7 +1,7 @@
-
+
@@ -9,5 +9,34 @@
+
+
+
+ net.minidev
+ accessors-smart
+ 2.5.0
+
+
+ net.minidev
+ json-smart
+ 2.5.0
+
+
+ org.apache.calcite
+ calcite-core
+ 1.36.0
+
+
+ com.google.guava
+ guava
+ 32.1.3-jre
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+
diff --git a/README.md b/README.md
index a1a6837..375e125 100644
--- a/README.md
+++ b/README.md
@@ -240,24 +240,12 @@ Eclipse plugin cannot depend on jars from maven repository.
It has to be a OSGi bundle, however Calcite is easier to reach via maven.
So we use two-phase approach: bundle the dependencies in a single jar, then use this jar in eclipse project.
-1. Build dependencies.jar
+1. Build the plugin
```
- cd MatCalciteDependencies
- mvn install
+ ./mvnw install # from the top-level folder
```
- This will create a jar with all the dependencies in `dependencies/target` folder.
- You do not need to touch/move/copy the jar.
-
-2. Build the plugin
-
- ```
- mvn install # from the top-level folder
- ```
-
- Note: this will copy `MatCalciteDependencies` to `MatCalcitePlugin/MatCalcitePlugin/target/dependency` so Eclipse can find it.
-
The final repository (aka "update site") with the plugin will be created in `eclipse-repository/target/eclipse-repository-1.0.0-SNAPSHOT.zip`
diff --git a/pom.xml b/pom.xml
index 3fc27b9..648c3f7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,6 +78,21 @@
org.eclipse.tycho
tycho-packaging-plugin
${tycho-version}
+
+
+ validate-pom
+ verify
+
+ verify-osgi-pom
+
+
+
+
+
+ true
+
+ true
+
org.eclipse.tycho
@@ -102,7 +117,7 @@
target-platform-configuration
${tycho-version}
-
+ wrapAsBundle
JavaSE-17