在NetBeans中将外部JAR添加到Maven项目

编程入门 行业动态 更新时间:2024-10-11 03:25:56
本文介绍了在NetBeans中将外部JAR添加到Maven项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我右键单击我的Maven项目并选择添加依赖项选项并在查询中键入我的外部jar名称时,找不到它。如何将外部jar添加到Maven项目?

When I right click on my Maven project and choose the Add dependency option and I type my external jar's name in query, it is not found. How to add external jar to a Maven project?

推荐答案

您可以按照本教程: maven.apache/guides/mini/guide-3rd- party-jars-local.html

示例:

将jar安装到您当地的maven repository:

Install the jar to your local maven repository:

mvn install:install-file -Dfile=cxf-2.7.3.jar -DgroupId=org.apache.cxf -DartifactId=cxf-bundle -Dversion=2.7.3 -Dpackaging=jar

编辑pom.xml项目中的文件包含新添加的依赖项:

Edit the pom.xml file in your project to include the newly added dependency:

<dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-bundle</artifactId> <version>2.7.3</version> </dependency>

无论您使用何种IDE,这都应该有效。

This should work regardless of the IDE you are using.

更多推荐

在NetBeans中将外部JAR添加到Maven项目

本文发布于:2023-11-12 11:18:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1581348.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中将   项目   NetBeans   Maven   JAR

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!