Browse Source

More Ant1 compatability

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272090 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 23 years ago
parent
commit
99f9052c7c
3 changed files with 54 additions and 0 deletions
  1. +1
    -0
      proposal/mutant/build/ant1compat.xml
  2. +36
    -0
      proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java
  3. +17
    -0
      proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/ProjectHelper.java

+ 1
- 0
proposal/mutant/build/ant1compat.xml View File

@@ -62,6 +62,7 @@
<include name="org/apache/tools/ant/AntClassLoader.java"/>
<include name="org/apache/tools/ant/BuildEvent.java"/>
<include name="org/apache/tools/ant/BuildListener.java"/>
<include name="org/apache/tools/ant/BuildLogger.java"/>
<!-- <patternset refid="deprecated"/> -->
<patternset refid="toohard"/>
<patternset refid="converted"/>


+ 36
- 0
proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java View File

@@ -196,6 +196,42 @@ public class Project implements org.apache.ant.common.event.BuildListener {
fileUtils = FileUtils.newFileUtils();
}

/**
* The old constructor fopr Project instances - not used now.
*
* @deprecated
*/
public Project() {
throw new BuildException("Projects can not be constructed to "
+ "invoke Ant");
}
/**
* The old initialisation method for Projects. Not used now
*
* @deprecated
* @exception BuildException if the default task list cannot be loaded
*/
public void init() throws BuildException {
throw new BuildException("Projects can not be initialized in this "
+ "manner any longer.");
}


/**
* Old method used to execute targets
*
* @param targetNames A vector of target name strings to execute.
* Must not be <code>null</code>.
*
* @exception BuildException always
* @deprecated
*/
public void executeTargets(Vector targetNames) throws BuildException {
throw new BuildException("Targets within the project cannot be "
+ "executed with this method.");
}
/**
* static query of the java version
*


+ 17
- 0
proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/ProjectHelper.java View File

@@ -54,6 +54,7 @@
package org.apache.tools.ant;
import java.util.Hashtable;
import java.util.Vector;
import java.io.File;
import org.apache.ant.common.antlib.AntContext;
import org.apache.ant.common.service.DataService;
import org.apache.ant.common.util.AntException;
@@ -131,5 +132,21 @@ public class ProjectHelper {
throw new BuildException(e);
}
}

/**
* Old method to build a project.
*
* @param project The project to configure. Must not be <code>null</code>.
* @param buildFile An XML file giving the project's configuration.
* Must not be <code>null</code>.
*
* @exception BuildException always
* @deprecated
*/
public static void configureProject(Project project, File buildFile)
throws BuildException {
throw new BuildException("Project are not built by ProjectHelper "
+ "any longer.");
}
}


Loading…
Cancel
Save