Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
ca3081be
F
flink
项目概览
doujutun3207
/
flink
与 Fork 源项目一致
从无法访问的项目Fork
通知
24
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
flink
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ca3081be
编写于
5月 28, 2018
作者:
Z
zentol
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FLINK-9091][build] Dependency convergence run against dependency-reduced poms
This closes #6102.
上级
d17c6b69
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
124 addition
and
4 deletion
+124
-4
pom.xml
pom.xml
+25
-0
tools/check_dependency_convergence.sh
tools/check_dependency_convergence.sh
+67
-0
tools/travis_mvn_watchdog.sh
tools/travis_mvn_watchdog.sh
+32
-4
未找到文件。
pom.xml
浏览文件 @
ca3081be
...
...
@@ -644,6 +644,29 @@ under the License.
</build>
</profile>
<profile>
<id>
check-convergence
</id>
<activation>
<property>
<name>
check-convergence
</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-enforcer-plugin
</artifactId>
<executions>
<execution>
<id>
dependency-convergence
</id>
<phase>
validate
</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>
legacyCode
</id>
<activation>
...
...
@@ -1243,6 +1266,8 @@ under the License.
</execution>
<execution>
<id>
dependency-convergence
</id>
<!-- disabled by default as it interacts badly with shade-plugin -->
<phase>
none
</phase>
<goals>
<goal>
enforce
</goal>
</goals>
...
...
tools/check_dependency_convergence.sh
0 → 100755
浏览文件 @
ca3081be
#!/usr/bin/env bash
################################################################################
# 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.
################################################################################
HERE
=
"
`
dirname
\"
$0
\"
`
"
# relative
HERE
=
"
`
(
cd
\"
$HERE
\"
&&
pwd
)
`
"
# absolutized and normalized
if
[
-z
"
$HERE
"
]
;
then
# error; for some reason, the path is not accessible
# to the script (e.g. permissions re-evaled after suid)
exit
1
# fail
fi
FLINK_DIR
=
HERE
if
[[
$(
basename
${
HERE
}
)
==
"tools"
]]
;
then
FLINK_DIR
=
"
${
HERE
}
/.."
fi
FLINK_DIR
=
"
`
(
cd
\"
${
FLINK_DIR
}
\"
&&
pwd
)
`
"
echo
${
FLINK_DIR
}
# get list of all flink modules
# searches for directories containing a pom.xml file
# sorts the list alphabetically
# only accepts directories starting with "flink" to filter force-shading
modules
=
$(
find
.
-maxdepth
3
-name
'pom.xml'
-printf
'%h\n'
|
sort
-u
|
grep
"flink"
)
for
module
in
${
modules
}
do
# we are only interested in child modules
for
other_module
in
${
modules
}
do
if
[[
"
${
other_module
}
"
!=
"
${
module
}
"
&&
"
${
other_module
}
"
=
"
${
module
}
"
/
*
]]
;
then
echo
"excluding
${
module
}
since it is not a leaf module"
continue
2
fi
done
cd
"
${
module
}
"
echo
"checking
${
module
}
"
output
=
$(
mvn validate
-nsu
-Dcheckstyle
.skip
=
true
-Dcheck-convergence
)
exit_code
=
$?
if
[[
${
exit_code
}
!=
0
]]
;
then
echo
"dependency convergence failed."
echo
"
${
output
}
"
exit
${
exit_code
}
fi
cd
"
${
FLINK_DIR
}
"
done
exit
0
tools/travis_mvn_watchdog.sh
浏览文件 @
ca3081be
...
...
@@ -509,12 +509,40 @@ EXIT_CODE=$(<$MVN_EXIT)
echo
"MVN exited with EXIT CODE:
${
EXIT_CODE
}
."
# Make sure to kill the watchdog in any case after $MVN_COMPILE has completed
echo
"Trying to KILL watchdog (
${
WD_PID
}
)."
(
kill
$WD_PID
2>&1
)
>
/dev/null
rm
$MVN_PID
rm
$MVN_EXIT
# only run dependency-convergence in misc because it is the only profile building all of Flink
case
$TEST
in
(
misc
)
if
[
$EXIT_CODE
==
0
]
;
then
printf
"
\n\n
==============================================================================
\n
"
printf
"Checking dependency convergence
\n
"
printf
"==============================================================================
\n
"
./tools/check_dependency_convergence.sh
EXIT_CODE
=
$?
else
printf
"
\n
==============================================================================
\n
"
printf
"Previous build failure detected, skipping dependency-convergence check.
\n
"
printf
"==============================================================================
\n
"
fi
;;
esac
# Run tests if compilation was successful
if
[
$EXIT_CODE
==
0
]
;
then
# Start watching $MVN_OUT
watchdog &
echo
"STARTED watchdog (
${
WD_PID
}
)."
WD_PID
=
$!
echo
"RUNNING '
${
MVN_TEST
}
'."
# Run $MVN_TEST and pipe output to $MVN_OUT for the watchdog. The PID is written to $MVN_PID to
...
...
@@ -526,6 +554,10 @@ if [ $EXIT_CODE == 0 ]; then
echo
"MVN exited with EXIT CODE:
${
EXIT_CODE
}
."
# Make sure to kill the watchdog in any case after $MVN_TEST has completed
echo
"Trying to KILL watchdog (
${
WD_PID
}
)."
(
kill
$WD_PID
2>&1
)
>
/dev/null
rm
$MVN_PID
rm
$MVN_EXIT
else
...
...
@@ -536,10 +568,6 @@ fi
# Post
# Make sure to kill the watchdog in any case after $MVN_COMPILE and $MVN_TEST have completed
echo
"Trying to KILL watchdog (
${
WD_PID
}
)."
(
kill
$WD_PID
2>&1
)
>
/dev/null
# only misc builds flink-dist and flink-yarn-tests
case
$TEST
in
(
misc
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录