Re: println weirdness in Build Flow Plugin groovy

2014-02-19 Thread Steve Maring
just for completeness and clarity, this works in a Build Flow DSL ...

public class FooBar {

   private OutputStream out;

   public FooBar(OutputStream out) {
   this.out = out;
   }

   public static void sayFoo(OutputStream out) {
   out.println("Foo");
   }

   public void sayBar() {
   this.out.println("Bar");
   }

}

println("Hello World");
FooBar.sayFoo(out);
FooBar fooBar = new FooBar(out);
fooBar.sayBar();


>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: println weirdness in Build Flow Plugin groovy

2014-02-19 Thread Steve Maring
nvm ... looks like somebody else already found a workaround 
... 
https://groups.google.com/forum/#!searchin/jenkinsci-users/println/jenkinsci-users/mpGF1BJpsaA/phcHtf7stacJ


On Wednesday, February 19, 2014 8:54:14 AM UTC-5, Steve Maring wrote:
>
> If I run this script directly in Groovy 
>
> public class FooBar {
>public static void sayFoo() {
>this.println("Foo");
>}
>public void sayBar() {
>this.println("Bar");
>}
> }
> println("Hello World");
> FooBar.sayFoo();
> FooBar fooBar = new FooBar();
> fooBar.sayBar();
>
>
> It properly outputs:
>
> Hello World
> Foo
> Bar
>
>
> As DSL in a build flow I only get:
>
> Hello World
>
> CloudBees Build Flow 
> plugin  
> v 0.10
>
> What am I doing wrong?
>
> -Steve Maring
> Orlando, FL
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.