Some problems encountered in Maven development

  1. Perhaps you are running on a JRE rather than a JDK
    . Modify the jre to the jre in the jdk, and just select the jdk root directory.
  2. The difference between package and install - package
    is to put the jar under the target of this project, and install is to install the jar under the target to the local warehouse for use by other projects.
  3. When the maven web project in eclipse is started, it is not necessary to start tomcat separately, which will cause port conflicts. After the pom file is added to the configuration, tomcat7:run is used directly.write picture description here

— If you don’t configure it like this, you can still run it like a non-maven project. After adding tocmat, it will be published to the webapp of the tomcat installation directory.

Guess you like

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