开发者

Is there any way to exclude the classpath entry while mentioning dependency in maven?

Is there any way to exclude the classpath entry while mentioning dependency in 开发者_开发问答maven?

I want to exclude the MANIFEST.MF file entry for the particular Maven Dependency. Dependency jar should be present in the WEB-INF/lib path. But It should not make entry to the MANIFEST.MF file.

Is it possible?


If there is a built-in way to do this, it would probably be by editing the dependency's <scope> in the pom. This resource may be helpful:

http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope

Perhaps <scope>runtime</scope> will do what you want. If not then I think the next best option would be to set <scope>provided</scope> and then use the resources plugin to manually copy your dependency JAR file to the desired location as part of your build.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜