You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by et...@apache.org on 2019/08/16 15:43:37 UTC
[storm] branch master updated: STORM-3485: Fix version info mojo to
not crash when sources are built outside the git repo,
and run the plugin for storm-client
This is an automated email from the ASF dual-hosted git repository.
ethanli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/storm.git
The following commit(s) were added to refs/heads/master by this push:
new 36356ff STORM-3485: Fix version info mojo to not crash when sources are built outside the git repo, and run the plugin for storm-client
new 0d313589 Merge pull request #3102 from srdo/STORM-3485
36356ff is described below
commit 36356ff16e851ab43aac7c927e5a9dfe84b71309
Author: Stig Rohde Døssing <sr...@apache.org>
AuthorDate: Thu Aug 15 16:54:43 2019 +0200
STORM-3485: Fix version info mojo to not crash when sources are built outside the git repo, and run the plugin for storm-client
---
.../maven/plugin/versioninfo/VersionInfoMojo.java | 6 ++++++
storm-client/pom.xml | 22 ++++++++++++++++++++++
.../java/org/apache/storm/daemon/ui/UIHelpers.java | 1 -
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/storm-buildtools/storm-maven-plugins/src/main/java/org/apache/storm/maven/plugin/versioninfo/VersionInfoMojo.java b/storm-buildtools/storm-maven-plugins/src/main/java/org/apache/storm/maven/plugin/versioninfo/VersionInfoMojo.java
index eb1a3ae..1cbefeb 100644
--- a/storm-buildtools/storm-maven-plugins/src/main/java/org/apache/storm/maven/plugin/versioninfo/VersionInfoMojo.java
+++ b/storm-buildtools/storm-maven-plugins/src/main/java/org/apache/storm/maven/plugin/versioninfo/VersionInfoMojo.java
@@ -194,6 +194,8 @@ public class VersionInfoMojo extends AbstractMojo {
}
}
break;
+ case NONE:
+ break;
default:
throw new IllegalArgumentException(String.format("SCM %s is not supported",
scm));
@@ -221,6 +223,8 @@ public class VersionInfoMojo extends AbstractMojo {
}
}
break;
+ case NONE:
+ break;
default:
throw new IllegalArgumentException(String.format("SCM %s is not supported",
scm));
@@ -249,6 +253,8 @@ public class VersionInfoMojo extends AbstractMojo {
}
}
break;
+ case NONE:
+ break;
default:
throw new IllegalArgumentException(String.format("SCM %s is not supported",
scm));
diff --git a/storm-client/pom.xml b/storm-client/pom.xml
index 77c2dd9..2c32b87 100644
--- a/storm-client/pom.xml
+++ b/storm-client/pom.xml
@@ -300,6 +300,28 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.storm</groupId>
+ <artifactId>storm-maven-plugins</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <id>version-info</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>version-info</goal>
+ </goals>
+ <configuration>
+ <source>
+ <directory>${basedir}/src/</directory>
+ <includes>
+ <include>jvm/**/*.java</include>
+ </includes>
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/storm-webapp/src/main/java/org/apache/storm/daemon/ui/UIHelpers.java b/storm-webapp/src/main/java/org/apache/storm/daemon/ui/UIHelpers.java
index 3f4595c..26c6325 100644
--- a/storm-webapp/src/main/java/org/apache/storm/daemon/ui/UIHelpers.java
+++ b/storm-webapp/src/main/java/org/apache/storm/daemon/ui/UIHelpers.java
@@ -526,7 +526,6 @@ public class UIHelpers {
private static final AtomicReference<List<Map<String, String>>> MEMORIZED_VERSIONS = new AtomicReference<>();
private static final AtomicReference<Map<String, String>> MEMORIZED_FULL_VERSION = new AtomicReference<>();
-
private static Map<String, String> toJsonStruct(IVersionInfo info) {
Map<String, String> ret = new HashMap<>();
ret.put("version", info.getVersion());