zoukankan      html  css  js  c++  java
  • 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>
  • 相关阅读:
    Kubernetes之Ingress-Nginx
    Prometheus之AWS-EC2自动发现
    Prometheus之kubernetes-sd自动发现
    ORACLE 遇到ORA 03113 数据库连接卡住
    ORACLE 遇到ORA-31693 ORA-31617 ORA-19505 ORA-27037
    Oracle 计划任务批量清理临时表实例
    GO 基础
    CentOS 7.3安装完整开发环境
    3.6 String 与 切片&str的区别
    ubantu上编辑windows程序
  • 原文地址:https://www.cnblogs.com/coshaho/p/7783346.html
Copyright © 2011-2022 走看看