|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
[gant-scm] [10448] gant/trunk: Applied the change from GANT-111.
by russel-9
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message
Log MessageApplied the change from GANT-111. Modified PathsDiffModified: gant/trunk/releaseNotes.txt (10447 => 10448)--- gant/trunk/releaseNotes.txt 2009-11-10 10:29:38 UTC (rev 10447) +++ gant/trunk/releaseNotes.txt 2009-11-10 10:30:02 UTC (rev 10448) @@ -9,7 +9,10 @@ Altered the Gant Ant task so as to provide an inheritAll attribute. cf. GANT-110. +Switched GantException from extending RuntimeException to extending org.apache.tools.ant.BuildException so +as to allow better consistency with use of Gant from Ant. cf. GANT-111. + 1.8.1 ----- Modified: gant/trunk/src/main/groovy/gant/GantException.groovy (10447 => 10448)--- gant/trunk/src/main/groovy/gant/GantException.groovy 2009-11-10 10:29:38 UTC (rev 10447) +++ gant/trunk/src/main/groovy/gant/GantException.groovy 2009-11-10 10:30:02 UTC (rev 10448) @@ -14,12 +14,19 @@ package gant +// Peter's original extended RuntimeException. GANT-111 introduced the problem that this cauises problems +// for usage with Ant tasks -- where the exception really needs to be a descendent of +// org.apache.tools.ant.BuildException. Making this change should not affect stand alone activity. Thanks +// to Eric Van Dewoestine for providing this change. + +import org.apache.tools.ant.BuildException + /** * Generic Gant exception. * * @author Peter Ledbrook */ -class GantException extends RuntimeException { +class GantException extends /*RuntimeException*/ BuildException { public GantException ( ) { super( ) } public GantException ( String msg ) { super ( msg ) } public GantException ( Exception e ) { super ( e ) } Modified: gant/trunk/src/test/groovy/org/codehaus/gant/ant/tests/Gant_Test.java (10447 => 10448)--- gant/trunk/src/test/groovy/org/codehaus/gant/ant/tests/Gant_Test.java 2009-11-10 10:29:38 UTC (rev 10447) +++ gant/trunk/src/test/groovy/org/codehaus/gant/ant/tests/Gant_Test.java 2009-11-10 10:30:02 UTC (rev 10448) @@ -392,4 +392,13 @@ assertEquals ( " [echo] ${gant.test.inheritAll}" , output.get ( 15 ) ) ; assertEquals ( " [echo] gantInheritAllWorks" , output.get ( 18 ) ) ; } + + // For dealing with GANT-111 -- thanks to Eric Van Dewoestine for providing this. + + public void testGantTaskFaile ( ) { + final List<String> result = runAnt ( antFile.getPath ( ) , "gantTestFail" , 1 , true ) ; + assert result.size ( ) == 2 ; + assertEquals ( "\nBUILD FAILED\n: test fail message\n\n\n" , trimTimeFromSuccessfulBuild ( result.get ( 1 ) ) ) ; + } + } Modified: gant/trunk/src/test/groovy/org/codehaus/gant/ant/tests/build.gant (10447 => 10448)--- gant/trunk/src/test/groovy/org/codehaus/gant/ant/tests/build.gant 2009-11-10 10:29:38 UTC (rev 10447) +++ gant/trunk/src/test/groovy/org/codehaus/gant/ant/tests/build.gant 2009-11-10 10:30:02 UTC (rev 10448) @@ -65,4 +65,10 @@ echo ( message : '${gant.test.inheritAll}' ) } +// For dealing with GANT-111 -- thanks to Eric Van Dewoestine for providing this. + +target ( testFail : '' ){ + fail ( message : 'test fail message' ) +} + setDefaultTarget ( test ) Modified: gant/trunk/src/test/groovy/org/codehaus/gant/ant/tests/gantTest.xml (10447 => 10448)--- gant/trunk/src/test/groovy/org/codehaus/gant/ant/tests/gantTest.xml 2009-11-10 10:29:38 UTC (rev 10447) +++ gant/trunk/src/test/groovy/org/codehaus/gant/ant/tests/gantTest.xml 2009-11-10 10:30:02 UTC (rev 10448) @@ -71,4 +71,10 @@ <gant file="build.gant" target="gantInheritAll" inheritAll="true"/> </target> + <!-- For GANT-111. Thanks to Eric Van Dewoestine for providing this. --> + + <target name="gantTestFail" depends="-defineGantTask"> + <gant file="build.gant" target="testFail"/> + </target> + </project> To unsubscribe from this list please visit: |
| Free embeddable forum powered by Nabble | Forum Help |