瀏覽代碼

HADOOP-3480. Need to update Eclipse template to reflect current trunk. Contributed by Brice Arnould.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@671563 13f79535-47bb-0310-9956-ffa450edef68
Thomas White 17 年之前
父節點
當前提交
f915e1541e
共有 5 個文件被更改,包括 46 次插入7 次删除
  1. 15 3
      .eclipse.templates/.classpath
  2. 6 0
      .eclipse.templates/README.txt
  3. 3 0
      CHANGES.txt
  4. 5 3
      build.xml
  5. 17 1
      src/test/bin/test-patch.sh

+ 15 - 3
.eclipse.templates/.classpath

@@ -1,8 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src/java"/>
-	<classpathentry kind="src" path="src/test"/>
+	<classpathentry kind="src" path="src/benchmarks"/>
+	<classpathentry kind="src" path="src/core"/>
 	<classpathentry kind="src" path="src/examples"/>
+	<classpathentry kind="src" path="src/hdfs"/>
+	<classpathentry kind="src" path="src/mapred"/>
+	<classpathentry kind="src" path="src/test"/>
+	<classpathentry kind="src" path="src/tools"/>
 	<classpathentry kind="src" path="src/contrib/data_join/src/java"/>
 	<classpathentry kind="src" path="src/contrib/data_join/src/examples"/>
 	<classpathentry kind="src" path="src/contrib/streaming/src/java"/>
@@ -14,6 +18,7 @@
 	<classpathentry kind="lib" path="lib/commons-httpclient-3.0.1.jar"/>
 	<classpathentry kind="lib" path="lib/commons-logging-1.0.4.jar"/>
 	<classpathentry kind="lib" path="lib/commons-logging-api-1.0.4.jar"/>
+	<classpathentry kind="lib" path="lib/commons-net-1.4.1.jar"/>
 	<classpathentry kind="lib" path="lib/jets3t-0.6.0.jar"/>
 	<classpathentry kind="lib" path="lib/jetty-5.1.4.jar"/>
 	<classpathentry kind="lib" path="lib/jetty-ext/commons-el.jar"/>
@@ -21,10 +26,17 @@
 	<classpathentry kind="lib" path="lib/jetty-ext/jasper-runtime.jar"/>
 	<classpathentry kind="lib" path="lib/jetty-ext/jsp-api.jar"/>
 	<classpathentry kind="lib" path="lib/junit-3.8.1.jar"/>
-	<classpathentry kind="lib" path="lib/kfs-0.1.jar"/>
+	<classpathentry kind="lib" path="lib/kfs-0.1.3.jar"/>
 	<classpathentry kind="lib" path="lib/log4j-1.2.13.jar"/>
+	<classpathentry kind="lib" path="lib/oro-2.0.8.jar"/>
 	<classpathentry kind="lib" path="lib/servlet-api.jar"/>
+	<classpathentry kind="lib" path="lib/slf4j-api-1.4.3.jar"/>
+	<classpathentry kind="lib" path="lib/slf4j-log4j12-1.4.3.jar"/>
 	<classpathentry kind="lib" path="lib/xmlenc-0.52.jar"/>
+	<classpathentry kind="lib" path="src/test/lib/ftplet-api-1.0.0-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="src/test/lib/ftpserver-core-1.0.0-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="src/test/lib/ftpserver-server-1.0.0-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="src/test/lib/mina-core-2.0.0-M2-20080407.124109-12.jar"/>
 	<classpathentry kind="lib" path="build/test/classes"/>
 	<classpathentry kind="output" path="build/eclipse-classes"/>
 </classpath>

+ 6 - 0
.eclipse.templates/README.txt

@@ -0,0 +1,6 @@
+This directory contains templates for generating Eclipse files to configure
+Eclipse for Hadoop development.
+
+For further information please consult
+
+http://wiki.apache.org/hadoop/EclipseEnvironment 

+ 3 - 0
CHANGES.txt

@@ -667,6 +667,9 @@ Release 0.18.0 - Unreleased
     HADOOP-3559. Fix the libhdfs test script and config to work with the
     current semantics. (lohit vijayarenu via cdouglas)
 
+    HADOOP-3480.  Need to update Eclipse template to reflect current trunk.
+    (Brice Arnould via tomwhite)
+
 Release 0.17.1 - Unreleased
 
   INCOMPATIBLE CHANGES

+ 5 - 3
build.xml

@@ -1220,10 +1220,12 @@
           description="Generate files for Eclipse">
     <pathconvert property="eclipse.project">
       <path path="${basedir}"/>
-      <regexpmapper from="^.*/([^/]+)$$" to="\1"/>
+      <regexpmapper from="^.*/([^/]+)$$" to="\1" handledirsep="yes"/>
     </pathconvert>
-    <copy todir=".">
-      <fileset dir=".eclipse.templates"/>
+    <copy todir="." overwrite="true">
+      <fileset dir=".eclipse.templates">
+      	<exclude name="**/README.txt"/>
+      </fileset>
       <filterset>
         <filter token="PROJECT" value="${eclipse.project}"/>
       </filterset>

+ 17 - 1
src/test/bin/test-patch.sh

@@ -463,6 +463,22 @@ runCoreTests () {
   return 0
 }
 
+###############################################################################
+### Tests parts of contrib specific to the eclipse files
+runContribTestOnEclipseFiles () {
+  export ECLIPSE_DECLARED_JARS=$(sed -n 's@.*kind="lib".*path="\(.*jar\)".*@\1@p' < .eclipse.templates/.classpath |sort)
+  export PRESENT_JARS=$(find lib/ -name '*.jar' |sort)
+  export ECLIPSE_DECLARED_SRC=$(sed -n 's@.*kind="src".*path="\(.*\)".*@\1@p' < .eclipse.templates/.classpath |sort)
+  if [ "${ECLIPSE_DECLARED_JARS}" != "${PRESENT_JARS}" ]; then
+    echo "Some jars are not declared in the Eclipse project."
+    return 1
+  fi
+  for dir in $ECLIPSE_DECLARED_SRC; do
+    [ '!' -d $dir ] && echo "$dir is referenced in the Eclipse project although it doesn't exists anymore." && return 1
+  done
+  return 0
+}
+
 ###############################################################################
 ### Run the test-contrib target
 runContribTests () {
@@ -479,7 +495,7 @@ runContribTests () {
   ### Kill any rogue build processes from the last attempt
   $PS -auxwww | $GREP HadoopPatchProcess | /usr/bin/nawk '{print $2}' | /usr/bin/xargs -t -I {} /usr/bin/kill -9 {} > /dev/null
 
-  $ANT_HOME/bin/ant -Dversion="${VERSION}" $ECLIPSE_PROPERTY $PYTHON_PROPERTY -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes test-contrib
+  $ANT_HOME/bin/ant -Dversion="${VERSION}" $ECLIPSE_PROPERTY $PYTHON_PROPERTY -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes test-contrib && runContribTestOnEclipseFiles
   if [[ $? != 0 ]] ; then
     JIRA_COMMENT="$JIRA_COMMENT