瀏覽代碼

HADOOP-1228. Ant task to generate Eclipse project files.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@642183 13f79535-47bb-0310-9956-ffa450edef68
Thomas White 17 年之前
父節點
當前提交
4aba894702

+ 30 - 0
.eclipse.templates/.classpath

@@ -0,0 +1,30 @@
+<?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/examples"/>
+	<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"/>
+	<classpathentry kind="src" path="src/contrib/streaming/src/test"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
+	<classpathentry kind="lib" path="lib/commons-cli-2.0-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="lib/commons-codec-1.3.jar"/>
+	<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/jets3t-0.5.0.jar"/>
+	<classpathentry kind="lib" path="lib/jetty-5.1.4.jar"/>
+	<classpathentry kind="lib" path="lib/jetty-ext/commons-el.jar"/>
+	<classpathentry kind="lib" path="lib/jetty-ext/jasper-compiler.jar"/>
+	<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/log4j-1.2.13.jar"/>
+	<classpathentry kind="lib" path="lib/servlet-api.jar"/>
+	<classpathentry kind="lib" path="lib/xmlenc-0.52.jar"/>
+	<classpathentry kind="lib" path="build/test/classes"/>
+	<classpathentry kind="output" path="build/eclipse-classes"/>
+</classpath>

+ 22 - 0
.eclipse.templates/.externalToolBuilders/Hadoop_Ant_Builder.launch

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="clean,"/>
+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS" value="compile,compile-core-test,"/>
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/@PROJECT@/build.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="@PROJECT@"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/@PROJECT@/build.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>

+ 27 - 0
.eclipse.templates/.project

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>@PROJECT@</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+				<dictionary>
+					<key>LaunchConfigHandle</key>
+					<value>&lt;project&gt;/.externalToolBuilders/Hadoop_Ant_Builder.launch</value>
+				</dictionary>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

+ 2 - 0
CHANGES.txt

@@ -162,6 +162,8 @@ Trunk (unreleased changes)
     HADOOP-3092. Show counter values from job -status command.
     HADOOP-3092. Show counter values from job -status command.
     (Tom White via ddas)
     (Tom White via ddas)
 
 
+    HADOOP-1228.  Ant task to generate Eclipse project files.  (tomwhite)
+
   OPTIMIZATIONS
   OPTIMIZATIONS
 
 
     HADOOP-2790.  Fixed inefficient method hasSpeculativeTask by removing
     HADOOP-2790.  Fixed inefficient method hasSpeculativeTask by removing

+ 14 - 0
build.xml

@@ -1163,5 +1163,19 @@
     <arg value="${jira.passwd}"/>
     <arg value="${jira.passwd}"/>
   </exec>
   </exec>
 </target>
 </target>
+	
+  <target name="eclipse-files" depends="init"
+          description="Generate files for Eclipse">
+    <pathconvert property="eclipse.project">
+      <path path="${basedir}"/>
+      <regexpmapper from="^.*/([^/]+)$$" to="\1"/>
+    </pathconvert>
+    <copy todir=".">
+      <fileset dir=".eclipse.templates"/>
+      <filterset>
+        <filter token="PROJECT" value="${eclipse.project}"/>
+      </filterset>
+    </copy>
+  </target>
 
 
 </project>
 </project>