E-commerce website development note record (-) Project initialization

Create a new maven-achetype-webapp project, build the basic directory after completion , then configure tomcat, and introduce artifact in deployment. When it was built for the first time, it was found that there was no artifact. It may be that modules such as modules were not initialized well, nor were they at that time. Let's import changes of maven's dependencies. I don't know if the default webapp template will automatically introduce the initial dependencies. When I build it for the second time, I import changes, and then the deployment and artifact are successfully added , and then the tomcat is successfully started.

2. In order to better manage the project, use git, initialize it first, and create a .gitignore file first

.gitignore file content

 *.class

#package file

*.war
*.ear

#kdiff3 ignore
*.orig

#maven ignore
target/

#eclipse ignore
.settings/
.project
.classpatch

#idea
.idea/
/idea/
*.ipr
*.iml
*.iws

# temp file

*.log
*.cache
*.diff
*.patch
*.tmp

# system ignore
.DS_Store
Thumbs.db

After configuration, execute git init, check git status, and then add git add . to the file. When submitting to the local warehouse, git commit, and adding a remote warehouse: git remote add orgin {git address}, if it prompts that the remote warehouse already exists, use git remote rm origin delete the remote warehouse, and use git remote add orgin{git address} to create a remote warehouse, see: https://blog.csdn.net/top_code/article/details/50381432 After the establishment is complete, put the local warehouse Push the file to the remote warehouse, check the current local branch git branch, which is master, push to the remote branch, execute git push -u origin master, the first failure, use git pull according to the prompt to execute git push -u origin master, Still prompt failure, failure reason: , prompting that the current branch lags behind the remote branch, guess the reason why the current local branch is established after the remote branch, use forced push git push -u -f origin master, after the push is successful, create a new version branch

complete!

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325291885&siteId=291194637