This section describes the dependency scope of Maven:
In the scope of the Pom. xml dependency label. In eclipse, there are compiling paths, Maven paths for compiling, running, and testing.
1. Scope is test, which is the test path. Most of them are JUnit jar packages.
2. the scope is compile, which is the default level and is effective during compilation and testing.
3. scope is provided, which is valid during compilation and testing.
4. the scope is runtime, which is effective during running and testing (for example, implementation of the JDBC driver)
5. the scope is system, which is consistent with compile, but has poor portability capability. The referenced java_home (environment variable) cannot work normally after the computer is changed.
6. scope is import. It is only used in dependencymanager to import the dependency configuration from other pom.
What you understand:
Maven compilation requires a jar package, a jar package for running, and a jar package for testing.
Scope is test:
<Dependency> <groupid> JUnit </groupid> <! -- Here is the package name --> <artifactid> JUnit </artifactid> <! -- Here is the project name --> <version> 4.1.0 </version> <! -- Maven version --> <scope> test </scope> </dependency>
Scope is import:
<dependency> <groupId>maven</groupId> <artifactId>A</artifactId> <version>1.0</version> <type>pom</type> <scope>import</scope> </dependency>
Introduction to the dependency mechanism on the official Maven Website:
Http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
Maven course project management tool-Maven 3-7 Maven dependency range: 2 stars