Chapter One: Maven Introduction
No one will contradict excellent technology, unless the lack of documentation, the high cost of learning.
Construction (Build) : including compiled, unit testing, document generation, packaging, deployment.
Maven is a build tool, dependency management tools, project information management tools.
Make and Ant is procedural in, Maven are declarative; Make not easy to achieve cross-platform build, Ant is not dependent on management.
Chapter II: Maven installation and configuration
Chapter III: Maven Getting Started
Chapter 4: Case background
Chapter V: coordinates and dependency
Chapter 6: warehouse
Chapter 7: Life Cycle and plug-ins
Chapter 8: Aggregation and inheritance
Chapter 9: Creating PW using Nexus
Chapter X: Using Maven test
Skip, learning little significance, too high for small companies time cost, as test yourself directly in accordance with the test case documentation, large companies have a separate test environment and test team after the self-test to test.
Chapter 11: Use Hudson continuous succession
Continuous integration (the Continuous Integration) : fast and high frequencies to automatically build all source project, and provides a wealth of project members feedback information.
Continued integration example :
Integrated steps :
- continued compilation. And version control systems (such as Git) integration, triggered automatically compiled.
- Continuous Database Integration
- Continuous testing
- ongoing review. Inspection system integrated with the code.
- Continuous Deployment
- continuous feedback
Integrated Benefits : expose problems early, reduce duplication of operations, simplify project release, team information.
Chapter XII: Use Maven to build Web applications
Skip, and mainstream Spring Boot project skeleton out of line too much.
Chapter XIII: Version Management
jump over.
Chapter XIV: flexible building
Maven properties : built-in properties, POM properties, custom properties, Settings Properties, Java system properties, environment variables familiar.
Custom attributes Maven : variable is defined in <properties> tag, and then by {} $ call.
Example of use : the abstracted version of Spring unified management; Project Cohesion neutron module directly call the Father groupId and version.
profile example (configuration database development environment) (writable in POM, Settings):
<profiles>
<profile>
<id>dev</id>
<properties>
<db.driver>com.mysql.jdbc.Driver</db.driver>
<db.url>jdbc:mysql://localhost:3306/test</db.url>
<db.username>dev-username</db.username>
<db.password>dev-password</db.password>
</properties>
</profile>
</profiles>
Activating Profile :
- Command line activation. At the command line at the end plus -Pdev.
- Settings files are displayed activated.
<settings>
<activeProfiles>
<activeProfile>dev</activeProfile>
</activeProfiles>
</settings>
- System Properties activation. In essence and activate the same command line.
- activate the operating system environment. (This method should be the most commonly used, OS servers and development machines are generally not the same)
<profiles>
<profile>
<activation>
<os>
<name>Windows XP</name>
<family>Windows</family>
<arch>x86</arch>
<version>5.1.2600</version>
</os>
</activation>
</profile>
</profiles>
- the file exists or not activated. And similar to the above, arranged in <activation> tag <file> tags, <file> tag arranged <missing> tags or <exists> tag.
- enabled by default. And similar to the above, the <activation> tag arranged <activeByDefault> tag, and the value is true.
Command Line View : to view all active profile and the profile active-profiles: by $ mvn help: all-profiles and $ mvn help.
Chapter XV: Build the project site
Skip function in general, less than.
Chapter XVI: m2eclipse
Skip, the current mainstream with IDEA.
Chapter XVII: Writing Maven plugins
Skip to write plug-ins predecessors to meet the needs of almost 100% of the business, do not repeat create the wheel.
Chapter XVIII: Archetype
Skip, do not create something new skeleton project, in accordance with the specifications, reduce staff learning costs.