查找损坏Jar

find  ~/.m2/repository/ -name "*jar" | xargs -L 1 zip -T | grep error | grep invalid

Maven plugin备忘



	org.apache.maven.plugins
	maven-jar-plugin
	
		1.8
		1.8
		
			
				com.cetc.di.hellocetc.App
				true
				lib/
			
		
		
		
	




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




	org.apache.maven.plugins
	maven-shade-plugin
	3.1.1
	
		
			package
			
				shade
			
			
				true
				exe 
			
		
	





	org.apache.maven.plugins
	maven-assembly-plugin
	2.4.1
	
		
			jar-with-dependencies
		
	
	
		
			make-assembly
			package
			
				single
			
		
	

Maven将test类打入jar包



	org.apache.maven.plugins
	maven-assembly-plugin
	2.4.1
	
		src/main/java/assembly/assembly.xml
		
	
	
		
			make-assembly
			package
			
				single
			
		
	




	fat-tests
	
		jar
	
	false
	
		
			/
			true
			true
			test
		
	
	
		
			${project.build.directory}/test-classes
			/
			
				**/*.class
			
			true
		
	

向仓库中发布Jar包

mvn deploy:deploy-file -DgroupId=[GroupID] -DartifactId=[ArtifactID] -Dversion=[Jar Version] -Dpackaging=jar -Dfile=[Local Jar path]  -DrepositoryId=[Repository ID, define in POM] -Durl=[Remote Repository URL] -s [default setting.xml or special one]

Maven依赖冲突相关

### 查看依赖树
mvn dependency:tree [-Dverbose -D...]

## 查看有效pom
mvn help:effiective-pom