You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by sr...@apache.org on 2018/01/04 15:47:48 UTC
storm git commit: STORM-2858: Fix worker-launcher build by erroring
out if asprintf fails to allocate memory. Replace make-maven-plugin with a
build shell script.
Repository: storm
Updated Branches:
refs/heads/1.1.x-branch 7418bc7db -> 0862911cd
STORM-2858: Fix worker-launcher build by erroring out if asprintf fails to allocate memory. Replace make-maven-plugin with a build shell script.
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/0862911c
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/0862911c
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/0862911c
Branch: refs/heads/1.1.x-branch
Commit: 0862911cd5e5442e8d1954736555d2a06b5ebc21
Parents: 7418bc7
Author: Stig Rohde Døssing <sr...@apache.org>
Authored: Wed Dec 13 16:47:31 2017 +0100
Committer: Stig Rohde Døssing <sr...@apache.org>
Committed: Thu Jan 4 16:21:46 2018 +0100
----------------------------------------------------------------------
storm-core/pom.xml | 79 +++++++++++---------
.../src/resources/compile-worker-launcher.sh | 21 ++++++
2 files changed, 66 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/0862911c/storm-core/pom.xml
----------------------------------------------------------------------
diff --git a/storm-core/pom.xml b/storm-core/pom.xml
index 40c4836..61db89b 100644
--- a/storm-core/pom.xml
+++ b/storm-core/pom.xml
@@ -31,6 +31,7 @@
<properties>
<worker-launcher.conf.dir>/etc/storm</worker-launcher.conf.dir>
+ <worker-launcher.build.dir>${project.build.directory}/native/worker-launcher</worker-launcher.build.dir>
<worker-launcher.additional_cflags />
<argLine />
</properties>
@@ -144,7 +145,7 @@
<artifactId>java.jmx</artifactId>
<version>${java_jmx.version}</version>
</dependency>
-
+
<!--java-->
<dependency>
<groupId>commons-io</groupId>
@@ -343,7 +344,7 @@
</dependencies>
<build>
<sourceDirectory>src/jvm</sourceDirectory>
- <testSourceDirectory>test/jvm</testSourceDirectory>
+ <testSourceDirectory>test/jvm</testSourceDirectory>
<resources>
<resource>
<directory>../conf</directory>
@@ -1028,13 +1029,11 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>1.2.1</version>
+ <version>1.6.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals><goal>exec</goal></goals>
- </execution>
- </executions>
<configuration>
<executable>sh</executable>
<arguments>
@@ -1042,50 +1041,62 @@
<argument>mkdir -p ${project.build.directory}/; cp -rufv ${basedir}/src/native/ ${project.build.directory}/</argument>
</arguments>
</configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>make-maven-plugin</artifactId>
- <version>1.0-beta-1</version>
- <executions>
+ </execution>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
- <goal>autoreconf</goal>
- <goal>configure</goal>
- <goal>make-install</goal>
+ <goal>exec</goal>
</goals>
+ <configuration>
+ <executable>sh</executable>
+ <arguments>
+ <argument>compile-worker-launcher.sh</argument>
+ </arguments>
+ <workingDirectory>${worker-launcher.build.dir}</workingDirectory>
+ </configuration>
</execution>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
- <goal>test</goal>
+ <goal>exec</goal>
</goals>
- </execution>
- </executions>
<configuration>
- <!-- autoreconf settings -->
- <workDir>${project.build.directory}/native/worker-launcher</workDir>
+ <executable>make</executable>
<arguments>
- <argument>-i</argument>
+ <argument>check</argument>
</arguments>
-
- <!-- configure settings -->
- <configureEnvironment>
- <property>
- <name>CFLAGS</name>
- <value>-DEXEC_CONF_DIR=${worker-launcher.conf.dir} ${worker-launcher.additional_cflags}</value>
- </property>
- </configureEnvironment>
- <configureWorkDir>${project.build.directory}/native/worker-launcher</configureWorkDir>
- <prefix>/usr/local</prefix>
-
- <!-- configure & make settings -->
- <destDir>${project.build.directory}/native/target</destDir>
-
+ <workingDirectory>${worker-launcher.build.dir}</workingDirectory>
</configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.0.2</version>
+ <executions>
+ <execution>
+ <id>copy-build-scripts</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+ <directory>src/resources</directory>
+ <includes>
+ <include>compile-worker-launcher.sh</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <outputDirectory>${worker-launcher.build.dir}</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/storm/blob/0862911c/storm-core/src/resources/compile-worker-launcher.sh
----------------------------------------------------------------------
diff --git a/storm-core/src/resources/compile-worker-launcher.sh b/storm-core/src/resources/compile-worker-launcher.sh
new file mode 100644
index 0000000..dffe285
--- /dev/null
+++ b/storm-core/src/resources/compile-worker-launcher.sh
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+autoreconf -i
+export CFLAGS=-DEXEC_CONF_DIR=${worker-launcher.conf.dir} ${worker-launcher.additional_cflags}
+./configure --prefix=/usr/local
+export DESTDIR=${project.build.directory}/native/target
+make install
\ No newline at end of file