• Eclipse创建maven工程后没有build path解决方案


    1、修改maven工程下的.project文件为如下内容

    <?xml version="1.0" encoding="UTF-8"?>
    <projectDescription>
        <name>Coshaho</name>
        <comment></comment>
        <projects>
        </projects>
        <buildSpec>
            <buildCommand>
                <name>org.eclipse.jdt.core.javabuilder</name>
                <arguments>
                </arguments>
            </buildCommand>
            <buildCommand>
                <name>org.eclipse.m2e.core.maven2Builder</name>
                <arguments>
                </arguments>
            </buildCommand>
        </buildSpec>
        <natures>
            <nature>org.eclipse.jdt.core.javanature</nature>
            <nature>org.eclipse.m2e.core.maven2Nature</nature>
        </natures>
    </projectDescription>

    2、添加.classpath文件

    <?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 kind="src" output="target/test-classes" path="src/test/java">
            <attributes>
                <attribute name="optional" value="true"/>
                <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="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry kind="output" path="target/classes"/>
    </classpath>
  • 相关阅读:
    多态与异常处理课后作业
    Java接口与继承作业
    大道至简第六章随笔
    大道至简第五章随笔
    Java数组课程作业
    大道至简第四章随笔
    String课后作业
    大道至简第三章随笔
    Java语法基础动手动脑实践
    大道至简-第二章 心得体会
  • 原文地址:https://www.cnblogs.com/coshaho/p/7783346.html
Copyright © 2020-2023  润新知