如何正确构建IntelliJ的罐子? [英] How to build jars from IntelliJ properly?

查看:143
本文介绍了如何正确构建IntelliJ的罐子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含单个模块和一些依赖项的项目。
我想在一个单独的目录中创建一个包含已编译模块的jar。另外,我想在我的模块旁边有依赖项。

I have a project that contains a single module, and some dependencies. I'd like to create a jar, in a separate directory, that contains the compiled module. In addition, I'd like to have the dependencies present beside my module.

无论我如何扭曲IntelliJ的构建jar进程,我模块的输出都显示为空(除了META-INF文件)。

No matter how I twist IntelliJ's "build jar" process, the output of my module appears empty (besides a META-INF file).

推荐答案

以下是使用IntelliJ 10构建jar的方法 http://blogs.jetbrains.com/idea/2010/08/quickly-create-jar -artifact /

Here's how to build a jar with IntelliJ 10 http://blogs.jetbrains.com/idea/2010/08/quickly-create-jar-artifact/

文件 - >项目结构 - >项目设置 - >工件 - >单击绿色加号 - >罐子 - >来自具有依赖关系的模块。 ..

File -> Project Structure -> Project Settings -> Artifacts -> Click green plus sign -> Jar -> From modules with dependencies...

上面将骨架设置为jar将保存到的位置。要实际构建并保存它,请执行以下操作:

The above sets the "skeleton" to where the jar will be saved to. To actually build and save it do the following:

提取到目标Jar

确定

构建|构建工件

这篇关于如何正确构建IntelliJ的罐子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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