Bug 495617: Mars: Honor External Tools Configurations "Classpath | Ant Home" and "JRE | Separate JRE" (work with JavaSE-1.6)

Change-Id: Idcc545702f4c2cb1859bc623b73c68e7816fe411
diff --git "a/ant/org.eclipse.ant.launching/.externalToolBuilders/build common debug \133Builder\135.launch" "b/ant/org.eclipse.ant.launching/.externalToolBuilders/build common debug \133Builder\135.launch"
index 2f1ec55..9c0aa9c 100644
--- "a/ant/org.eclipse.ant.launching/.externalToolBuilders/build common debug \133Builder\135.launch"
+++ "b/ant/org.eclipse.ant.launching/.externalToolBuilders/build common debug \133Builder\135.launch"
@@ -1,21 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<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="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1254539808328_112&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.launching/lib&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<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"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ant.launching"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1254539834953_113&quot; label=&quot;workingSet&quot; name=&quot;workingSet&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.launching/common&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>

+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">

+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="after_clean,"/>

+<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="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;resources&gt;&#13;&#10;&lt;item path=&quot;/org.eclipse.ant.launching/lib&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/resources&gt;}"/>

+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">

+<listEntry value="/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml"/>

+</listAttribute>

+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">

+<listEntry value="1"/>

+</listAttribute>

+<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"/>

+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ant.launching"/>

+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>

+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;resources&gt;&#13;&#10;&lt;item path=&quot;/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml&quot; type=&quot;1&quot;/&gt;&#13;&#10;&lt;item path=&quot;/org.eclipse.ant.launching/common&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/resources&gt;}"/>

+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml}"/>

+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>

+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>

+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>

+</launchConfiguration>

diff --git "a/ant/org.eclipse.ant.launching/.externalToolBuilders/build remote support \133Builder\135.launch" "b/ant/org.eclipse.ant.launching/.externalToolBuilders/build remote support \133Builder\135.launch"
index c56eb96..ca0a65b 100644
--- "a/ant/org.eclipse.ant.launching/.externalToolBuilders/build remote support \133Builder\135.launch"
+++ "b/ant/org.eclipse.ant.launching/.externalToolBuilders/build remote support \133Builder\135.launch"
@@ -1,21 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<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="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1254617191468_44&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.launching/lib&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.ant.launching/buildfiles/buildRemote.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<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"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ant.launching"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1254617206453_45&quot; label=&quot;workingSet&quot; name=&quot;workingSet&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.launching/remote&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.launching/buildfiles/buildRemote.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>

+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">

+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="after_clean,"/>

+<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="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;resources&gt;&#13;&#10;&lt;item path=&quot;/org.eclipse.ant.launching/lib&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/resources&gt;}"/>

+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">

+<listEntry value="/org.eclipse.ant.launching/buildfiles/buildRemote.xml"/>

+</listAttribute>

+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">

+<listEntry value="1"/>

+</listAttribute>

+<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"/>

+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ant.launching"/>

+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>

+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;resources&gt;&#13;&#10;&lt;item path=&quot;/org.eclipse.ant.launching/buildfiles/buildRemote.xml&quot; type=&quot;1&quot;/&gt;&#13;&#10;&lt;item path=&quot;/org.eclipse.ant.launching/remote&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/resources&gt;}"/>

+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.launching/buildfiles/buildRemote.xml}"/>

+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>

+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>

+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>

+</launchConfiguration>

diff --git a/ant/org.eclipse.ant.launching/.gitignore b/ant/org.eclipse.ant.launching/.gitignore
index 3d07972..d984724 100644
--- a/ant/org.eclipse.ant.launching/.gitignore
+++ b/ant/org.eclipse.ant.launching/.gitignore
@@ -1,4 +1,4 @@
-lib
+lib/loggers.jar
 temp.folder
 loggers_bin
 common_bin
diff --git a/ant/org.eclipse.ant.launching/META-INF/MANIFEST.MF b/ant/org.eclipse.ant.launching/META-INF/MANIFEST.MF
index f9310bf..b8c0cbd 100644
--- a/ant/org.eclipse.ant.launching/META-INF/MANIFEST.MF
+++ b/ant/org.eclipse.ant.launching/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Localization: plugin
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ant.launching;singleton:=true
-Bundle-Version: 1.1.200.qualifier
+Bundle-Version: 1.1.201.qualifier
 Bundle-Activator: org.eclipse.ant.internal.launching.AntLaunching
 Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.debug.core;bundle-version="[3.9.0,4.0.0)",
diff --git a/ant/org.eclipse.ant.launching/build.properties b/ant/org.eclipse.ant.launching/build.properties
index 1293a32..e086f8a 100644
--- a/ant/org.eclipse.ant.launching/build.properties
+++ b/ant/org.eclipse.ant.launching/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2009 IBM Corporation and others.
+# Copyright (c) 2009, 2016 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -20,14 +20,18 @@
                about.html
 
 jars.compile.order = .,\
-				     lib/antdebug.jar,\
-                     lib/loggers.jar,\
-                     lib/remote.jar
+				lib/loggers.jar
+# antdebug.jar and remote.jar are compiled locally using 1.6, see bug 495617:
+#				     lib/antdebug.jar,\
+#                     lib/remote.jar
 source.lib/loggers.jar = loggers/
 output.lib/loggers.jar = loggers_bin/
-source.lib/antdebug.jar = common/
-output.lib/antdebug.jar = common_bin/
-source.lib/remote.jar = remote/
-output.lib/remote.jar = remote_bin/
-src.includes = about.html
+extra.lib/loggers.jar = lib/antdebug.jar
+#source.lib/antdebug.jar = common/
+#output.lib/antdebug.jar = common_bin/
+#source.lib/remote.jar = remote/
+#output.lib/remote.jar = remote_bin/
+src.includes = about.html,\
+               remote/,\
+               common/
 javacWarnings..=-unavoidableGenericProblems
diff --git a/ant/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml b/ant/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml
index 7d91240..67965b0 100644
--- a/ant/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml
+++ b/ant/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-     Copyright (c) 2005, 2013 IBM Corporation and others.
+     Copyright (c) 2005, 2016 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -14,19 +14,26 @@
 	
 	<target name="build" description="Cleans, builds and refreshes" depends="clean, lib/antdebuglib.jar"/>
 
-	<target name="init">
+	<target name="init" depends="properties">
 		<property name="temp.folder" value="${basedir}/temp.folder"/>
 		<property name="build.result.folder" value="${basedir}"/>
 	</target>
 	
+	<target name="properties" if="eclipse.running">
+		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+	</target>
+	
 	<target name="lib/antdebuglib.jar" description= "Creates the antdebug.jar" depends="init">
 		<property name="destdir" value="${temp.folder}/lib/antdebug.jar.bin"/>
 		<delete dir="${destdir}"/>
 		<mkdir dir="${destdir}"/>
-		<!-- copy necessary class files resources -->
-		<copy todir="${destdir}">
-			<fileset dir="${basedir}/common_bin"/>
-		</copy>
+		<javac target="1.6" source="1.6" destdir="${destdir}" failonerror="true" verbose="false" debug="on" includeAntRuntime="yes"
+				classpath="${basedir}/bin">
+			<src path="${basedir}/common"/>
+			<compilerarg value="-Xlint"/>
+		</javac>
+		<copy file="${basedir}/common_bin/META-INF/eclipse.inf" tofile="${destdir}/META-INF/eclipse.inf"/>
+		
 		<mkdir dir="${build.result.folder}/lib"/>
 		<jar destfile="${build.result.folder}/lib/antdebug.jar" basedir="${destdir}"/>
 		<delete dir="${temp.folder}"/>
@@ -36,4 +43,7 @@
 		<delete file="${build.result.folder}/lib/antdebug.jar"/>
 		<delete dir="${temp.folder}"/>
 	</target>
+	
+	<!-- Empty target for "After a Clean" task (we don't want to rebuild the Jar here, e.g. on checkout). -->
+	<target name="after_clean"/>
 </project>
diff --git a/ant/org.eclipse.ant.launching/buildfiles/buildRemote.xml b/ant/org.eclipse.ant.launching/buildfiles/buildRemote.xml
index 2122e58..1f637f4 100644
--- a/ant/org.eclipse.ant.launching/buildfiles/buildRemote.xml
+++ b/ant/org.eclipse.ant.launching/buildfiles/buildRemote.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+     Copyright (c) 2005, 2016 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -14,19 +14,26 @@
 	
 	<target name="build" description="Cleans, builds and refreshes" depends="clean, lib/remotelib.jar"/>
 
-	<target name="init">
+	<target name="init" depends="properties">
 		<property name="temp.folder" value="${basedir}/temp.folder"/>
 		<property name="build.result.folder" value="${basedir}"/>
 	</target>
 	
+	<target name="properties" if="eclipse.running">
+		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+	</target>
+	
 	<target name="lib/remotelib.jar" description= "Creates the remote.jar" depends="init">
 		<property name="destdir" value="${temp.folder}/lib/remote.jar.bin"/>
 		<delete dir="${destdir}"/>
 		<mkdir dir="${destdir}"/>
-		<!-- copy necessary class files resources -->
-		<copy todir="${destdir}">
-			<fileset dir="${basedir}/remote_bin"/>
-		</copy>
+		<javac target="1.6" source="1.6" destdir="${destdir}" failonerror="true" verbose="false" debug="on" includeAntRuntime="yes"
+				classpath="${basedir}/bin">
+			<src path="${basedir}/remote"/>
+			<compilerarg value="-Xlint"/>
+		</javac>
+		<copy file="${basedir}/remote_bin/META-INF/eclipse.inf" tofile="${destdir}/META-INF/eclipse.inf"/>
+		<copy file="${basedir}/remote_bin/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.properties" tofile="${destdir}/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.properties"/>
 		<mkdir dir="${build.result.folder}/lib"/>
 		<jar destfile="${build.result.folder}/lib/remote.jar" basedir="${destdir}"/>
 		<delete dir="${temp.folder}"/>
@@ -36,4 +43,7 @@
 		<delete file="${build.result.folder}/lib/remote.jar"/>
 		<delete dir="${temp.folder}"/>
 	</target>
+	
+	<!-- Empty target for "After a Clean" task (we don't want to rebuild the Jar here, e.g. on checkout). -->
+	<target name="after_clean"/>
 </project>
diff --git a/ant/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/AntDebugState.java b/ant/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/AntDebugState.java
index 231ffd0..d923de3 100644
--- a/ant/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/AntDebugState.java
+++ b/ant/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/AntDebugState.java
@@ -24,8 +24,6 @@
 import org.apache.tools.ant.Target;
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.taskdefs.MacroInstance;
-
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.launching.debug.model.DebugMessageIds;
 
 public class AntDebugState {
@@ -34,8 +32,10 @@
 	private static final String fgAntCallTaskName = "antcall"; //$NON-NLS-1$
 
 	private IDebugBuildLogger fLogger;
-	private Stack<Task> fTasks = new Stack<>();
-	private Map<Task, Object> fTaskToProxies = new HashMap<>();
+	@SuppressWarnings("unused")
+	private Stack<Task> fTasks = new Stack<Task>();
+	@SuppressWarnings("unused")
+	private Map<Task, Object> fTaskToProxies = new HashMap<Task, Object>();
 	private Task fCurrentTask;
 	private Task fStepOverTask;
 	private Task fStepIntoTask;
@@ -47,8 +47,10 @@
 
 	private Map<Project, Vector<?>> fProjectToTargetNames = null;
 	private Map<Project, Map<Target, Vector<Target>>> fProjectToMapOfTargetToBuildSequence = null;
-	private Stack<Target> fTargetsToExecute = new Stack<>();
-	private Stack<Target> fTargetsExecuting = new Stack<>();
+	@SuppressWarnings("unused")
+	private Stack<Target> fTargetsToExecute = new Stack<Target>();
+	@SuppressWarnings("unused")
+	private Stack<Target> fTargetsExecuting = new Stack<Target>();
 
 	private boolean fConsiderTargetBreakpoints = false;
 	private boolean fShouldSuspend;
@@ -60,9 +62,10 @@
 		fLogger = logger;
 	}
 
+	@SuppressWarnings("unused")
 	public void buildStarted() {
-		fProjectToTargetNames = new HashMap<>();
-		fProjectToMapOfTargetToBuildSequence = new HashMap<>();
+		fProjectToTargetNames = new HashMap<Project, Vector<?>>();
+		fProjectToMapOfTargetToBuildSequence = new HashMap<Project, Map<Target, Vector<Target>>>();
 	}
 
 	/**
@@ -300,7 +303,8 @@
 			Object ref = eventProject.getReference(IAntCoreConstants.TARGET_VECTOR_NAME);
 			if (ref != null) {
 				fProjectToTargetNames.put(eventProject, (Vector<?>) ref);
-				HashMap<Target, Vector<Target>> targetToBuildSequence = new HashMap<>();
+				@SuppressWarnings("unused")
+				HashMap<Target, Vector<Target>> targetToBuildSequence = new HashMap<Target, Vector<Target>>();
 				setTargetToExecute(initializeBuildSequenceInformation(event, targetToBuildSequence));
 				fProjectToMapOfTargetToBuildSequence.put(eventProject, targetToBuildSequence);
 			}
@@ -519,7 +523,8 @@
 	}
 
 	private String escapeLineSeparator(String stringToEscape) {
-		if (!(stringToEscape.indexOf('\r') != -1 || stringToEscape.indexOf('\n') != -1 || stringToEscape.indexOf("\\r") != -1 || stringToEscape.indexOf("\\n") != -1)) { //$NON-NLS-1$ //$NON-NLS-2$
+		if (!(stringToEscape.indexOf('\r') != -1 || stringToEscape.indexOf('\n') != -1 || stringToEscape.indexOf("\\r") != -1 //$NON-NLS-1$
+				|| stringToEscape.indexOf("\\n") != -1)) { //$NON-NLS-1$
 			return stringToEscape;
 		}
 		StringBuffer escapedValue = new StringBuffer(stringToEscape);
diff --git a/ant/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/IAntCoreConstants.java b/ant/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/IAntCoreConstants.java
new file mode 100644
index 0000000..3862684
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/IAntCoreConstants.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2016 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug;
+
+/**
+ * Common constants.
+ */
+public interface IAntCoreConstants {
+
+	// default values
+	public static final String DEFAULT_BUILD_FILENAME = "build.xml"; //$NON-NLS-1$
+
+	// preferences
+	public static final String PREFERENCE_TASKS = "tasks"; //$NON-NLS-1$
+	public static final String PREFERENCE_TYPES = "types"; //$NON-NLS-1$
+
+	public static final String PREFIX_TASK = "task."; //$NON-NLS-1$
+	public static final String PREFIX_TYPE = "type."; //$NON-NLS-1$
+
+	/**
+	 * Preferences
+	 * 
+	 * @since 3.0
+	 */
+	public static final String PREFERENCE_ANT_HOME_ENTRIES = "ant_home_entries"; //$NON-NLS-1$
+	public static final String PREFERENCE_ADDITIONAL_ENTRIES = "additional_entries"; //$NON-NLS-1$
+
+	public static final String PREFERENCE_CLASSPATH_CHANGED = "classpath_changed"; //$NON-NLS-1$
+
+	/**
+	 * Preferences
+	 * 
+	 * @since 2.1
+	 */
+	public static final String PREFERENCE_ANT_HOME = "ant_home"; //$NON-NLS-1$
+	public static final String PREFERENCE_PROPERTIES = "properties"; //$NON-NLS-1$
+	public static final String PREFERENCE_PROPERTY_FILES = "propertyfiles"; //$NON-NLS-1$
+	public static final String PREFIX_PROPERTY = "property."; //$NON-NLS-1$
+
+	/**
+	 * Constant representing the word 'id' <br>
+	 * <br>
+	 * Value is: <code>id</code>
+	 * 
+	 * @since 3.2.500
+	 */
+	public static final String ID = "id"; //$NON-NLS-1$
+
+	/**
+	 * Constant representing the word 'augment' <br>
+	 * <br>
+	 * Value is: <code>augment</code>
+	 * 
+	 * @since 3.2.500
+	 */
+	public static final String AUGMENT = "augment"; //$NON-NLS-1$
+
+	/**
+	 * Constant for the word 'default' <br>
+	 * <br>
+	 * Value is: <code>default</code>
+	 * 
+	 * @since org.eclipse.ant.core 3.2.200
+	 */
+	public static final String DEFAULT = "default"; //$NON-NLS-1$
+
+	/**
+	 * Constant for the word 'dir' <br>
+	 * <br>
+	 * Value is: <code>dir</code>
+	 * 
+	 * @since org.eclipse.ant.core 3.2.200
+	 */
+	public static final String DIR = "dir"; //$NON-NLS-1$
+
+	/**
+	 * Constant for the empty {@link String}
+	 * 
+	 * @since org.eclipse.ant.core 3.2.200
+	 */
+	public static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+	/**
+	 * Constant for the word 'file' <br>
+	 * <br>
+	 * Value is: <code>file</code>
+	 * 
+	 * @since org.eclipse.ant.core 3.2.200
+	 */
+	public static final String FILE = "file"; //$NON-NLS-1$
+
+	/**
+	 * Constant representing a file URL protocol <br>
+	 * <br>
+	 * Value is: <code>file:</code>
+	 * 
+	 * @since org.eclipse.ant.core 3.2.200
+	 */
+	public static final String FILE_PROTOCOL = "file:"; //$NON-NLS-1$
+
+	/**
+	 * Constant for the word 'description' <br>
+	 * <br>
+	 * Value is: <code>description</code>
+	 * 
+	 * @since org.eclipse.ant.core 3.2.200
+	 */
+	public static final String DESCRIPTION = "description"; //$NON-NLS-1$
+
+	/**
+	 * Constant for the encoding <code>UTF-8</code> <br>
+	 * <br>
+	 * Value is: <code>UTF-8</code>
+	 * 
+	 * @since org.eclipse.ant.core 3.3.0
+	 */
+	public static final String UTF_8 = "UTF-8"; //$NON-NLS-1$
+
+	/**
+	 * The name of the XML build file extension. <br>
+	 * <br>
+	 * Value is: <code>xml</code>
+	 * 
+	 * @since 3.8
+	 */
+	public static final String XML_EXTENSION = "xml"; //$NON-NLS-1$
+
+	/**
+	 * The name of the target vector property used by the Eclipse executor <br>
+	 * <br>
+	 * Value is: <code>eclipse.ant.targetVector</code>
+	 * 
+	 * @since 3.3.0
+	 */
+	public static final String TARGET_VECTOR_NAME = "eclipse.ant.targetVector"; //$NON-NLS-1$
+}
diff --git a/ant/org.eclipse.ant.launching/lib/antdebug.jar b/ant/org.eclipse.ant.launching/lib/antdebug.jar
new file mode 100644
index 0000000..7b2feb8
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/lib/antdebug.jar
Binary files differ
diff --git a/ant/org.eclipse.ant.launching/lib/remote.jar b/ant/org.eclipse.ant.launching/lib/remote.jar
new file mode 100644
index 0000000..d8d199c
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/lib/remote.jar
Binary files differ
diff --git a/ant/org.eclipse.ant.launching/pom.xml b/ant/org.eclipse.ant.launching/pom.xml
index eb42ed8..306d622 100644
--- a/ant/org.eclipse.ant.launching/pom.xml
+++ b/ant/org.eclipse.ant.launching/pom.xml
@@ -19,7 +19,7 @@
   </parent>
   <groupId>org.eclipse.ant</groupId>
   <artifactId>org.eclipse.ant.launching</artifactId>
-  <version>1.1.200-SNAPSHOT</version>
+  <version>1.1.201-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
   <properties>
     <defaultSigning-excludeInnerJars>true</defaultSigning-excludeInnerJars>
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java
index ec3cd89..3a80c03 100644
--- a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java
@@ -17,7 +17,6 @@
 import org.apache.tools.ant.Executor;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.helper.DefaultExecutor;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 
 public class EclipseDefaultExecutor extends DefaultExecutor {
 
@@ -28,9 +27,10 @@
 	 * 
 	 * @see org.apache.tools.ant.Executor#executeTargets(org.apache.tools.ant.Project, java.lang.String[])
 	 */
+	@SuppressWarnings("unused")
 	@Override
 	public void executeTargets(Project project, String[] targetNames) throws BuildException {
-		Vector<String> v = new Vector<>();
+		Vector<String> v = new Vector<String>();
 		v.addAll(Arrays.asList(targetNames));
 		project.addReference(IAntCoreConstants.TARGET_VECTOR_NAME, v);
 		super.executeTargets(project, targetNames);
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java
index 2bed9c1..b14a371 100644
--- a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java
@@ -17,7 +17,6 @@
 import org.apache.tools.ant.Executor;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.helper.SingleCheckExecutor;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 
 public class EclipseSingleCheckExecutor extends SingleCheckExecutor {
 
@@ -26,9 +25,10 @@
 	 * 
 	 * @see org.apache.tools.ant.Executor#executeTargets(org.apache.tools.ant.Project, java.lang.String[])
 	 */
+	@SuppressWarnings("unused")
 	@Override
 	public void executeTargets(Project project, String[] targetNames) throws BuildException {
-		Vector<String> v = new Vector<>();
+		Vector<String> v = new Vector<String>();
 		v.addAll(Arrays.asList(targetNames));
 		project.addReference(IAntCoreConstants.TARGET_VECTOR_NAME, v);
 		super.executeTargets(project, targetNames);
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/IAntCoreConstants.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/IAntCoreConstants.java
new file mode 100644
index 0000000..51477db
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/IAntCoreConstants.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2016 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote;
+
+/**
+ * Common constants.
+ */
+public interface IAntCoreConstants {
+
+	// default values
+	public static final String DEFAULT_BUILD_FILENAME = "build.xml"; //$NON-NLS-1$
+
+	// preferences
+	public static final String PREFERENCE_TASKS = "tasks"; //$NON-NLS-1$
+	public static final String PREFERENCE_TYPES = "types"; //$NON-NLS-1$
+
+	public static final String PREFIX_TASK = "task."; //$NON-NLS-1$
+	public static final String PREFIX_TYPE = "type."; //$NON-NLS-1$
+
+	/**
+	 * Preferences
+	 * 
+	 * @since 3.0
+	 */
+	public static final String PREFERENCE_ANT_HOME_ENTRIES = "ant_home_entries"; //$NON-NLS-1$
+	public static final String PREFERENCE_ADDITIONAL_ENTRIES = "additional_entries"; //$NON-NLS-1$
+
+	public static final String PREFERENCE_CLASSPATH_CHANGED = "classpath_changed"; //$NON-NLS-1$
+
+	/**
+	 * Preferences
+	 * 
+	 * @since 2.1
+	 */
+	public static final String PREFERENCE_ANT_HOME = "ant_home"; //$NON-NLS-1$
+	public static final String PREFERENCE_PROPERTIES = "properties"; //$NON-NLS-1$
+	public static final String PREFERENCE_PROPERTY_FILES = "propertyfiles"; //$NON-NLS-1$
+	public static final String PREFIX_PROPERTY = "property."; //$NON-NLS-1$
+
+	/**
+	 * Constant representing the word 'id' <br>
+	 * <br>
+	 * Value is: <code>id</code>
+	 * 
+	 * @since 3.2.500
+	 */
+	public static final String ID = "id"; //$NON-NLS-1$
+
+	/**
+	 * Constant representing the word 'augment' <br>
+	 * <br>
+	 * Value is: <code>augment</code>
+	 * 
+	 * @since 3.2.500
+	 */
+	public static final String AUGMENT = "augment"; //$NON-NLS-1$
+
+	/**
+	 * Constant for the word 'default' <br>
+	 * <br>
+	 * Value is: <code>default</code>
+	 * 
+	 * @since org.eclipse.ant.core 3.2.200
+	 */
+	public static final String DEFAULT = "default"; //$NON-NLS-1$
+
+	/**
+	 * Constant for the word 'dir' <br>
+	 * <br>
+	 * Value is: <code>dir</code>
+	 * 
+	 * @since org.eclipse.ant.core 3.2.200
+	 */
+	public static final String DIR = "dir"; //$NON-NLS-1$
+
+	/**
+	 * Constant for the empty {@link String}
+	 * 
+	 * @since org.eclipse.ant.core 3.2.200
+	 */
+	public static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+	/**
+	 * Constant for the word 'file' <br>
+	 * <br>
+	 * Value is: <code>file</code>
+	 * 
+	 * @since org.eclipse.ant.core 3.2.200
+	 */
+	public static final String FILE = "file"; //$NON-NLS-1$
+
+	/**
+	 * Constant representing a file URL protocol <br>
+	 * <br>
+	 * Value is: <code>file:</code>
+	 * 
+	 * @since org.eclipse.ant.core 3.2.200
+	 */
+	public static final String FILE_PROTOCOL = "file:"; //$NON-NLS-1$
+
+	/**
+	 * Constant for the word 'description' <br>
+	 * <br>
+	 * Value is: <code>description</code>
+	 * 
+	 * @since org.eclipse.ant.core 3.2.200
+	 */
+	public static final String DESCRIPTION = "description"; //$NON-NLS-1$
+
+	/**
+	 * Constant for the encoding <code>UTF-8</code> <br>
+	 * <br>
+	 * Value is: <code>UTF-8</code>
+	 * 
+	 * @since org.eclipse.ant.core 3.3.0
+	 */
+	public static final String UTF_8 = "UTF-8"; //$NON-NLS-1$
+
+	/**
+	 * The name of the XML build file extension. <br>
+	 * <br>
+	 * Value is: <code>xml</code>
+	 * 
+	 * @since 3.8
+	 */
+	public static final String XML_EXTENSION = "xml"; //$NON-NLS-1$
+
+	/**
+	 * The name of the target vector property used by the Eclipse executor <br>
+	 * <br>
+	 * Value is: <code>eclipse.ant.targetVector</code>
+	 * 
+	 * @since 3.3.0
+	 */
+	public static final String TARGET_VECTOR_NAME = "eclipse.ant.targetVector"; //$NON-NLS-1$
+}
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java
index e6961a1..921042f 100644
--- a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java
@@ -48,7 +48,6 @@
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.TaskAdapter;
 import org.apache.tools.ant.util.FileUtils;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.launching.remote.logger.RemoteAntBuildLogger;
 
 /**
@@ -112,7 +111,8 @@
 
 	private boolean scriptExecuted = false;
 
-	private List<String> propertyFiles = new ArrayList<>();
+	@SuppressWarnings("unused")
+	private List<String> propertyFiles = new ArrayList<String>();
 
 	/**
 	 * The Ant InputHandler class. There may be only one input handler.
@@ -149,6 +149,7 @@
 	/*
 	 * Helper method to ensure an array is converted into an ArrayList.
 	 */
+	@SuppressWarnings("unused")
 	static ArrayList<String> getArrayList(String[] args) {
 		if (args == null) {
 			return null;
@@ -156,7 +157,7 @@
 		// We could be using Arrays.asList() here, but it does not specify
 		// what kind of list it will return. We need a list that
 		// implements the method List.remove(Object) and ArrayList does.
-		ArrayList<String> result = new ArrayList<>(args.length);
+		ArrayList<String> result = new ArrayList<String>(args.length);
 		for (int i = 0; i < args.length; i++) {
 			result.add(args[i]);
 		}
@@ -243,6 +244,7 @@
 	 * @param project
 	 *            the project to list targets from
 	 */
+	@SuppressWarnings("unused")
 	private void printTargets(Project project) {
 		// notify the logger that project help message are coming
 		// since there is no buildstarted or targetstarted to
@@ -256,9 +258,9 @@
 		Target currentTarget;
 		// split the targets in top-level and sub-targets depending
 		// on the presence of a description
-		List<String> topNames = new ArrayList<>();
-		List<String> topDescriptions = new ArrayList<>();
-		List<String> subNames = new ArrayList<>();
+		List<String> topNames = new ArrayList<String>();
+		List<String> topDescriptions = new ArrayList<String>();
+		List<String> subNames = new ArrayList<String>();
 
 		while (ptargets.hasMoreElements()) {
 			currentTarget = ptargets.nextElement();
@@ -281,13 +283,13 @@
 
 		String defaultTargetName = project.getDefaultTarget();
 		if (defaultTargetName != null && !IAntCoreConstants.EMPTY_STRING.equals(defaultTargetName)) { // shouldn't need to check but...
-			List<String> defaultName = new ArrayList<>(1);
+			List<String> defaultName = new ArrayList<String>(1);
 			List<String> defaultDesc = null;
 			defaultName.add(defaultTargetName);
 
 			int indexOfDefDesc = topNames.indexOf(defaultTargetName);
 			if (indexOfDefDesc >= 0) {
-				defaultDesc = new ArrayList<>(1);
+				defaultDesc = new ArrayList<String>(1);
 				defaultDesc.add(topDescriptions.get(indexOfDefDesc));
 			}
 			printTargets(project, defaultName, defaultDesc, RemoteAntMessages.getString("InternalAntRunner.Default_target__3"), maxLength); //$NON-NLS-1$
@@ -337,6 +339,7 @@
 	/*
 	 * Note that the list passed to this method must support List#remove(Object)
 	 */
+	@SuppressWarnings("unused")
 	private void run(List<String> argList) {
 		setCurrentProject(new Project());
 		if (isVersionCompatible("1.6.3")) { //$NON-NLS-1$
@@ -442,7 +445,7 @@
 			System.setSecurityManager(new AntSecurityManager(originalSM, Thread.currentThread()));
 
 			if (targets == null) {
-				targets = new Vector<>(1);
+				targets = new Vector<String>(1);
 			}
 			if (targets.isEmpty() && getCurrentProject().getDefaultTarget() != null) {
 				targets.add(getCurrentProject().getDefaultTarget());
@@ -658,7 +661,8 @@
 	 */
 	private String getAntVersionNumber() throws BuildException {
 		if (antVersionNumber == null) {
-			try (InputStream in = Main.class.getResourceAsStream("/org/apache/tools/ant/version.txt")) {//$NON-NLS-1$
+			try {
+				InputStream in = Main.class.getResourceAsStream("/org/apache/tools/ant/version.txt");//$NON-NLS-1$
 				Properties props = new Properties();
 				props.load(in);
 				String versionNumber = props.getProperty("VERSION"); //$NON-NLS-1$
@@ -683,6 +687,7 @@
 		return version.compareTo(comparison) >= 0;
 	}
 
+	@SuppressWarnings("unused")
 	private boolean preprocessCommandLine(List<String> commands) {
 
 		String arg = getArgument(commands, "-listener"); //$NON-NLS-1$
@@ -691,7 +696,7 @@
 				throw new BuildException(RemoteAntMessages.getString("InternalAntRunner.You_must_specify_a_classname_when_using_the_-listener_argument_1")); //$NON-NLS-1$
 			}
 			if (buildListeners == null) {
-				buildListeners = new ArrayList<>(1);
+				buildListeners = new ArrayList<String>(1);
 			}
 			buildListeners.add(arg);
 			arg = getArgument(commands, "-listener"); //$NON-NLS-1$
@@ -844,11 +849,12 @@
 		return true;
 	}
 
+	@SuppressWarnings("unused")
 	private void processTasksAndTypes(List<String> commands) {
 		String arg = getArgument(commands, "-eclipseTask"); //$NON-NLS-1$
 		while (arg != null) {
 			if (eclipseSpecifiedTasks == null) {
-				eclipseSpecifiedTasks = new HashMap<>();
+				eclipseSpecifiedTasks = new HashMap<String, String>();
 			}
 			int index = arg.indexOf(',');
 			if (index != -1) {
@@ -862,7 +868,7 @@
 		arg = getArgument(commands, "-eclipseType"); //$NON-NLS-1$
 		while (arg != null) {
 			if (eclipseSpecifiedTypes == null) {
-				eclipseSpecifiedTypes = new HashMap<>();
+				eclipseSpecifiedTypes = new HashMap<String, String>();
 			}
 			int index = arg.indexOf(',');
 			if (index != -1) {
@@ -908,9 +914,10 @@
 	/*
 	 * Checks for targets specified at the command line.
 	 */
+	@SuppressWarnings("unused")
 	private void processTargets(List<String> commands) {
 		if (targets == null) {
-			targets = new Vector<>(commands.size());
+			targets = new Vector<String>(commands.size());
 		}
 		for (String string : commands) {
 			targets.add(string);
@@ -982,6 +989,7 @@
 		return exceptionToBeThrown;
 	}
 
+	@SuppressWarnings("unused")
 	private void processMinusDProperties(List<String> commands) {
 		String[] args = commands.toArray(new String[commands.size()]);
 		for (int i = 0; i < args.length; i++) {
@@ -1003,7 +1011,7 @@
 					continue;
 				}
 				if (userProperties == null) {
-					userProperties = new HashMap<>();
+					userProperties = new HashMap<String, String>();
 				}
 				userProperties.put(name, value);
 				commands.remove(args[i]);
@@ -1169,18 +1177,20 @@
 	/**
 	 * Load all properties from the files specified by -propertyfile.
 	 */
+	@SuppressWarnings("unused")
 	private void loadPropertyFiles() {
 		for (String filename : propertyFiles) {
 			File file = getFileRelativeToBaseDir(filename);
 			Properties props = new Properties();
-			try (FileInputStream fis = new FileInputStream(file)) {
+			try {
+				FileInputStream fis = new FileInputStream(file);
 				props.load(fis);
 			}
 			catch (IOException e) {
 				fEarlyErrorMessage = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Could_not_load_property_file_{0}__{1}_4"), new Object[] { filename, e.getMessage() }); //$NON-NLS-1$
 			}
 			if (userProperties == null) {
-				userProperties = new HashMap<>();
+				userProperties = new HashMap<String, String>();
 			}
 			Enumeration<?> propertyNames = props.propertyNames();
 			while (propertyNames.hasMoreElements()) {
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBuildLogger.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBuildLogger.java
index 013560b..9e6a475 100644
--- a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBuildLogger.java
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBuildLogger.java
@@ -28,9 +28,9 @@
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.Target;
 import org.apache.tools.ant.util.StringUtils;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.launching.debug.AntDebugState;
 import org.eclipse.ant.internal.launching.remote.AntSecurityException;
+import org.eclipse.ant.internal.launching.remote.IAntCoreConstants;
 import org.eclipse.ant.internal.launching.remote.InternalAntRunner;
 import org.eclipse.ant.internal.launching.remote.RemoteAntMessages;
 
@@ -254,6 +254,7 @@
 	 * 
 	 * @see org.apache.tools.ant.BuildListener#messageLogged(org.apache.tools.ant.BuildEvent)
 	 */
+	@SuppressWarnings("unused")
 	@Override
 	public void messageLogged(BuildEvent event) {
 		if (event.getPriority() > msgOutputLevel && event.getPriority() != InternalAntRunner.MSG_PROJECT_HELP) {
@@ -270,7 +271,7 @@
 				return;
 			}
 			if (fEventQueue == null) {
-				fEventQueue = new ArrayList<>(10);
+				fEventQueue = new ArrayList<BuildEvent>(10);
 			}
 			fEventQueue.add(event);
 			return;
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntDebugBuildLogger.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntDebugBuildLogger.java
index 688a926..984954e 100644
--- a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntDebugBuildLogger.java
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntDebugBuildLogger.java
@@ -360,9 +360,10 @@
 		sendRequestResponse(propertiesRepresentation.toString());
 	}
 
+	@SuppressWarnings("unused")
 	protected void addBreakpoint(String breakpointRepresentation) {
 		if (fBreakpoints == null) {
-			fBreakpoints = new ArrayList<>();
+			fBreakpoints = new ArrayList<RemoteAntBreakpoint>();
 		}
 		RemoteAntBreakpoint newBreakpoint = new RemoteAntBreakpoint(breakpointRepresentation);
 		if (!fBreakpoints.contains(newBreakpoint)) {
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchDelegate.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchDelegate.java
index 13739ba..6501c24 100644
--- a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchDelegate.java
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchDelegate.java
@@ -129,8 +129,11 @@
 				}
 				// int ver = (int) (CompilerOptions.versionToJdkLevel(vmver) >>> 16);
 				if (JavaCore.compareJavaVersions(vmver, JavaCore.VERSION_1_7) < 0) {
-					IStatus status = new Status(IStatus.ERROR, AntLaunching.PLUGIN_ID, 1, AntLaunchConfigurationMessages.AntLaunchDelegate_Launching__0__2, null);
-					throw new CoreException(status);
+					boolean useDefault = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, true);
+					if (useDefault) { // Java 1.7 and above is required if Default Ant Home is used
+						IStatus status = new Status(IStatus.ERROR, AntLaunching.PLUGIN_ID, 1, AntLaunchConfigurationMessages.AntLaunchDelegate_Launching__0__2, null);
+						throw new CoreException(status);
+					}
 				}
 			}
 		}
diff --git a/ant/org.eclipse.ant.ui/.externalToolBuilders/Build Remote Ant JAR.launch b/ant/org.eclipse.ant.ui/.externalToolBuilders/Build Remote Ant JAR.launch
index 82c5814..34b0c7f 100644
--- a/ant/org.eclipse.ant.ui/.externalToolBuilders/Build Remote Ant JAR.launch
+++ b/ant/org.eclipse.ant.ui/.externalToolBuilders/Build Remote Ant JAR.launch
@@ -1,16 +1,16 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,clean"/>
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;workingSet&quot; editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml&quot; type=&quot;1&quot;/&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.ui/Common Ant Support&quot; type=&quot;2&quot;/&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.ui/Remote Ant Support&quot; type=&quot;2&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;&#10;}"/>
-<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean,"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml}"/>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_RUN_IN_BACKGROUND" value="false"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>

+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">

+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="after_clean,"/>

+<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="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;resources&gt;&#13;&#10;&lt;item path=&quot;/org.eclipse.ant.ui&quot; type=&quot;4&quot;/&gt;&#13;&#10;&lt;/resources&gt;}"/>

+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>

+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>

+<booleanAttribute key="org.eclipse.debug.ui.ATTR_RUN_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.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;resources&gt;&#13;&#10;&lt;item path=&quot;/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml&quot; type=&quot;1&quot;/&gt;&#13;&#10;&lt;item path=&quot;/org.eclipse.ant.ui/Common Ant Support&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;item path=&quot;/org.eclipse.ant.ui/Remote Ant Support&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/resources&gt;}"/>

+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml}"/>

+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>

+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>

+</launchConfiguration>

diff --git a/ant/org.eclipse.ant.ui/.gitignore b/ant/org.eclipse.ant.ui/.gitignore
index 1f570d2..340326b 100644
--- a/ant/org.eclipse.ant.ui/.gitignore
+++ b/ant/org.eclipse.ant.ui/.gitignore
@@ -1,4 +1,4 @@
-lib
+lib/antrunner.jar
 temp.folder
 antui.jar
 ant_runner_support_bin
diff --git a/ant/org.eclipse.ant.ui/.project b/ant/org.eclipse.ant.ui/.project
index b8a58f6..f3354d3 100644
--- a/ant/org.eclipse.ant.ui/.project
+++ b/ant/org.eclipse.ant.ui/.project
@@ -31,6 +31,7 @@
 		</buildCommand>
 		<buildCommand>
 			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+			<triggers>auto,full,incremental,</triggers>
 			<arguments>
 				<dictionary>
 					<key>LaunchConfigHandle</key>
diff --git a/ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF b/ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF
index c5e8b97..dec8d73 100644
--- a/ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF
+++ b/ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ant.ui; singleton:=true
-Bundle-Version: 3.6.200.qualifier
+Bundle-Version: 3.6.201.qualifier
 Bundle-Activator: org.eclipse.ant.internal.ui.AntUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java b/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java
index feacb86..a38c107 100644
--- a/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java
+++ b/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java
@@ -146,7 +146,7 @@
 
 		String value = null;
 		try {
-			fRequest.getClass().getMethod("getDefaultValue", new Class[0]); //$NON-NLS-1$
+			fRequest.getClass().getMethod("getDefaultValue", new Class<?>[0]); //$NON-NLS-1$
 			value = fRequest.getDefaultValue();
 		}
 		catch (SecurityException e) {
diff --git a/ant/org.eclipse.ant.ui/build.properties b/ant/org.eclipse.ant.ui/build.properties
index 5e71279..188b32f 100644
--- a/ant/org.eclipse.ant.ui/build.properties
+++ b/ant/org.eclipse.ant.ui/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2015 IBM Corporation and others.
+# Copyright (c) 2000, 2016 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -13,10 +13,13 @@
                    Ant Editor/
 source.lib/antrunner.jar = Ant Runner Support/
 output.lib/antrunner.jar = ant_runner_support_bin/
-source.lib/remoteAnt.jar = Remote Ant Support/
-output.lib/remoteAnt.jar = remote_support_bin/
+# Compiled with 1.6 locally, see bug 495617:
+#source.lib/remoteAnt.jar = Remote Ant Support/
+#output.lib/remoteAnt.jar = remote_support_bin/
 src.includes = about.html,\
-               about_files/
+               about_files/,\
+               Remote Ant Support/
+
 bin.includes = icons/,\
                plugin.properties,\
                plugin.xml,\
@@ -28,5 +31,6 @@
                lib/antrunner.jar,\
                lib/remoteAnt.jar,\
                css/
-jars.compile.order=.,lib/antrunner.jar,lib/remoteAnt.jar
+jars.compile.order=.,lib/antrunner.jar
+# ,lib/remoteAnt.jar
 javacWarnings..=-unavoidableGenericProblems
diff --git a/ant/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml b/ant/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml
index 0444ef6..7dd1225 100644
--- a/ant/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml
+++ b/ant/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    Copyright (c) 2005, 2013 IBM Corporation and others.
+    Copyright (c) 2005, 2016 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
     which accompanies this distribution, and is available at
@@ -14,28 +14,39 @@
 
 	<target name="build" description="Cleans, builds and refreshes" depends="clean, lib/remoteAntLib.jar"/>
 	
-	<target name="init">
+	<target name="init" depends="properties">
 		<property name="temp.folder" value="${basedir}/temp.folder"/>
 		<property name="build.result.folder" value="${basedir}"/>
-		<property name="version.suffix" value="_3.1.0"/>
-		<property name="win32.jar" value="${eclipse.home}/plugins/org.eclipse.swt.win32.win32.x86${version.suffix}.jar"/>
-		<property name="gtk.jar" value="${eclipse.home}/plugins/org.eclipse.swt.gtk.linux.x86${version.suffix}.jar"/>
-		<property name="motif.jar" value="${eclipse.home}/plugins/org.eclipse.swt.motif${version.suffix}.jar"/>
-		<property name="osx.jar" value="${eclipse.home}/plugins/org.eclipse.swt.carbon.macosx.ppc${version.suffix}.jar"/>
-		<available file="${win32.jar}" property="swt.jar" value="${win32.jar}"/>
-		<available file="${gtk.jar}" property="swt.jar" value="${gtk.jar}"/>
-		<available file="${motif.jar}" property="swt.jar" value="${motif.jar}"/>
-		<available file="${osx.jar}" property="swt.jar" value="${osx.jar}"/>
 	</target>
-
+	
+	<target name="properties" if="eclipse.running">
+		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+	</target>
+	
 	<target name="lib/remoteAntLib.jar" description= "Creates the remoteAnt.jar" depends="init">
 		<property name="destdir" value="${temp.folder}/lib/remoteAnt.jar.bin"/>
 		<delete dir="${destdir}"/>
 		<mkdir dir="${destdir}"/>
-		<!-- copy necessary resources -->
-		<copy todir="${destdir}">
-			<fileset dir="${basedir}/remote_support_bin/"/>
-		</copy>
+		<javac target="1.6" source="1.6" destdir="${destdir}" failonerror="true" verbose="false" debug="on" includeAntRuntime="yes">
+			<src path="${basedir}/Remote Ant Support"/>
+			<compilerarg value="-Xlint"/>
+			<classpath>
+				<dirset dir="${basedir}/..">
+					<include name="org.eclipse.ant.launching/common_bin"/>
+				</dirset>
+				<dirset dir="${basedir}/../../..">
+					<include name="eclipse.platform.swt/bundles/org.eclipse.swt/bin"/>
+				</dirset>
+				
+				<fileset dir="${eclipse.home}">
+					<include name="plugins/org.eclipse.swt*.jar"/>
+					<include name="plugins/org.eclipse.ant.launching*.jar"/>
+				</fileset>
+			</classpath>
+		</javac>
+		<copy file="${basedir}/remote_support_bin/META-INF/eclipse.inf" tofile="${destdir}/META-INF/eclipse.inf"/>
+		<copy file="${basedir}/remote_support_bin/org/eclipse/ant/internal/ui/antsupport/inputhandler/RemoteAntMessages.properties" tofile="${destdir}/org/eclipse/ant/internal/ui/antsupport/inputhandler/RemoteAntMessages.properties"/>
+		
 		<mkdir dir="${build.result.folder}/lib"/>
 		<jar destfile="${build.result.folder}/lib/remoteAnt.jar" basedir="${destdir}"/>
 		<delete dir="${temp.folder}"/>
@@ -45,4 +56,8 @@
 		<delete file="${build.result.folder}/lib/remoteAnt.jar"/>
 		<delete dir="${temp.folder}"/>
 	</target>
+	
+	<!-- Empty target for "After a Clean" task (we don't want to rebuild the Jar here, e.g. on checkout). -->
+	<target name="after_clean"/>
+	
 </project>
diff --git a/ant/org.eclipse.ant.ui/lib/remoteAnt.jar b/ant/org.eclipse.ant.ui/lib/remoteAnt.jar
new file mode 100644
index 0000000..34e0d18
--- /dev/null
+++ b/ant/org.eclipse.ant.ui/lib/remoteAnt.jar
Binary files differ
diff --git a/ant/org.eclipse.ant.ui/pom.xml b/ant/org.eclipse.ant.ui/pom.xml
index 35584d3..fbbabe7 100644
--- a/ant/org.eclipse.ant.ui/pom.xml
+++ b/ant/org.eclipse.ant.ui/pom.xml
@@ -19,7 +19,7 @@
   </parent>
   <groupId>org.eclipse.ant</groupId>
   <artifactId>org.eclipse.ant.ui</artifactId>
-  <version>3.6.200-SNAPSHOT</version>
+  <version>3.6.201-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
   <properties>
     <defaultSigning-excludeInnerJars>true</defaultSigning-excludeInnerJars>