maven分开打包jar文件和依赖jar包和资源文件

 
    


  UTF-8
  UTF-8
  1.8


<
build> <plugins> <plugin> <groupId>org.apache.maven.pluginsgroupId> <artifactId>maven-resources-pluginartifactId> <configuration> <encoding>UTF-8encoding> configuration> <executions> <execution> <id>copy-resourcesid> <phase>validatephase> <goals> <goal>copy-resourcesgoal> goals> <configuration> <outputDirectory>${project.build.directory}outputDirectory> <resources> <resource> <directory>src/main/resourcesdirectory> <filtering>truefiltering> resource> resources> configuration> execution> executions> plugin> <plugin> <groupId>org.apache.maven.pluginsgroupId> <artifactId>maven-jar-pluginartifactId> <configuration> <archive> <manifest> <addClasspath>trueaddClasspath> <classpathPrefix>lib/classpathPrefix> <mainClass>com.xxx.xxxxx.xxxxmainClass> <addDefaultImplementationEntries>trueaddDefaultImplementationEntries> <addDefaultSpecificationEntries>trueaddDefaultSpecificationEntries> manifest> <manifestEntries> <Permissions>${Permissions}Permissions> <Caller-Allowable-Codebase>${Caller-Allowable-Codebase}Caller-Allowable-Codebase> <Class-Path>./Class-Path> manifestEntries> archive> <excludes> <exclude>**/*.xmlexclude> <exclude>**/*.propertiesexclude> excludes> configuration> plugin> <plugin> <groupId>org.apache.maven.pluginsgroupId> <artifactId>maven-compiler-pluginartifactId> <version>2.3.2version> <configuration> <source>${java_source_version}source> <target>${java_target_version}target> <encoding>${file_encoding}encoding> <showDeprecation>trueshowDeprecation> <showWarnings>trueshowWarnings> configuration> plugin> <plugin> <groupId>org.apache.maven.pluginsgroupId> <artifactId>maven-dependency-pluginartifactId> <executions> <execution> <id>copy-dependenciesid> <phase>packagephase> <configuration> <overWriteReleases>falseoverWriteReleases> <overWriteSnapshots>falseoverWriteSnapshots> <overWriteIfNewer>trueoverWriteIfNewer> <outputDirectory> ${project.build.directory}/lib outputDirectory> configuration> <goals> <goal>copy-dependenciesgoal> goals> execution> executions> plugin> plugins> build>

 

转载于:https://www.cnblogs.com/shamo89/p/9713065.html

你可能感兴趣的:(maven分开打包jar文件和依赖jar包和资源文件)