我想从一个依赖项中排除所有传递依赖项.在某些地方,我看到它建议使用通配符
<dependency>
<groupId>myParentPackage</groupId>
<artifactId>myParentProject</artifactId>
<version>1.00.000</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
Run Code Online (Sandbox Code Playgroud)
当我这样做时,我收到警告:
'dependencies.dependency.exclusions.exclusion.groupId' for myParentPackage:myParentProject:jar with value '*' does not match a valid id pattern. @ line 146, column 30
Run Code Online (Sandbox Code Playgroud)
虽然声明本身是成功的:在我的构建中确实忽略了传递依赖.
我还发现了一个旧功能请求,确实要求此功能
所以现在我不知道这是否是我不应该使用的弃用功能,如果警告错误,或者功能还没有完全实现(我正在使用Maven 3.0.4)...有人知道更多吗?
我们最近切换到Glassfish 3.1.2.2并将几个Web应用程序打包为war文件.有时,这些应用程序的所需上下文根与文件名不同.
回到我们使用Weblogic时,我们通过在weblogic.xml中声明context-root来实现这一点
<context-root>path/to/our/App</context-root>
Run Code Online (Sandbox Code Playgroud)
我们注意到glassfish-web.xml中存在相同的Tag.但无论我们在那里定义什么,服务器总是将文件名确定为context-root.
现在我们在asadmin实用程序中找到了选项--contextroot,它允许我们在部署时覆盖文件名,但我们更愿意直接在存档本身中定义它,以便最终部署它的人不会需要知道所需的contex-root.
有没有办法实现这个目标?