我的gradle项目使用该application插件来构建一个jar文件.作为运行时传递依赖的一部分,我最终会进入org.slf4j:slf4j-log4j12.(它被引用为至少5或6个其他传递依赖的子传递依赖 - 这个项目使用spring和hadoop,所以除了厨房水槽之外的所有东西都被拉进来......没等了......那也是:) ).
我想slf4j-log4j12从我的内置jar中全局排除jar.所以我试过这个:
configurations {
runtime.exclude group: "org.slf4j", name: "slf4j-log4j12"
}
Run Code Online (Sandbox Code Playgroud)
但是,这似乎排除了所有 org.slf4j工件,包括slf4j-api.在调试模式下运行时,我看到以下行:
org.slf4j#slf4j-api is excluded from com.pivotal.gfxd:gfxd-demo-mapreduce:1.0(runtime).
org.slf4j#slf4j-simple is excluded from com.pivotal.gfxd:gfxd-demo-mapreduce:1.0(runtime).
org.slf4j#slf4j-log4j12 is excluded from org.apache.hadoop:hadoop-common:2.2.0(runtime).
Run Code Online (Sandbox Code Playgroud)
我不想查找每个slf4j-log4j12传递依赖的源,然后compile foo { exclude slf4j... }在我的dependencies块中有单独的语句.
更新:
我也试过这个:
configurations {
runtime.exclude name: "slf4j-log4j12"
}
Run Code Online (Sandbox Code Playgroud)
最终排除了构建中的所有内容!好像我指定的那样group: "*".
更新2:
我正在使用Gradle版本1.10.
我正在使用Robot Framework自动检查表中的TD或TR的数量.
我正在使用来自Selenium的Get Matching XPath Count关键字,但是它总是失败并出现错误.
我的示例HTML结构:
<table id="myTable">
<tr>
<td style="width: 50%">my td</td>
<td style="width: 50%">my td</td>
</tr>
<tr>
<td style="width: 50%">my td</td>
<td style="width: 50%">my td</td>
</tr>
<tr>
<td style="width: 50%">my td</td>
<td style="width: 50%">my td</td>
</tr>
<tr>
<td>Search me</td>
<td>Pagination here</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
我在XPath中使用关键字:.// [@ id ='myTable']/tr /td/@ width
因为我只想用"宽度"属性计算td.
和错误:InvalidSelectorException:消息:u"无效的选择器:无法找到具有XPath表达式的元素...
有解决方案吗 谢谢