Repository: zeppelin Updated Branches: refs/heads/master 862871f67 -> 4a3057fa8
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/4a3057fa/shell/pom.xml ---------------------------------------------------------------------- diff --git a/shell/pom.xml b/shell/pom.xml index 58d8900..0157d86 100644 --- a/shell/pom.xml +++ b/shell/pom.xml @@ -20,10 +20,10 @@ <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>zeppelin</artifactId> + <artifactId>interpreter-parent</artifactId> <groupId>org.apache.zeppelin</groupId> <version>0.8.0-SNAPSHOT</version> - <relativePath>..</relativePath> + <relativePath>../interpreter-parent</relativePath> </parent> <groupId>org.apache.zeppelin</groupId> @@ -33,17 +33,18 @@ <name>Zeppelin: Shell interpreter</name> <properties> + <interpreter.name>sh</interpreter.name> + <!--library versions --> <commons.lang3.version>3.4</commons.lang3.version> <commons.exec.version>1.3</commons.exec.version> + <interpreter.name>sh</interpreter.name> </properties> <dependencies> <dependency> <groupId>${project.groupId}</groupId> <artifactId>zeppelin-interpreter</artifactId> - <version>${project.version}</version> - <scope>provided</scope> </dependency> <dependency> @@ -79,54 +80,12 @@ <plugins> <plugin> <artifactId>maven-enforcer-plugin</artifactId> - <executions> - <execution> - <id>enforce</id> - <phase>none</phase> - </execution> - </executions> </plugin> - <plugin> <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy-dependencies</id> - <phase>package</phase> - <goals> - <goal>copy-dependencies</goal> - </goals> - <configuration> - <outputDirectory>${project.build.directory}/../../interpreter/sh</outputDirectory> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>false</overWriteSnapshots> - <overWriteIfNewer>true</overWriteIfNewer> - <includeScope>runtime</includeScope> - </configuration> - </execution> - <execution> - <id>copy-artifact</id> - <phase>package</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <outputDirectory>${project.build.directory}/../../interpreter/sh</outputDirectory> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>false</overWriteSnapshots> - <overWriteIfNewer>true</overWriteIfNewer> - <includeScope>runtime</includeScope> - <artifactItems> - <artifactItem> - <groupId>${project.groupId}</groupId> - <artifactId>${project.artifactId}</artifactId> - <version>${project.version}</version> - <type>${project.packaging}</type> - </artifactItem> - </artifactItems> - </configuration> - </execution> - </executions> + </plugin> + <plugin> + <artifactId>maven-resources-plugin</artifactId> </plugin> </plugins> </build> http://git-wip-us.apache.org/repos/asf/zeppelin/blob/4a3057fa/zeppelin-interpreter/pom.xml ---------------------------------------------------------------------- diff --git a/zeppelin-interpreter/pom.xml b/zeppelin-interpreter/pom.xml index d08ce4e..00184da 100644 --- a/zeppelin-interpreter/pom.xml +++ b/zeppelin-interpreter/pom.xml @@ -232,4 +232,79 @@ <scope>test</scope> </dependency> </dependencies> + + <build> + <pluginManagement> + <plugins> + + <plugin> + <artifactId>maven-enforcer-plugin</artifactId> + <executions> + <execution> + <id>enforce</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-dependencies</id> + <phase>package</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <outputDirectory>${basedir}/interpreter/${project.name}</outputDirectory> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>false</overWriteSnapshots> + <overWriteIfNewer>true</overWriteIfNewer> + <includeScope>runtime</includeScope> + </configuration> + </execution> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <outputDirectory>${basedir}/interpreter/${project.name}</outputDirectory> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>false</overWriteSnapshots> + <overWriteIfNewer>true</overWriteIfNewer> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <executions> + <execution> + <id>copy-resources</id> + <phase>package</phase> + <goals> + <goal>resources</goal> + </goals> + <configuration> + <outputDirectory>${basedir}/interpreter/{project.name}</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </pluginManagement> + </build> + </project> http://git-wip-us.apache.org/repos/asf/zeppelin/blob/4a3057fa/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java ---------------------------------------------------------------------- diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java index 4b130e3..9dfce21 100644 --- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java +++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java @@ -192,8 +192,15 @@ public class InterpreterSettingManager { Map<String, InterpreterProperty> mergedProperties = new HashMap<>(InterpreterSetting.convertInterpreterProperties( interpreterSettingTemplate.getProperties())); - mergedProperties.putAll(InterpreterSetting.convertInterpreterProperties( - savedInterpreterSetting.getProperties())); + Map<String, InterpreterProperty> savedProperties = InterpreterSetting + .convertInterpreterProperties(savedInterpreterSetting.getProperties()); + for (Map.Entry<String, InterpreterProperty> entry : savedProperties.entrySet()) { + // only merge properties whose value is not empty + if (entry.getValue().getValue() != null && ! + StringUtils.isBlank(entry.getValue().toString())) { + mergedProperties.put(entry.getKey(), entry.getValue()); + } + } savedInterpreterSetting.setProperties(mergedProperties); // merge InterpreterInfo savedInterpreterSetting.setInterpreterInfos(