Saturday, October 6, 2012

Maven Tips

  • When we include a jar dependency in pom.xml. That jar may intern depend on other jars and maven resolve it and loads all jars whether those are directly indicated as dependent jars or indirectly within dependent jars. Now if we have some latest version or any other reason and want to exclude a particular jar to be included as dependent then maven provides "exclusions" element tag. Its sample usage is given below:

In above example, exclusions tag used to exclude antlr jar file to be included as dependent jar for hibernate


No comments: