maven project deployment

---Restore content begins---

I read some about the deployment of the maven project before and felt that it was not detailed enough. I wanted to write an article myself, hoping to help more beginners like me...

1. First you have to download maven   http://maven.apache.org/download.cgi

2. The next step is to decompress: for example, you can decompress like me

3. Find the settings.xml file and modify it, mainly adding two places

4. There is one more thing you should have discovered. The technology creates a new MavenRespotion folder in the maven folder under the D drive (D:\maven\MavenRespotion)

 This is where your local repository is located.

5. The preparations are done, the next step is to build a maven web instance

 

 

6. Just click Finish. Don't rush to do other things first, you have to wait. Generally, the first deployment will be slower, please wait patiently, just see the picture below.

You can see a lot of things downloaded under D:\maven\MavenRespotion

 

7. The next step is how to publish the project to Tomcat

 

 In this more verbose, the selection steps of Tomcat are given

 

 8. At this point, you have to set up:

 

 

 

At this point, Tomcat can be released and started, but I think some netizens have introduced hot deployment, so I will talk about it together.

 

 What is framed in this interface is the settings for hot deployment:

These are the triggered events under the two commands respectively. This is unique to IntelliJ IDEA and is also the key point
On Update action When we press Ctrl + F10 to update the container, we can update the container according to the content of the event we configured.
Among them, the Update classes and resources event I selected is the most commonly used, which means that when we press Ctrl + F10 to update the container,
We trigger the update of compiled class and resource files into the container.
In Debug mode, this is also called HotSwap. This kind of hot deployment is not as easy to use as the JRebel plugin
On frame deactivation When we switch IntelliJ IDEA to the browser, the specified event is updated. This is generally because of web development.
When we need to switch tests back and forth between IntelliJ IDEA and various browsers frequently, we have this requirement. IntelliJ IDEA is
To help us do some specific things when doing this boring switch. Of course, if the switching is too frequent, this function is still very resource-intensive.
So I set Do nothing to do nothing when switching. (quote)
Of course, personal habits are different, and the settings are different, and it depends on you.

 

 9. The next step is to start and release

it will automatically access

Let me talk about it here. When I set it up earlier, the port was obviously 8008. How can it be port 8080 on the browser? In fact, my port has always been 8080,

When I set it up earlier, I thought it was 8008, so I don't need to pay too much attention to it. If the port conflicts, just change it, which was mentioned earlier.

(Okay, this is the end of it. It should be quite detailed. I also just started blogging. If there are any shortcomings, please leave a message, thank you!)

 

 

 

---End of recovery content---

Guess you like

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