What is the difference between the maven scope compile
and provided
when artifact is built as a JAR? If it was WAR, I'd understand – the artifact would be included or not in WEB-INF/lib. But in case of a JAR it doesn't matter – dependencies aren't included. They have to be on classpath when their scope is compile
or provided
. I know that provided
dependencies aren't transitive – but is it only one difference?
Maven – Difference between maven scope compile and provided for JAR packaging
jarmaven
Related Topic
- Java – Dealing with “Xerces hell” in Java/Maven
- Java – the difference between “pom” type dependency with scope “import” and without “import”
- Java – the maven-shade-plugin used for, and why would you want to relocate Java packages
- Maven – Correct way to declare multiple scope for Maven dependency
- Java – How to include system dependencies in war built using maven
- Java – Exiting a loop in Java
- Maven scope provided and transitive dependencies
Best Answer
From the Maven Doc:
Recap: