为什么我的Maven插件描述符没有自动生成? [英] why is my maven plugin descriptor not being generated automatically?

查看:102
本文介绍了为什么我的Maven插件描述符没有自动生成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经编写了自己的插件项目,并通过cygwin为插件项目运行了命令mvn -install. 它的jar文件正在我的存储库中创建,但是当我执行插件时,它说我的插件描述符不存在.我检查了我创建的jar文件,实际上并没有在其中自动创建它.

I have wrote my own plugin project and have run the command mvn -install through cygwin for my plugin project. the jar file for it is being created in my repository, however when I execute my plugin, it says that my plugin descriptor is not present. I checked my jar file which was created and indeed it is not automatically created inside there.

我尝试复制示例plugin.xml,并将其包含到我的jar文件中,并且可以正常工作.我想知道是否有人知道为什么我的插件描述符不是自动创建的吗?

I tried copying a sample plugin.xml and included it into my jar file and it worked. I would like to know if anyone knows why my plugin descriptor isn't created automatically?

推荐答案

我总是想念这个,但是当您在netbeans(和其他实例)中创建项目时,包装类型默认为"jar",因此您必须记住要进行更改在您的pom.xml中将其保存为:

I always miss this but the packaging type is by default "jar" when you create the project in netbeans (and other ides), you have to remember to change it in your pom.xml to:

  <packaging>maven-plugin</packaging>

默认情况下:

  <packaging>jar</packaging>

这篇关于为什么我的Maven插件描述符没有自动生成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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