Maven pom.xml role in the scope of

 

pom.xml configuration file,

<scope>, it took effect and it is mainly dependent on the management of <dependency> of. Currently <scope> You can use five values:
* the compile, the default values for all stages, will be released along with the project.
* Provided, similar to compile, expectations JDK, container, or the user may provide this dependency. As servlet.jar.
* Runtime, only at runtime, such as JDBC driver for running and testing phase.
* Test, the test is only used when, for compiling and running the test code. It will not be published with the project.
* System, similar to the provided, required to provide explicit dependence comprising jar, Maven does not find it in the Repository.

 

Which, scope is test, the eclipse and the idea of ​​a little difference:

In the eclipse, no matter under which path can be used @Test such as annotations,

But in the idea, you can only use @Test and other annotations in java class src / test / java / under, if used in src / main / java / in, you will not find these notes.

 

Guess you like

Origin www.cnblogs.com/mediocreWorld/p/11845694.html