Eclipse下.project和.classpath做用

  1. classpath做用java

    定義項目的結構,如src、output、con、lib等。 eclipse

    源文件的具體位置(kind="src")maven

    運行的系統環境(kind="con")ui

    工程的library的具體位置信息(kind="lib")spa

    在每一個lib的xml子節點中,有關於它的其它配置信息(例如我配置的那個"javadoc_location")插件

    項目的輸出目錄(kind="output")debug

    樣本:xml

    <?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" output="target/test-classes" path="src/test/java">
      <attributes>
       <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="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.6">
      <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>
     ip

  2. .project做開發

    工程名<name></name>

    工程註釋描述<comment></comment>

    運行時須要的額外Eclipse插件<natures></natures>,及其具體加載方式信息<buildSpec></buildSpec>

    若是你在開發過程當中向工程裏面加入了不少額外的插件,則必然會致使你的Eclipse啓動速度變慢。在這種狀況下,你能夠到這個文件裏面去掉一些插件,不過這樣一來你在開啓那些關聯文件的時候會加載那些插件

         樣本:

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
 <name>log4j-jmx-gui</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.m2e.core.maven2Nature</nature>  <nature>org.eclipse.jdt.core.javanature</nature> </natures></projectDescription>

相關文章
相關標籤/搜索