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

查看:348
本文介绍了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 Platform应用程序从ant迁移到maven,因此我将版本控制库中的所有jar都更改为maven依赖项.我已经在主Maven存储库中找到了所需的工件,并在Netbeans的帮助下将其添加为依赖项,但是它的类型为 POM ,并且放置在Non-classpath Dependencies中,我不知道该怎么做.使用它,因为它没有添加到classpath等中……

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:version).所有这些依赖项很可能都不会有任何<type>(例如,罐子).

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天全站免登陆