1. Modify the location of the maven local warehouse
No effect, still jump to the default configuration when creating a new project
Add the modified setting file in the default warehouse location, failed
The modification is successful, the reason is that the previous modification is the setting and we need to modify the default setting/
2. Problem After modifying the local warehouse, the support jar package cannot be found
mvn help:system automatically updates the local repository or fails
Download maven repository index from central repository
local index file location
After downloading the local index, the file still does not work.
Could not create local repository
1. Incorrect address in localRepository tag in setting.xml
2. The current user of the computer has insufficient permissions to the folder where the address in the localRepository is located (this is the problem I encountered)
The workaround is as follows:
1. Confirm whether the address in the localRepository in the setting.xml file exists
2. Modify the permissions of the warehouse folder to full control (for students who do not modify permissions, search for the modification method)
problem solved. Attached is the Chinese information on this issue
The English link is as follows:
https://cwiki.apache.org/confluence/display/maven/localrepositorynotaccessibleexception
Find the reason for the insufficient permissions of the file, modify the permission method
3. The problem cannot generate web files
Could not create local repository at D:\application\resp\settings.xml ->
Failure: Because the local repository needs to point to a specific folder, a path instead of a file needs to be filled in
Reason: Central warehouse files are still loading
Solution: When creating a maven project, add archetypeCatalog=internal
4. The difference between war deployment and war exploded in Tomcat
War mode: release mode, packaged into war package
War exploded mode: development mode, publish directly to Tomcat, support hot deployment
5. How to add Java templates in Idea
The get and post methods are used in servlet, but generally only get is needed, so we change the template. Similarly, we need to open file and code templates→other→web→servlet, and then modify the template to save