git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@720746 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -548,6 +548,9 @@ Other changes: | |||||
| -docfilessubdirs and -excludedocfilessubdir command line arguments. | -docfilessubdirs and -excludedocfilessubdir command line arguments. | ||||
| Bugzilla Report 34455. | Bugzilla Report 34455. | ||||
| * <xslt> now fails early if a specified stylesheet doesn't exist. | |||||
| Bugzilla Report 34525. | |||||
| Changes from Ant 1.7.0 TO Ant 1.7.1 | Changes from Ant 1.7.0 TO Ant 1.7.1 | ||||
| ============================================= | ============================================= | ||||
| @@ -322,6 +322,12 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||||
| } else { | } else { | ||||
| styleResource = xslResource; | styleResource = xslResource; | ||||
| } | } | ||||
| if (!styleResource.isExists()) { | |||||
| throw new BuildException("stylesheet " + styleResource | |||||
| + " doesn't exist."); | |||||
| } | |||||
| // if we have an in file and out then process them | // if we have an in file and out then process them | ||||
| if (inFile != null && outFile != null) { | if (inFile != null && outFile != null) { | ||||
| process(inFile, outFile, styleResource); | process(inFile, outFile, styleResource); | ||||
| @@ -66,4 +66,11 @@ undefined='<xsl:value-of select="$undefined"/>' | |||||
| value="set='somevalue'"/> | value="set='somevalue'"/> | ||||
| </target> | </target> | ||||
| <target name="testStyleDoesntExist" depends="setUp"> | |||||
| <au:expectfailure expectedmessage="i-m-not-there.xslt doesn't exist."> | |||||
| <xslt in="${legacy.dir}/data.xml" | |||||
| out="${output}/out.xml" | |||||
| style="i-m-not-there.xslt"/> | |||||
| </au:expectfailure> | |||||
| </target> | |||||
| </project> | </project> | ||||