Export generated class files and resources 表示只导出生成的.class文件和其他资源文件
Export all output folders for checked projects 表示导出选中项目的所有文件夹
Export java source file and resouces 表示导出的jar包中将包含你的源代码*.java,不想泄漏源代码,那么就不要选这项了
Export refactorings for checked projects 把一些重构的信息文件也包含进去
Generate the manifest file:是系统帮我们自动生成MANIFEST.MF文件,如果你的项目没有引用其他class-path,那可以选择这一项。
Use existing mainfest from workspace:这是可以选择我们自定义的.MF文件,格式如上所写,引用了第三方包时选用。
Seal content:要封装整个jar或者指定的包packet。
Main class:这里可以选择你的程序入口,将来打包出来的jar就是你这个入口类的执行结果。
package com.bug.test;
import org.junit.Test;
public class Main {
public static void main(String[] args) {
test();
}
@Test
public static void test() {
for(int i = 0; i < 10; i++) {
System.out.println(i);
}
}
}
pom.xml
4.0.0com.bug
Test
0.0.1-SNAPSHOTjunit
junit
RELEASE
maven-compiler-plugin
2.3.21.81.8
maven-assembly-plugin
jar-with-dependenciescom.bug.test.Mainmake-assemblypackagesingle