我有一个包含单个模块和一些依赖项的项目。我想在一个包含编译模块的单独目录中创建一个jar。另外,我想在模块旁边提供依赖项。
无论我如何扭曲IntelliJ的“构建jar”过程,模块的输出都将显示为空(除了META-INF文件之外)。
这是使用IntelliJ 10构建jar的方法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…
The above sets the “skeleton” to where the jar will be saved to. To actually build and save it do the following:
Extract to the target Jar
OK
Build | Build Artifact | Build
Try Extracting the .jar file from
ProjectName | out | artifacts | ProjectName_jar | ProjectName.jar