1

I am including few jars in DependencySet include section

<includes>
    <include>dom4j:dom4j:jar</include>
    <include>log4j:log4j:jar</include>
</includes>

However I am getting dom4j-1.5.jar and log4j-1.2.jar. Since there are many other versions in repo, I would like to pull specific version for my application. [dom4j-1.6.1.jar and log4j-1.2.5.jar]

How do I force maven to pickup specific version in Assembly.xml?

Michael
  • 57,169
  • 9
  • 80
  • 125
RaceBase
  • 18,428
  • 47
  • 141
  • 202

1 Answers1

3

Try the includes in the following format:

(groupId:artifactId:type:[classifier:]version)

Alternatively, fix you dependencies. You can do this by adding an explicit dependency to the version of the dependency you would like to use in the pom.xml you're using to invoke the assembly plugin from.

carlspring
  • 31,231
  • 29
  • 115
  • 197
  • My requirement was to have two versions being used in same multi module project and the solutions here did not work. What helped me was https://stackoverflow.com/questions/4312553/maven-assembly-add-different-version-of-the-same-artifact – Pavan Kumar Feb 16 '18 at 04:59