Java Interview 11| Maven and Git

Source: Internet
Author: User

Git commands must be mastered, if learning can be consulted: Liaoche's official website

Git Learning: Http://learngitbranching.js.org/?demo

1. Maven Lifecycle and MAVEN multi-project aggregation and inheritance

The life cycle of Maven is divided into 9 stages as follows.

(1) Clean cleanup automatically generated files, which is the target directory

(2) Validate Verify that MAVEN profile is valid

(3) Compile compiling Java code

(4) test run testing code

(5) Package project into War pack

(6) Verify Verify that the component package is valid

(7) Install installs the component package to the local warehouse

(8) Site Build project sites

(9) Deploy a component package to a remote repository

MAVEN's aggregation feature (aggregation) enables multiple modules of a project to be built together , while the inheritance feature (inheritance) helps to extract the same dependencies, plug-ins, and other configurations as the modules While simplifying the configuration of the modules, keep the modules consistent.

pomImplement module aggregation by declaring any number in a MAVEN project that is packaged in a way module .

In object-oriented, reuse can be implemented through class inheritance. The parent- child structure of the Pom can also be created in Maven by declaring some configuration in the parent pom for the child Pom inheritance to achieve reuse and de-duplication.

Reference blog:

(1) http://blog.csdn.net/zjf280441589/article/details/53044308

2. How to resolve the dependency conflict of Maven?

3. The difference between merge and rebase

Reference:

(1) Git merge and git rebase summary http://blog.csdn.net/wh_19910525/article/details/7554489

(2) https://github.com/geeeeeeeeek/git-recipes/wiki/5.1-%E4%BB%A3%E7%A0%81%E5%90%88%E5%B9%B6%EF%BC%9AMerge%E3% 80%81rebase%e7%9a%84%e9%80%89%e6%8b%a9

4, how to use Git to do code review?

5. Git-generated conflict solution
git checkout mybranchgit branch--set-upstream-to=origin/mybranchgit fetch  remote host

Git discards local modifications, forcing updates:

git fetch--allgit Reset--hard origin/master
Git discards local modifications
Git checkout. #本地所有修改的. None of the commits are returned to the original state of Git stash #把所有没有提交的修改暂存到stash里面. Git stash pop reply available. git reset--hard HASH #返回到某个节点, does not retain the modification. git reset--soft HASH #返回到某个节点. Keep changes

  



Java Interview 11| Maven and Git

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.