diff --git a/dhp-pace-core/src/main/java/eu/dnetlib/pace/model/SparkModel.scala b/dhp-pace-core/src/main/java/eu/dnetlib/pace/model/SparkModel.scala
index aa04188da..e6a1c4ccc 100644
--- a/dhp-pace-core/src/main/java/eu/dnetlib/pace/model/SparkModel.scala
+++ b/dhp-pace-core/src/main/java/eu/dnetlib/pace/model/SparkModel.scala
@@ -3,7 +3,7 @@ package eu.dnetlib.pace.model
import com.jayway.jsonpath.{Configuration, JsonPath}
import eu.dnetlib.pace.common.AbstractPaceFunctions
import eu.dnetlib.pace.config.{DedupConfig, Type}
-import eu.dnetlib.pace.util.MapDocumentUtil
+import eu.dnetlib.pace.util.{MapDocumentUtil, SparkCompatUtils}
import org.apache.commons.lang3.StringUtils
import org.apache.spark.sql.catalyst.encoders.RowEncoder
import org.apache.spark.sql.catalyst.expressions.GenericRowWithSchema
@@ -52,7 +52,7 @@ case class SparkModel(conf: DedupConfig) {
val orderingFieldPosition: Int = schema.fieldIndex(orderingFieldName)
val parseJsonDataset: (Dataset[String] => Dataset[Row]) = df => {
- df.map(r => rowFromJson(r))(RowEncoder(schema))
+ df.map(r => rowFromJson(r))(SparkCompatUtils.encoderFor(schema))
}
def rowFromJson(json: String): Row = {
diff --git a/dhp-shade-package/pom.xml b/dhp-shade-package/pom.xml
new file mode 100644
index 000000000..128a57116
--- /dev/null
+++ b/dhp-shade-package/pom.xml
@@ -0,0 +1,169 @@
+
+
+ 4.0.0
+
+ eu.dnetlib.dhp
+ dhp
+ 1.2.5-SNAPSHOT
+ ../pom.xml
+
+
+
+ dhp-shade-package
+ jar
+
+
+
+ DHPSite
+ ${dhp.site.stage.path}/dhp-common
+
+
+
+ This module create a jar of all module dependencies
+
+
+
+
+
+ eu.dnetlib.dhp
+ dhp-actionmanager
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-aggregation
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-blacklist
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-broker-events
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-dedup-openaire
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-enrichment
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-graph-mapper
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-graph-provision
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-impact-indicators
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-stats-actionsets
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-stats-hist-snaps
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-stats-monitor-irish
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-stats-promote
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-stats-update
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-swh
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-usage-raw-data-update
+ ${project.version}
+
+
+ eu.dnetlib.dhp
+ dhp-usage-stats-build
+ ${project.version}
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+
+
+ package
+
+ shade
+
+
+
+
+ eu.dnetlib.dhp.oa.dedup.SparkCreateSimRels
+
+
+
+
+ META-INF/cxf/bus-extensions.txt
+
+
+
+
+ *:*
+
+ META-INF/maven/**
+ META-INF/*.SF
+ META-INF/*.DSA
+ META-INF/*.RSA
+
+
+
+
+
+ com
+ repackaged.com.google.common
+
+ com.google.common.**
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/SparkCreateMergeRels.java b/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/SparkCreateMergeRels.java
index 59626c141..d48351c48 100644
--- a/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/SparkCreateMergeRels.java
+++ b/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/SparkCreateMergeRels.java
@@ -42,6 +42,7 @@ import eu.dnetlib.dhp.utils.ISLookupClientFactory;
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException;
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService;
import eu.dnetlib.pace.config.DedupConfig;
+import eu.dnetlib.pace.util.SparkCompatUtils;
import scala.Tuple3;
import scala.collection.JavaConversions;
@@ -148,8 +149,7 @@ public class SparkCreateMergeRels extends AbstractSparkAction {
Dataset pivotHistory = spark
.createDataset(
Collections.emptyList(),
- RowEncoder
- .apply(StructType.fromDDL("id STRING, lastUsage STRING")));
+ SparkCompatUtils.encoderFor(StructType.fromDDL("id STRING, lastUsage STRING")));
if (StringUtils.isNotBlank(pivotHistoryDatabase)) {
pivotHistory = spark
diff --git a/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/SparkPropagateRelation.java b/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/SparkPropagateRelation.java
index c64fbe4a4..c7efce4d7 100644
--- a/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/SparkPropagateRelation.java
+++ b/dhp-workflows/dhp-dedup-openaire/src/main/java/eu/dnetlib/dhp/oa/dedup/SparkPropagateRelation.java
@@ -8,7 +8,6 @@ import org.apache.spark.SparkConf;
import org.apache.spark.api.java.function.MapFunction;
import org.apache.spark.api.java.function.ReduceFunction;
import org.apache.spark.sql.*;
-import org.apache.spark.sql.catalyst.encoders.RowEncoder;
import org.apache.spark.sql.types.StructType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/pom.xml b/pom.xml
index 06e4ba9d4..fc68a666d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,6 +23,7 @@
dhp-pace-core
dhp-common
dhp-workflows
+ dhp-shade-package