Tuesday, 10 March 2015

Create Deployment Jar with Maven

Create a single jar with all dependencies type "mvn assembly:assembly" from the command line.
Include following plugin in pom.xml
    
        
            
                maven-assembly-plugin
                
                    
                        src/assemble/distribution.xml
                    
                    
                        jar-with-dependencies
                    
                
            
        
    


Configuration details in descriptor file distribution.xml

    distribution
    
        jar
    
    
        
            
                README
                README.txt
                NOTICE
                NOTICE.txt
                LICENSE
                LICENSE.txt
                log4j.properties
            
        
    


Apache Maven Assembly Plugin

No comments: