Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
阿啄debugIT
transmittable-thread-local
提交
a7489163
T
transmittable-thread-local
项目概览
阿啄debugIT
/
transmittable-thread-local
与 Fork 源项目一致
从无法访问的项目Fork
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
transmittable-thread-local
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a7489163
编写于
9月 14, 2018
作者:
oldratlee
🔥
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
upgrade maven wrapper to 3.5.4
上级
c35568e0
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
196 addition
and
10 deletion
+196
-10
.mvn/wrapper/MavenWrapperDownloader.java
.mvn/wrapper/MavenWrapperDownloader.java
+110
-0
.mvn/wrapper/maven-wrapper.jar
.mvn/wrapper/maven-wrapper.jar
+0
-0
.mvn/wrapper/maven-wrapper.properties
.mvn/wrapper/maven-wrapper.properties
+1
-1
mvnw
mvnw
+59
-0
mvnw.cmd
mvnw.cmd
+17
-1
scripts/common.sh
scripts/common.sh
+7
-6
scripts/integration-test.sh
scripts/integration-test.sh
+2
-2
未找到文件。
.mvn/wrapper/MavenWrapperDownloader.java
0 → 100755
浏览文件 @
a7489163
/*
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.
*/
import
java.net.*
;
import
java.io.*
;
import
java.nio.channels.*
;
import
java.util.Properties
;
public
class
MavenWrapperDownloader
{
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private
static
final
String
DEFAULT_DOWNLOAD_URL
=
"https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
;
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private
static
final
String
MAVEN_WRAPPER_PROPERTIES_PATH
=
".mvn/wrapper/maven-wrapper.properties"
;
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private
static
final
String
MAVEN_WRAPPER_JAR_PATH
=
".mvn/wrapper/maven-wrapper.jar"
;
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private
static
final
String
PROPERTY_NAME_WRAPPER_URL
=
"wrapperUrl"
;
public
static
void
main
(
String
args
[])
{
System
.
out
.
println
(
"- Downloader started"
);
File
baseDirectory
=
new
File
(
args
[
0
]);
System
.
out
.
println
(
"- Using base directory: "
+
baseDirectory
.
getAbsolutePath
());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File
mavenWrapperPropertyFile
=
new
File
(
baseDirectory
,
MAVEN_WRAPPER_PROPERTIES_PATH
);
String
url
=
DEFAULT_DOWNLOAD_URL
;
if
(
mavenWrapperPropertyFile
.
exists
())
{
FileInputStream
mavenWrapperPropertyFileInputStream
=
null
;
try
{
mavenWrapperPropertyFileInputStream
=
new
FileInputStream
(
mavenWrapperPropertyFile
);
Properties
mavenWrapperProperties
=
new
Properties
();
mavenWrapperProperties
.
load
(
mavenWrapperPropertyFileInputStream
);
url
=
mavenWrapperProperties
.
getProperty
(
PROPERTY_NAME_WRAPPER_URL
,
url
);
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
"- ERROR loading '"
+
MAVEN_WRAPPER_PROPERTIES_PATH
+
"'"
);
}
finally
{
try
{
if
(
mavenWrapperPropertyFileInputStream
!=
null
)
{
mavenWrapperPropertyFileInputStream
.
close
();
}
}
catch
(
IOException
e
)
{
// Ignore ...
}
}
}
System
.
out
.
println
(
"- Downloading from: : "
+
url
);
File
outputFile
=
new
File
(
baseDirectory
.
getAbsolutePath
(),
MAVEN_WRAPPER_JAR_PATH
);
if
(!
outputFile
.
getParentFile
().
exists
())
{
if
(!
outputFile
.
getParentFile
().
mkdirs
())
{
System
.
out
.
println
(
"- ERROR creating output direcrory '"
+
outputFile
.
getParentFile
().
getAbsolutePath
()
+
"'"
);
}
}
System
.
out
.
println
(
"- Downloading to: "
+
outputFile
.
getAbsolutePath
());
try
{
downloadFileFromURL
(
url
,
outputFile
);
System
.
out
.
println
(
"Done"
);
System
.
exit
(
0
);
}
catch
(
Throwable
e
)
{
System
.
out
.
println
(
"- Error downloading"
);
e
.
printStackTrace
();
System
.
exit
(
1
);
}
}
private
static
void
downloadFileFromURL
(
String
urlString
,
File
destination
)
throws
Exception
{
URL
website
=
new
URL
(
urlString
);
ReadableByteChannel
rbc
;
rbc
=
Channels
.
newChannel
(
website
.
openStream
());
FileOutputStream
fos
=
new
FileOutputStream
(
destination
);
fos
.
getChannel
().
transferFrom
(
rbc
,
0
,
Long
.
MAX_VALUE
);
fos
.
close
();
rbc
.
close
();
}
}
.mvn/wrapper/maven-wrapper.jar
浏览文件 @
a7489163
无法预览此类型文件
.mvn/wrapper/maven-wrapper.properties
浏览文件 @
a7489163
distributionUrl
=
https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.2.5/apache-maven-3.2.5-bin.zip
\ No newline at end of file
distributionUrl
=
https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
\ No newline at end of file
mvnw
浏览文件 @
a7489163
...
...
@@ -200,6 +200,65 @@ if [ -z "$BASE_DIR" ]; then
exit
1
;
fi
##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data.
##########################################################################################
if
[
-r
"
$BASE_DIR
/.mvn/wrapper/maven-wrapper.jar"
]
;
then
if
[
"
$MVNW_VERBOSE
"
=
true
]
;
then
echo
"Found .mvn/wrapper/maven-wrapper.jar"
fi
else
if
[
"
$MVNW_VERBOSE
"
=
true
]
;
then
echo
"Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
fi
jarUrl
=
"https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
while
IFS
=
"="
read
key value
;
do
case
"
$key
"
in
(
wrapperUrl
)
jarUrl
=
"
$value
"
;
break
;;
esac
done
<
"
$BASE_DIR
/.mvn/wrapper/maven-wrapper.properties"
if
[
"
$MVNW_VERBOSE
"
=
true
]
;
then
echo
"Downloading from:
$jarUrl
"
fi
wrapperJarPath
=
"
$BASE_DIR
/.mvn/wrapper/maven-wrapper.jar"
if
command
-v
wget
>
/dev/null
;
then
if
[
"
$MVNW_VERBOSE
"
=
true
]
;
then
echo
"Found wget ... using wget"
fi
wget
"
$jarUrl
"
-O
"
$wrapperJarPath
"
elif
command
-v
curl
>
/dev/null
;
then
if
[
"
$MVNW_VERBOSE
"
=
true
]
;
then
echo
"Found curl ... using curl"
fi
curl
-o
"
$wrapperJarPath
"
"
$jarUrl
"
else
if
[
"
$MVNW_VERBOSE
"
=
true
]
;
then
echo
"Falling back to using Java to download"
fi
javaClass
=
"
$BASE_DIR
/.mvn/wrapper/MavenWrapperDownloader.java"
if
[
-e
"
$javaClass
"
]
;
then
if
[
!
-e
"
$BASE_DIR
/.mvn/wrapper/MavenWrapperDownloader.class"
]
;
then
if
[
"
$MVNW_VERBOSE
"
=
true
]
;
then
echo
" - Compiling MavenWrapperDownloader.java ..."
fi
# Compiling the Java class
(
"
$JAVA_HOME
/bin/javac"
"
$javaClass
"
)
fi
if
[
-e
"
$BASE_DIR
/.mvn/wrapper/MavenWrapperDownloader.class"
]
;
then
# Running the downloader
if
[
"
$MVNW_VERBOSE
"
=
true
]
;
then
echo
" - Running MavenWrapperDownloader.java ..."
fi
(
"
$JAVA_HOME
/bin/java"
-cp
.mvn/wrapper MavenWrapperDownloader
"
$MAVEN_PROJECTBASEDIR
"
)
fi
fi
fi
fi
##########################################################################################
# End of extension
##########################################################################################
export
MAVEN_PROJECTBASEDIR
=
${
MAVEN_BASEDIR
:-
"
$BASE_DIR
"
}
if
[
"
$MVNW_VERBOSE
"
=
true
]
;
then
echo
$MAVEN_PROJECTBASEDIR
...
...
mvnw.cmd
浏览文件 @
a7489163
...
...
@@ -117,10 +117,26 @@ for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do s
:endReadAdditionalConfig
SET
MAVEN_JAVA_EXE
=
"
%JAVA_HOME%
\bin\java.exe"
set
WRAPPER_JAR
=
"
%MAVEN_PROJECTBASEDIR%
\.mvn\wrapper\maven-wrapper.jar"
set
WRAPPER_LAUNCHER
=
org
.apache.maven.wrapper.MavenWrapperMain
set
DOWNLOAD_URL
=
"https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
FOR
/F
"tokens=1,2 delims=="
%%A
IN
(
%MAVEN_PROJECTBASEDIR%
\.mvn\wrapper\maven
-wrapper
.properties
)
DO
(
IF
"
%%A
"
==
"wrapperUrl"
SET
DOWNLOAD_URL
=
%%B
)
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if
exist
%WRAPPER_JAR%
(
echo
Found
%WRAPPER_JAR%
)
else
(
echo
Couldn
't find
%WRAPPER_JAR%
, downloading it ...
echo Downloading from:
%DOWNLOAD_URL%
powershell -Command "(New-Object Net.WebClient).DownloadFile('
%DOWNLOAD_URL%
', '
%WRAPPER_JAR%
')"
echo Finished downloading
%WRAPPER_JAR%
)
@REM End of extension
%MAVEN_JAVA_EXE%
%JVM_CONFIG_MAVEN_PROPS%
%MAVEN_OPTS%
%MAVEN_DEBUG_OPTS%
-classpath
%WRAPPER_JAR%
"-Dmaven.multiModuleProjectDirectory=
%MAVEN_PROJECTBASEDIR%
"
%WRAPPER_LAUNCHER%
%MAVEN_CONFIG%
%
*
if ERRORLEVEL 1 goto error
goto end
...
...
scripts/common.sh
浏览文件 @
a7489163
...
...
@@ -91,27 +91,30 @@ readonly -a JAVA_CMD=(
-Xdebug -Xrunjdwp
:transport
=dt_socket,server=y,suspend=y,address=5005
}
)
readonly
-a
MVN_CMD
=(
./mvnw
-V
)
#################################################################################
# maven operation functions
#################################################################################
mvnClean
()
{
runCmd
./mvnw
clean
||
die
"fail to mvn clean!"
runCmd
"
${
MVN_CMD
[@]
}
"
clean
||
die
"fail to mvn clean!"
}
mvnBuildJar
()
{
runCmd
./mvnw
install
-Pgen-src
+doc
-Pgen-git-properties
-Dmaven
.test.skip
||
die
"fail to build jar!"
runCmd
"
${
MVN_CMD
[@]
}
"
install
-Pgen-src
+doc
-Pgen-git-properties
-Dmaven
.test.skip
||
die
"fail to build jar!"
}
mvnCompileTest
()
{
runCmd
./mvnw
test-compile
||
die
"fail to mvn test-compile!"
runCmd
"
${
MVN_CMD
[@]
}
"
test-compile
||
die
"fail to mvn test-compile!"
}
readonly
dependencies_dir
=
"target/dependency"
mvnCopyDependencies
()
{
runCmd
./mvnw
dependency:copy-dependencies
-DincludeScope
=
test
||
die
"fail to mvn copy-dependencies!"
runCmd
"
${
MVN_CMD
[@]
}
"
dependency:copy-dependencies
-DincludeScope
=
test
||
die
"fail to mvn copy-dependencies!"
# remove repackaged and shaded javassist lib
rm
$dependencies_dir
/javassist-
*
...
...
@@ -147,8 +150,6 @@ getClasspath() {
# maven actions
#################################################################################
runCmd ./mvnw
--version
if
[
"
$1
"
!=
"skipClean"
]
;
then
mvnClean
fi
scripts/integration-test.sh
浏览文件 @
a7489163
...
...
@@ -13,7 +13,7 @@ source ./common.sh skipClean
if
[
-n
"
$JAVA10_HOME
"
]
;
then
export
JAVA_HOME
=
"
${
JAVA10_HOME
}
"
else
current_java_version
=
$(
./mvnw
-v
|
awk
-F
'[ ,]'
'/^Java version/{print $3}'
)
current_java_version
=
$(
"
${
MVN_CMD
[@]
}
"
-v
|
awk
-F
'[ ,]'
'/^Java version/{print $3}'
)
if
[[
default_java_version
!=
10.
*
]]
;
then
echo
"Fail to get java 10 home!"
exit
1
...
...
@@ -21,7 +21,7 @@ else
fi
headInfo
"test with Java 10"
runCmd
./mvnw
clean
install
--batch-mode
runCmd
"
${
MVN_CMD
[@]
}
"
clean
install
--batch-mode
runCmd ./scripts/run-agent-test.sh
# Java 6
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录