简体   繁体   English

如何在pom.xml中声明jar文件?

[英]How to declare jar file in pom.xml?

What is the right declaration of local jar library in maven pom.xml? 什么是maven pom.xml中本地jar库的正确声明?

I need this to add bugsense-trace.jar that is not present in maven central. 我需要它来添加Maven Central中不存在的bugsense-trace.jar

Install it in the local repository (or just place it under com/foo/bar/0.1 in the local repository) and refer to it by that fqn. 将其安装在本地存储库中(或仅将其放在本地存储库中的com/foo/bar/0.1 )并由该fqn引用。

See this answer for more details. 有关更多详细信息,请参见此答案

You don't. 你不知道 There is a thing called 'system' scope, but it always causes more problems than it solves. 有一个叫做“系统”范围的东西,但是它总是引起更多的问题而不是解决的。

Use mvn install:install-file, or better yet install nexus or archiva and deploy it there. 使用mvn install:install-file,或者最好安装nexus或ar​​chiva并将其部署到那里。

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

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