How to exclude all dependencies of a dependency in maven

If you are using some library but want to exclude all the dependencies that this library may bring in with itself. Maven provides an easy way to exclude all the libraries.

<dependency>
			<groupId>com.mine.group</groupId>
			<artifactId>com.mine.group.project</artifactId>
			<exclusions>
				<exclusion>  <!-- declare the exclusion here -->
					<groupId>*</groupId>
					<artifactId>*</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		

Leave a Comment