Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
398537dc
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dbeaver
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
398537dc
编写于
10月 13, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
POM imports
Former-commit-id:
37f20e35
上级
e04f6e7d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
54 addition
and
12 deletion
+54
-12
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/driver/DriverDependencies.java
...org/jkiss/dbeaver/registry/driver/DriverDependencies.java
+1
-6
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/maven/MavenArtifactVersion.java
...rg/jkiss/dbeaver/registry/maven/MavenArtifactVersion.java
+52
-5
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/maven/MavenRepository.java
...src/org/jkiss/dbeaver/registry/maven/MavenRepository.java
+1
-1
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/driver/DriverDependencies.java
浏览文件 @
398537dc
...
...
@@ -53,7 +53,6 @@ public class DriverDependencies implements DBPDriverDependencies
libraryList
.
addAll
(
libMap
.
values
());
/*
{
StringBuilder sb = new StringBuilder();
Set<String> ns = new TreeSet<>();
for (String lib : libMap.keySet()) {
...
...
@@ -67,20 +66,17 @@ public class DriverDependencies implements DBPDriverDependencies
sb.append(lib).append("\n");
}
System.out.println(sb.toString());
*/
System
.
out
.
println
(
"---------------------------"
);
for
(
DependencyNode
node
:
rootNodes
)
{
dumpNode
(
node
,
0
);
}
}
*/
}
}
catch
(
IOException
e
)
{
throw
new
DBException
(
"IO error while resolving dependencies"
,
e
);
}
}
/*
private
void
dumpNode
(
DependencyNode
node
,
int
level
)
{
if
(
node
.
duplicate
)
{
return
;
...
...
@@ -91,7 +87,6 @@ public class DriverDependencies implements DBPDriverDependencies
dumpNode
(
child
,
level
+
1
);
}
}
*/
private
void
resolveDependencies
(
DBRProgressMonitor
monitor
,
DependencyNode
ownerNode
,
Map
<
String
,
DBPDriverLibrary
>
libMap
)
throws
IOException
{
Collection
<?
extends
DBPDriverLibrary
>
dependencies
=
ownerNode
.
library
.
getDependencies
(
monitor
);
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/maven/MavenArtifactVersion.java
浏览文件 @
398537dc
...
...
@@ -53,6 +53,7 @@ public class MavenArtifactVersion {
private
String
description
;
private
String
url
;
private
MavenArtifactVersion
parent
;
private
List
<
MavenArtifactVersion
>
imports
;
private
final
List
<
MavenArtifactLicense
>
licenses
=
new
ArrayList
<>();
private
final
List
<
MavenProfile
>
profiles
=
new
ArrayList
<>();
...
...
@@ -259,16 +260,33 @@ public class MavenArtifactVersion {
// Activation
Element
activationElement
=
XMLUtils
.
getChildElement
(
element
,
"activation"
);
if
(
activationElement
!=
null
)
{
String
activeByDefault
=
XMLUtils
.
getChildElementBody
(
e
lement
,
"activeByDefault"
);
String
activeByDefault
=
XMLUtils
.
getChildElementBody
(
activationE
lement
,
"activeByDefault"
);
if
(!
CommonUtils
.
isEmpty
(
activeByDefault
))
{
profile
.
active
=
CommonUtils
.
getBoolean
(
activeByDefault
);
}
String
jdk
=
XMLUtils
.
getChildElementBody
(
e
lement
,
"jdk"
);
String
jdk
=
XMLUtils
.
getChildElementBody
(
activationE
lement
,
"jdk"
);
if
(!
CommonUtils
.
isEmpty
(
jdk
))
{
profile
.
active
=
MavenArtifact
.
versionMatches
(
System
.
getProperty
(
"java.version"
),
jdk
);
}
Element
osElement
=
XMLUtils
.
getChildElement
(
activationElement
,
"os"
);
if
(
osElement
!=
null
)
{
}
Element
propElement
=
XMLUtils
.
getChildElement
(
activationElement
,
"property"
);
if
(
propElement
!=
null
)
{
String
propName
=
XMLUtils
.
getChildElementBody
(
propElement
,
"name"
);
String
propValue
=
XMLUtils
.
getChildElementBody
(
propElement
,
"value"
);
// TODO: implement real properties checks. Now enable all profiles with !prop
if
(
propName
!=
null
&&
propName
.
startsWith
(
"!"
))
{
profile
.
active
=
true
;
}
}
}
}
if
(!
profile
.
active
)
{
// Do not parse dependencies of non-active profiles (most likely they will fail).
return
;
}
{
// Properties
Element
propsElement
=
XMLUtils
.
getChildElement
(
element
,
"properties"
);
...
...
@@ -323,9 +341,29 @@ public class MavenArtifactVersion {
}
boolean
optional
=
CommonUtils
.
getBoolean
(
XMLUtils
.
getChildElementBody
(
dep
,
"optional"
),
false
);
// TODO: maybe we should include some of them
if
(
depManagement
||
(!
optional
&&
includesScope
(
scope
)))
{
String
version
=
evaluateString
(
XMLUtils
.
getChildElementBody
(
dep
,
"version"
));
String
version
=
evaluateString
(
XMLUtils
.
getChildElementBody
(
dep
,
"version"
));
if
(
depManagement
&&
scope
==
MavenArtifactDependency
.
Scope
.
IMPORT
)
{
// Import another pom
if
(
version
==
null
)
{
log
.
error
(
"Missing imported artifact ["
+
groupId
+
":"
+
artifactId
+
"] version. Skip."
);
continue
;
}
MavenArtifactReference
importReference
=
new
MavenArtifactReference
(
groupId
,
artifactId
,
version
);
MavenArtifactVersion
importedVersion
=
MavenRegistry
.
getInstance
().
findArtifact
(
monitor
,
importReference
);
if
(
importedVersion
==
null
)
{
log
.
error
(
"Imported artifact ["
+
importReference
+
"] not found. Skip."
);
}
if
(
imports
==
null
)
{
imports
=
new
ArrayList
<>();
}
imports
.
add
(
importedVersion
);
}
else
if
(
depManagement
||
(!
optional
&&
includesScope
(
scope
)))
{
// TODO: maybe we should include optional or PROVIDED
if
(
version
==
null
)
{
version
=
findDependencyVersion
(
monitor
,
groupId
,
artifactId
);
}
...
...
@@ -380,6 +418,15 @@ public class MavenArtifactVersion {
}
}
}
// Check in imported BOMs
if
(
imports
!=
null
)
{
for
(
MavenArtifactVersion
i
:
imports
)
{
String
dependencyVersion
=
i
.
findDependencyVersion
(
monitor
,
groupId
,
artifactId
);
if
(
dependencyVersion
!=
null
)
{
return
dependencyVersion
;
}
}
}
return
parent
==
null
?
null
:
parent
.
findDependencyVersion
(
monitor
,
groupId
,
artifactId
);
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/maven/MavenRepository.java
浏览文件 @
398537dc
...
...
@@ -127,7 +127,7 @@ public class MavenRepository
}
return
version
;
}
catch
(
IOException
e
)
{
log
.
debug
(
"Artifact version "
+
ref
+
" not found
"
,
e
);
log
.
debug
(
"Artifact version "
+
ref
+
" not found
: "
+
e
.
getMessage
()
);
return
null
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录