You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2020/12/19 10:12:30 UTC

[maven-invoker-plugin] 01/01: [MINVOKER-260] confirm streamLogs by IT tests

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch MINVOKER-260
in repository https://gitbox.apache.org/repos/asf/maven-invoker-plugin.git

commit bfecb96f148d217d8765fcc6b7644c8fc57d4b24
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Wed Dec 2 01:13:16 2020 +0100

    [MINVOKER-260] confirm streamLogs by IT tests
    
    also resolve: [MINVOKER-265]
    
    Closes #31
---
 src/it/script-streamLogs-false/pom.xml             | 66 ++++++++++++++++++++++
 .../src/it/beanshell/pom.xml                       | 32 +++++++++++
 .../src/it/beanshell/setup.bsh                     | 29 ++++++++++
 .../script-streamLogs-false/src/it/groovy/pom.xml  | 32 +++++++++++
 .../src/it/groovy/setup.groovy                     | 30 ++++++++++
 src/it/script-streamLogs-false/verify.groovy       | 50 ++++++++++++++++
 src/it/script-streamLogs-true/pom.xml              | 66 ++++++++++++++++++++++
 .../src/it/beanshell/pom.xml                       | 32 +++++++++++
 .../src/it/beanshell/setup.bsh                     | 29 ++++++++++
 .../script-streamLogs-true/src/it/groovy/pom.xml   | 32 +++++++++++
 .../src/it/groovy/setup.groovy                     | 30 ++++++++++
 src/it/script-streamLogs-true/verify.groovy        | 49 ++++++++++++++++
 12 files changed, 477 insertions(+)

diff --git a/src/it/script-streamLogs-false/pom.xml b/src/it/script-streamLogs-false/pom.xml
new file mode 100644
index 0000000..335bad2
--- /dev/null
+++ b/src/it/script-streamLogs-false/pom.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.invoker</groupId>
+  <artifactId>script-streamLogs-false</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-invoker-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <writeJunitReport>true</writeJunitReport>
+          <cloneProjectsTo>${project.build.directory}/its</cloneProjectsTo>
+          <pomIncludes>
+            <pomInclude>*/pom.xml</pomInclude>
+          </pomIncludes>
+          <preBuildHookScript>setup</preBuildHookScript>
+          <goals>
+            <goal>validate</goal>
+          </goals>
+          <ignoreFailures>true</ignoreFailures>
+          <streamLogs>false</streamLogs>
+        </configuration>
+        <executions>
+          <execution>
+            <id>integration-test</id>
+            <phase>initialize</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/src/it/script-streamLogs-false/src/it/beanshell/pom.xml b/src/it/script-streamLogs-false/src/it/beanshell/pom.xml
new file mode 100644
index 0000000..f8a5c6a
--- /dev/null
+++ b/src/it/script-streamLogs-false/src/it/beanshell/pom.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>test</groupId>
+  <artifactId>beanshell</artifactId>
+  <version>0.1-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+</project>
diff --git a/src/it/script-streamLogs-false/src/it/beanshell/setup.bsh b/src/it/script-streamLogs-false/src/it/beanshell/setup.bsh
new file mode 100644
index 0000000..5f0bc34
--- /dev/null
+++ b/src/it/script-streamLogs-false/src/it/beanshell/setup.bsh
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.*;
+
+// marker for parent build that this sub build was indeed run
+File touchFile = new File( basedir, "touch.txt" );
+touchFile.createNewFile();
+
+System.out.println("Output form beanshell script");
+
+// BeanShell does not allow us to simply throw an error, so will we try to trigger an OutOfMemoryError...
+long[] arr = new long[ Integer.MAX_VALUE ];
diff --git a/src/it/script-streamLogs-false/src/it/groovy/pom.xml b/src/it/script-streamLogs-false/src/it/groovy/pom.xml
new file mode 100644
index 0000000..b1ba49e
--- /dev/null
+++ b/src/it/script-streamLogs-false/src/it/groovy/pom.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>test</groupId>
+  <artifactId>groovy</artifactId>
+  <version>0.1-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+</project>
diff --git a/src/it/script-streamLogs-false/src/it/groovy/setup.groovy b/src/it/script-streamLogs-false/src/it/groovy/setup.groovy
new file mode 100644
index 0000000..fc18103
--- /dev/null
+++ b/src/it/script-streamLogs-false/src/it/groovy/setup.groovy
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.*;
+
+// marker for parent build that this sub build was indeed run
+File touchFile = new File( basedir, "touch.txt" )
+touchFile.createNewFile()
+
+println("Output from groovy script")
+
+def pom = new File( basedir, "pom.xml" ).text
+assert pom.contains("<modelVersion>9.9.9</modelVersion>")
+
diff --git a/src/it/script-streamLogs-false/verify.groovy b/src/it/script-streamLogs-false/verify.groovy
new file mode 100644
index 0000000..c8e84f2
--- /dev/null
+++ b/src/it/script-streamLogs-false/verify.groovy
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+def FS = File.separator
+
+// make sure the Invoker Plugin was indeed run and the build didn't fail somewhere else,
+// so check if touch.txt exist
+
+assert new File(basedir, 'target/its/beanshell/touch.txt').exists()
+assert new File(basedir, 'target/its/groovy/touch.txt').exists()
+
+// logs
+def buildLog = new File(basedir, 'build.log').text
+def beanshellLog = new File(basedir, 'target/its/beanshell/build.log').text
+def groovyLog = new File(basedir, 'target/its/groovy/build.log').text
+
+// beanshell failed and no log message
+assert !buildLog.contains('[INFO] Output form beanshell script')
+assert buildLog.contains('[INFO]   org.apache.maven.shared.scriptinterpreter.ScriptEvaluationException: java.lang.OutOfMemoryError: Requested array size exceeds VM limit')
+assert buildLog.contains('[INFO]           beanshell' + FS + 'pom.xml ................................ FAILED')
+
+assert beanshellLog.contains('Output form beanshell script')
+assert beanshellLog.contains('java.lang.OutOfMemoryError: Requested array size exceeds VM limit')
+
+// groovy failed and no log message
+assert !buildLog.contains('[INFO] Output from groovy script')
+assert !buildLog.contains('Assertion failed:')
+assert !buildLog.contains('assert pom.contains("<modelVersion>9.9.9</modelVersion>")')
+assert buildLog.contains('[INFO]   org.apache.maven.shared.scriptinterpreter.ScriptEvaluationException: Assertion Error')
+assert buildLog.contains('[INFO]           groovy' + FS + 'pom.xml ................................... FAILED')
+
+assert groovyLog.contains('Output from groovy script')
+assert groovyLog.contains('Assertion failed:')
+assert groovyLog.contains('assert pom.contains("<modelVersion>9.9.9</modelVersion>")')
diff --git a/src/it/script-streamLogs-true/pom.xml b/src/it/script-streamLogs-true/pom.xml
new file mode 100644
index 0000000..30cb74b
--- /dev/null
+++ b/src/it/script-streamLogs-true/pom.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.invoker</groupId>
+  <artifactId>script-streamLogs-true</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-invoker-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <writeJunitReport>true</writeJunitReport>
+          <cloneProjectsTo>${project.build.directory}/its</cloneProjectsTo>
+          <pomIncludes>
+            <pomInclude>*/pom.xml</pomInclude>
+          </pomIncludes>
+          <preBuildHookScript>setup</preBuildHookScript>
+          <goals>
+            <goal>validate</goal>
+          </goals>
+          <ignoreFailures>true</ignoreFailures>
+          <streamLogs>true</streamLogs>
+        </configuration>
+        <executions>
+          <execution>
+            <id>integration-test</id>
+            <phase>initialize</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/src/it/script-streamLogs-true/src/it/beanshell/pom.xml b/src/it/script-streamLogs-true/src/it/beanshell/pom.xml
new file mode 100644
index 0000000..f8a5c6a
--- /dev/null
+++ b/src/it/script-streamLogs-true/src/it/beanshell/pom.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>test</groupId>
+  <artifactId>beanshell</artifactId>
+  <version>0.1-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+</project>
diff --git a/src/it/script-streamLogs-true/src/it/beanshell/setup.bsh b/src/it/script-streamLogs-true/src/it/beanshell/setup.bsh
new file mode 100644
index 0000000..5f0bc34
--- /dev/null
+++ b/src/it/script-streamLogs-true/src/it/beanshell/setup.bsh
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.*;
+
+// marker for parent build that this sub build was indeed run
+File touchFile = new File( basedir, "touch.txt" );
+touchFile.createNewFile();
+
+System.out.println("Output form beanshell script");
+
+// BeanShell does not allow us to simply throw an error, so will we try to trigger an OutOfMemoryError...
+long[] arr = new long[ Integer.MAX_VALUE ];
diff --git a/src/it/script-streamLogs-true/src/it/groovy/pom.xml b/src/it/script-streamLogs-true/src/it/groovy/pom.xml
new file mode 100644
index 0000000..b1ba49e
--- /dev/null
+++ b/src/it/script-streamLogs-true/src/it/groovy/pom.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>test</groupId>
+  <artifactId>groovy</artifactId>
+  <version>0.1-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+</project>
diff --git a/src/it/script-streamLogs-true/src/it/groovy/setup.groovy b/src/it/script-streamLogs-true/src/it/groovy/setup.groovy
new file mode 100644
index 0000000..fc18103
--- /dev/null
+++ b/src/it/script-streamLogs-true/src/it/groovy/setup.groovy
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.*;
+
+// marker for parent build that this sub build was indeed run
+File touchFile = new File( basedir, "touch.txt" )
+touchFile.createNewFile()
+
+println("Output from groovy script")
+
+def pom = new File( basedir, "pom.xml" ).text
+assert pom.contains("<modelVersion>9.9.9</modelVersion>")
+
diff --git a/src/it/script-streamLogs-true/verify.groovy b/src/it/script-streamLogs-true/verify.groovy
new file mode 100644
index 0000000..c56f20d
--- /dev/null
+++ b/src/it/script-streamLogs-true/verify.groovy
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+def FS = File.separator
+
+// make sure the Invoker Plugin was indeed run and the build didn't fail somewhere else,
+// so check if touch.txt exist
+
+assert new File(basedir, 'target/its/beanshell/touch.txt').exists()
+assert new File(basedir, 'target/its/groovy/touch.txt').exists()
+
+// logs
+def buildLog = new File(basedir, 'build.log').text
+def beanshellLog = new File(basedir, 'target/its/beanshell/build.log').text
+def groovyLog = new File(basedir, 'target/its/groovy/build.log').text
+
+// beanshell failed and log message
+assert buildLog.contains('[INFO] Output form beanshell script')
+assert buildLog.contains('java.lang.OutOfMemoryError: Requested array size exceeds VM limit')
+assert buildLog.contains('[INFO]           beanshell' + FS + 'pom.xml ................................ FAILED')
+
+assert beanshellLog.contains('Output form beanshell script')
+assert beanshellLog.contains('java.lang.OutOfMemoryError: Requested array size exceeds VM limit')
+
+// groovy failed and log message
+assert buildLog.contains('[INFO] Output from groovy script')
+assert buildLog.contains('Assertion failed:')
+assert buildLog.contains('assert pom.contains("<modelVersion>9.9.9</modelVersion>")')
+assert buildLog.contains('[INFO]           groovy' + FS + 'pom.xml ................................... FAILED')
+
+assert groovyLog.contains('Output from groovy script')
+assert groovyLog.contains('Assertion failed:')
+assert groovyLog.contains('assert pom.contains("<modelVersion>9.9.9</modelVersion>")')