maven打包笔记汇总

1.pom文件



	4.0.0

	

	com.spring
	spring-maven-test
	3.0
	jar
	spring-maven-test
	Demo project for Spring Boot

	
		com.spring
		maven-test
		1.0.0.RELEASE
	


	
		UTF-8
		UTF-8
		1.8
	

	
		
	


	
		
		

			
			

			
				org.apache.maven.plugins
				maven-compiler-plugin
				3.1
				
					
					
					1.8
					1.8
					UTF-8
				
			

			
			

			
				org.apache.maven.plugins
				maven-assembly-plugin
				
					
						allen-assembly
						
						package
						
							
							single
						
					
				
				
					
					false
					
						package/assembly.xml
					
					${project.build.directory}
					
                    
				
			

		
	

2.自定义打包文件


    spring-assembly

    
        tar.gz
    

    true

    
        
            package/bin
            
                *.sh
            
            bin
            0755
        
        
            src/main/conf
            conf
        
        
            package/sql
            
                *.sql
            
            sql
        
        
            target/classes/
            
                *.properties
                *.xml
                *.txt
            
            conf
        
    

    
        
            target/${project.artifactId}-${project.version}.jar
            .
        
    

    
        
            false
            runtime
            lib
        
    

3.参考网址

Maven3种打包方式之一maven-assembly-plugin的使用

Maven build之pom.xml文件中的Build配置

 

你可能感兴趣的:(maven)