Netbeans:pom 类型的 maven 依赖项 [英] Netbeans: maven dependencies of type pom

查看:30
本文介绍了Netbeans:pom 类型的 maven 依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经花了很多时间,但我的头已经炸了,所以我将非常感谢您的帮助.

I've spent a lot of time and my head is blowing up already so I'll be very thankful for any help.

我正在将 Netbeans 平台应用程序从 ant 迁移到 maven,因此我将版本控制存储库中的所有 jar 更改为 maven 依赖项.我在主 maven repo 中找到了需要的工件,我在 Netbeans 的帮助下将其添加为依赖项,但它的类型为 POM 并放置在 Non-classpath Dependencies,我不知道如何使用它,因为它没有添加到类路径等中......

I'm migrating Netbeans Platform application from ant to maven, and so I'm changing all the jars in my version control repo to maven dependencies. I've found needed artifact in main maven repo and I've added it as a dependency with a help of Netbeans, but it's of type POM and was placed in Non-classpath Dependencies and I have no idea how to use it as it wasn't added to classpath etc…

谁能解释一下这些 POM 依赖项是什么以及如何使用它们?

Can someone explain what are these POM dependencies and how to use them?

提前谢谢你!!

这里是pom.xml

<dependency>
    <groupId>com.kitfox.svg</groupId>
    <artifactId>svg-salamander</artifactId>
    <version>1.0</version>
    <type>pom</type>
</dependency>

推荐答案

就个人而言,我想不出任何需要添加 pom 类型依赖项的情况.我通常对项目中的父模块使用 pom 打包(指定常见的项目配置,如插件版本、常见依赖项,如 log4j,例如,存储库、属性等)并用于实用程序包模块(组装项目并执行其他一些必要操作的模块).

Personally I cannot think of any case when one would need to add pom type dependency. I usually use pom packaging for parent module in a project (specify common project configuration like plugin versions, common dependencies, like log4j for example, repositories, properties etc.) and for utility package module (the one that assembles the project and does some other necessary things).

从我的经验来看(我做过几次),在将项目从 ant 迁移到 maven 时,您应该将项目过去依赖的所有 jar 文件转换为 maven 依赖项(groupId:artifactId:版本).很可能所有这些依赖项都没有任何 (例如 jars).

Judging from my experience (I did it several times), when migrating project from ant to maven you should take all the jar files that your project used to depend on and convert them into maven dependencies (groupId:artifactId:version). Most probably all of these dependencies will not have any <type> (e.g. be jars).

这篇关于Netbeans:pom 类型的 maven 依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆