maven的pom文件

 pom.xml打jar包时加入依赖的包:


  4.0.0

  com.scenery
  DataService
  1.0
  jar

  DataService
  http://maven.apache.org

  
    UTF-8
  
  

    
        central
        http://repo.corp/artifactory/repo
        
            false
        
    

    
  
    
      junit
      junit
      3.8.1
      test
    
    
		jdom
		jdom
		1.1
	
	
		mysql
		mysql-connector-java
		5.1.13
		runtime
	
  
  
 
    
      
        
        maven-assembly-plugin
        2.4
        
          
            jar-with-dependencies
          
        
		
	

 

maven命令:

1. mvn clean install

2. mvn assembly:assembly

即可生成包含依赖jar的jar包。

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