简体   繁体   English

如何在Maven应用程序中包含非Maven Netbeans模块?

[英]How to include non-maven Netbeans modules in Maven application?

I found the opposite version of this question here: How to include maven-based project into my non-maven project but didn't give me any light on the issue. 我在这里发现了与该问题相反的版本: 如何将基于Maven的项目包含到我的非Maven项目中,但是却没有给我任何启示。

I know the long road to do this: 我知道要这样做的路很长:

  1. Mavenize the module in question. 修改有问题的模块。
  2. Add as a dependency. 添加为依赖项。

But this only works if: 但这仅在以下情况下有效:

  1. You have access to the source of the original module. 您可以访问原始模块的源。
  2. The project is well structured as this would complicate mavenizitation. 该项目的结构合理,因为这会使通勤变得复杂。

All this seems unnecessary, there should be a better way. 所有这些似乎都是不必要的,应该有一个更好的方法。 Any idea? 任何想法?

if you have an ant-based module you want to consume in your maven based platform, you will need these artifacts. 如果您有要在基于Maven的平台中使用的基于ant的模块,则将需要这些工件。

  • module .jar file 模块.jar文件
  • module's .nbm file 模块的.nbm文件

without these, you are out of luck. 没有这些,您将失去运气。

If you have them, create a basic pom file, invent the Maven GAV for the module and use mvn install:install-file or mvn deploy:deploy file to upload the pom, jar and nbm file to a place where it can be consumed by the maven build. 如果有它们,请创建一个基本的pom文件,为该模块创建Maven GAV,然后使用mvn install:install-file或mvn deploy:deploy文件将pom,jar和nbm文件上载到可以使用该文件的位置Maven构建。

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

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