costin 2002/12/28 08:17:07 Modified: src/main/org/apache/tools/ant/taskdefs ImportTask.java Log: Quick fail if ImportTask is used with a ProjectHelper that doesn't support imports. The original helper won't work ( because of eval order ), and embed will fail too ( since it can't use 1.6 features - one of the goals is to work in ant1.5 ). I'm ready to move the dynamic properties and the component hooks - I'll porbably do it this weekend ( most people are in vacation, so fewer will feel any breakage ). In any case [embed] should now used only if you want to use (some) new features in ant1.5. Revision Changes Path 1.3 +5 -0 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ImportTask.java Index: ImportTask.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ImportTask.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ImportTask.java 27 Dec 2002 17:59:40 -0000 1.2 +++ ImportTask.java 28 Dec 2002 16:17:07 -0000 1.3 @@ -100,6 +100,11 @@ ProjectHelper helper= (ProjectHelper)project.getReference("ant.projectHelper"); Vector importStack=helper.getImportStack(); + if( importStack.size() == 0) { + // this happens if ant is used with a project + // helper that doesn't set the import. + throw new BuildException("import requires support in ProjectHelper"); + } Object currentSource=importStack.elementAt(importStack.size() - 1); // ProjectHelper2.AntXmlContext context;
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>