在intellij中从maven项目创建一个jar [英] Creating a jar from a maven project in intellij

查看:129
本文介绍了在intellij中从maven项目创建一个jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IntelliJ中创建了一个新的maven项目并将包装设置为jar但是当我构建它时,目标文件夹不包含jar。我确信我的东西真的很蠢,但我在不同的网站上阅读的东西太多了,我觉得更好。

I created a new maven project in IntelliJ and set packaging to jar but when I build it, the target folder does not contain a jar. I'm sure its something really dumb on my part but there are just so many different things i'm reading on different websites and I just feel better asking.

推荐答案

你应该使用IDEA的 Maven Projects 视图构建你的项目。

You should build you project using IDEA's Maven Projects view.

查看 - >工具窗口 - > Maven项目

View -> Tool Windows -> Maven Projects

或从左下角菜单打开:

然后使用maven目标构建项目 - 即包:

And then build your project with maven goals - i.e. package:

如果包装设置为 jar pom.xml 中,你将获得一个目标的jar dir。

If packaging is set to jar in pom.xml, you will get a jar in target dir.

这篇关于在intellij中从maven项目创建一个jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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