Prev Next

DevOps / Maven Interview questions

What is the purpose of dependency-reduced-pom.xml generated by the shade plugin?

The dependency-reduced-pom.xml file is a temporary file automatically generated by the Apache Maven Shade Plugin when you package your project into an "uber-jar" or "fat-jar".

  • Removes bundled dependencies: When the plugin bundles third-party library classes directly inside your JAR, it strips those identical library declarations out of the section in this new XML file.
  • Prevents classpath conflicts: If another project imports your new shaded fat-jar, Maven reads the dependency-reduced-pom.xml instead of your original pom.xml. This prevents downstream projects from downloading those bundled libraries a second time.

More Related questions...

What are the minimum requirements for a POM? What is Apache Maven? How do you rename a maven project? Explain dependency:copy-dependencies goal. maven repository central. Maven artifact. Build phases in Maven. MOJO. Explain the highlevel directory structure of a maven project. What jar:jar goal does? Types of maven repository. Can we use different name for POM.xml? How do I skip the tests? How can I run a single unit test? Maven plugin. POM. Different types of dependency scope. What makes a fully qualified name for the artifact? what uniquely identifies an artifact? Maven Repository. Why Maven is used? Where do we find .class files of a Maven project? Super POM. Transitive Dependency. What is Maven's order of inheritance? How do I find the Installed maven Version? Difference between compile and install. Find details on the dependencies for the project. What is a Maven project's fully qualified artifact name? Order by which Maven searches for the dependency. groupId. artifactId. Maven snapshot. Explain the difference phases in Maven build Lifecycle. How do I specify packaging/distributable format in Maven? How Maven searches for dependency JAR? Explain how Maven uses Convention over Configuration? How to run unit tests using Maven? How do I run a Single Test using Maven? How to run a single test method using maven. Difference between Gradle and Maven. How do I install a 3rd party jar into the Maven repository? Explain the advantages of using Maven. Drawbacks of using Maven. What is a Maven BOM file? What is the purpose of dependency-reduced-pom.xml generated by the shade plugin?
Show more question and Answers...


Comments & Discussions