1.利用maven-jar-plugin
org.apache.maven.plugins maven-jar-plugin 2.4 false true lib/ dbRobot.BeanRobot ${project.basedir}/xml/* org.apache.maven.plugins maven-assembly-plugin 2.4 src/main/assembly/package.xml make-assembly package single
再来看package.xml的配置
bin zip false lib false ${project.basedir} / README* LICENSE* NOTICE* ${project.basedir}\src\main\config config *.xml *.properties ${project.build.scriptSourceDirectory} startup.* ${project.build.scriptSourceDirectory} startup.* ${project.build.directory} *.jar
2.利用maven-shade-plugin
org.apache.maven.plugins maven-shade-plugin 1.4 package shade *:* META-INF/*.SF META-INF/*.DSA META-INF/*.RSA jdbc.properties module.config.properties com.xxx.Server META-INF/spring.handlers META-INF/spring.schemas META-INF/cxf/bus-extensions.txt