maven打包方式

org.apache.maven.plugins类型的maven打包方法,
此类型的打包jar,对于spring项目是无法运行的


<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0modelVersion>

    <groupId>com.xxgroupId>
    <artifactId>xxartifactId>
    <version>1.0version>

    <properties>
        <maven.compiler.source>8maven.compiler.source>
        <maven.compiler.target>8maven.compiler.target>
        <target.dir>D:\target.dir>
    properties>
    
	<build>
	    <plugins>
	        
	        <plugin>
	            <groupId>org.apache.maven.pluginsgroupId>
	            <artifactId>maven-jar-pluginartifactId>
	            <configuration>
	            
	                <finalName>${artifactId}-${project.version}finalName>
	                
	                <outputDirectory>${target.dir}outputDirectory>
	                <excludes>
	                    <exclude>**/*.propertiesexclude>
	                    <exclude>**/*.xmlexclude>
	                    <exclude>**/*.ymlexclude>
	                    <exclude>static/**exclude>
	                    <exclude>templates/**exclude>
	                excludes>
	            configuration>
	        plugin>
	        
	        <plugin>
	            <groupId>org.apache.maven.pluginsgroupId>
	            <artifactId>maven-compiler-pluginartifactId>
	            <version>3.3version>
	            <configuration>
	                <source>8source>
	                <target>8target>
	            configuration>
	        plugin>
	    plugins>
	build>
project>

spring项目类型打包方式


你可能感兴趣的:(maven,java)