Difference between maven scope compile and provided for JAR packaging

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?

6 Answers
6

Leave a Comment