简体   繁体   English

如何在maven中使PROVIDED为POM类型依赖项

[英]How to make PROVIDED to POM type dependency in maven

I am using the below dependency in my pom file for resolving compilation error. 我在我的pom文件中使用以下依赖项来解决编译错误。 I have make its scope to provided but still the the related dependency jars are added while building the WAR file. 我已经提供了它的范围,但是在构建WAR文件时仍然添加了相关的依赖jar。 Kindly do help me about how to proceed on this. 请帮我讲解如何继续这项工作。

Thanks in advance! 提前致谢!

    <dependency>
        <groupId>groupId</groupId>
        <artifactId>artifactId</artifactId>
        <version>version</version>
        <type>pom</type>            
        <scope>provided</scope>
    </dependency>

you sure that the dependency with scope provided is not getting included as part of some other dependency ? 您确定提供范围的依赖性不会被包含在其他依赖项中吗? have you checked the dependency graph of your pom ? 你检查了你的pom的依赖图吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM