Home  >  Article  >  Java  >  Video courseware source code sharing for the automated build tool Maven in Java

Video courseware source code sharing for the automated build tool Maven in Java

黄舟
黄舟Original
2017-12-04 11:39:071606browse

"Silicon Valley Automated Build Tool Maven Video Tutorial" will help you understand the role of Maven, common commands, how to configure dependencies, as well as important concepts such as dependency scope, dependency transitivity, dependency exclusion, life cycle, and inheritance. , aggregate such Maven configuration. He will also teach you step by step how to play Maven in Eclipse.

Video courseware source code sharing for the automated build tool Maven in Java

Course playback address: http://www.php.cn/course/615.html

This video was created by Chuanzhi Podcast teacher Feng Jie. The teacher’s teaching style:

When explaining, analyzing, and demonstrating, the thinking is clear; when asking, discussing, and practicing , according to the actual situation of the students, taking into account the students' psychological characteristics and receptive abilities, reflecting the teacher's thorough understanding of the students, the reasonable use of teaching methods and the accurate grasp of the key points and difficulties of knowledge.

The more difficult part in this video is the dependency:

Maven needs to use a set of classpath when compiling the main code of the project. Secondly, another set of classpath will be used when compiling and executing tests. Finally, when actually running the Maven project, another set of classpath will be used.

The so-called dependency scope is used to control the relationship between dependencies and these three classpaths (compile, test, run). Maven has the following dependency scopes:

compile: Compile dependency scope. If not specified, this dependency scope is used by default. When using this dependency scope, it is valid for compilation, testing, and running. For example: spring-core, this dependency is required for compilation, testing, and runtime.

test: Test dependency scope. Only valid for test classpath. For example: JUnit, which is only needed when compiling test code and running tests. This dependency cannot be used when compiling and running classpath.

provided: The dependency scope has been provided. Valid for compilation and testing, but not for runtime. For example: servlet-api, this dependency is required when compiling and testing the project, but when running, since the container has been provided, Maven does not need to introduce it repeatedly.

runtime: runtime dependencies. Invalid when compiling, valid for testing and running. For example: JDBC driver implementation only requires the JDBC interface provided by the JDK when compiling, and the specific JDBC driver that implements the above interface is only needed when testing and running.

system: System dependency scope. Same as provided. When using this dependency, you must explicitly specify the dependency file path through the systemPath element. Mainly used to rely on local class library files outside the Maven repository.

Here we also recommend downloading source code resources: http://www.php.cn/xiazai/learn/2044

This courseware contains the code of the entire project

  1. Maven code

  2. Maven courseware

  3. Compression Package

  4. Shang Silicon Valley_Maven Notes

The above is the detailed content of Video courseware source code sharing for the automated build tool Maven in Java. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn