Development environment eclipse, myEclipse local tomcat debug release bad feelings maven project encountered

  Before using myEclipse Web Project has been developing the project, deployed by myEclipse local tomcat fairly well, but there is a problem, myEclipse the Java Compiler only supports 1.7, but requires at least spring boot is jdk1.8, so give up myEclipse into eclipse, As for the idea back then. Here to talk about the development environment eclipse, myEclipse local tomcat debug release bad feelings maven project encountered.

  (1) myEclipse deployed to the tomcat maven project not identify the project, can not be deployed

  Solution: Right Project Properties, find myEclipse-> Project Facets check on the Dynamic Web Module, other hook is uncertain whether, by default it first, as shown:

  (2) eclipse maven project to deploy on tomcat not identify the project, can not be deployed

  Solution: Right Project Properties, find Project Facets check on the Dynamic Web Module, whether the other hook is uncertain, according to the first default of it, as

  (3) eclipse already with a good tomcat, released under less than tomcat webapps directory

  Possible cause 1: Not Set catalog publishing, you need to set the following figure:

  Possible Cause 2: No Click publish button, as shown below (newly revised code does not compile to the next tomcat, also need to click this button)

  (4) eclipse communication disorder due to a whole, that could lead to no packet Maven Dependencies

  The way I deal with is: can a normal display items .project file copy, to replace the project. A normal attachment:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" output="target/classes" path="src/main/java">
        <attributes>
            <attribute name="optional" value="true"/>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
        <attributes>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="src" path="src/main/webapp"/>
    <classpathentry kind="src" output="target/test-classes" path="src/test/java">
        <attributes>
            <attribute name="test" value="true"/>
            <attribute name="optional" value="true"/>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
        <attributes>
            <attribute name="test" value="true"/>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
        <attributes>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
        <attributes>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="output" path="target/classes"/>
</classpath>
View Code

  (5)eclipse发布或者打war包到tomcat中缺少lib包或者其他文件

  解决方法:右键项目Properties,找到Deployment Assembly设置java、resources、webapp、Maven Dependencies 如下:

 

 

  

Guess you like

Origin www.cnblogs.com/javasl/p/12356407.html
Recommended