[MINVOKER-311] Override reports directory in IT test
Additionally in order to fix build:
- remove wrongPropertyInterpolation - there are no assertions
- add streamLogsOnFailures to see errors in tests
diff --git a/pom.xml b/pom.xml
index d9f0640..5061863 100644
--- a/pom.xml
+++ b/pom.xml
@@ -359,6 +359,9 @@
<properties>
<maven.compiler.source>${maven.compiler.source}</maven.compiler.source>
<maven.compiler.target>${maven.compiler.target}</maven.compiler.target>
+ <!-- in order to stop Jenkins to recognized reports from test as project report -->
+ <invoker.reportsDirectory>target/invoker-reports-test</invoker.reportsDirectory>
+ <invoker.streamLogsOnFailures>true</invoker.streamLogsOnFailures>
</properties>
<scriptVariables>
<projectVersion>${project.version}</projectVersion>
diff --git a/src/it/MINVOKER-196_junit_report_file/verify.groovy b/src/it/MINVOKER-196_junit_report_file/verify.groovy
index df3402f..34fb6f1 100644
--- a/src/it/MINVOKER-196_junit_report_file/verify.groovy
+++ b/src/it/MINVOKER-196_junit_report_file/verify.groovy
@@ -19,7 +19,7 @@
File buildLog = new File( basedir, 'build.log' )
assert buildLog.text.contains( '[INFO] run post-build script verify.groovy' )
-File invokerReports = new File( new File(basedir, "target"), 'invoker-reports' )
+File invokerReports = new File( new File(basedir, "target"), 'invoker-reports-test' )
assert invokerReports.exists()
// test on first project
diff --git a/src/it/MINVOKER-288-failed-setup-run/verify.groovy b/src/it/MINVOKER-288-failed-setup-run/verify.groovy
index 92bed15..5aac8b5 100644
--- a/src/it/MINVOKER-288-failed-setup-run/verify.groovy
+++ b/src/it/MINVOKER-288-failed-setup-run/verify.groovy
@@ -18,7 +18,7 @@
*/
-File invokerReports = new File( new File(basedir, 'target'), 'invoker-reports' )
+File invokerReports = new File( new File(basedir, 'target'), 'invoker-reports-test' )
assert invokerReports.exists()
def build1 = new XmlSlurper().parse( new File( invokerReports, 'BUILD-project1.xml' ) )
diff --git a/src/it/MINVOKER-288-failed-setup-verify/verify.groovy b/src/it/MINVOKER-288-failed-setup-verify/verify.groovy
index 450fd57..991388b 100644
--- a/src/it/MINVOKER-288-failed-setup-verify/verify.groovy
+++ b/src/it/MINVOKER-288-failed-setup-verify/verify.groovy
@@ -18,7 +18,7 @@
*/
-File invokerReports = new File( new File(basedir, "target"), 'invoker-reports' )
+File invokerReports = new File( new File(basedir, "target"), 'invoker-reports-test' )
assert invokerReports.exists()
def build1 = new XmlSlurper().parse( new File( invokerReports, "BUILD-project1.xml" ) )
diff --git a/src/it/invocation-cmdline-exclude/verify.groovy b/src/it/invocation-cmdline-exclude/verify.groovy
index aab48ab..ee8a8f9 100644
--- a/src/it/invocation-cmdline-exclude/verify.groovy
+++ b/src/it/invocation-cmdline-exclude/verify.groovy
@@ -16,6 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-assert new File(basedir, 'target/invoker-reports/BUILD-minvoker-140-executable.xml').exists()
-assert !new File(basedir, 'target/invoker-reports/BUILD-minvoker-140-ignorable.xml').exists()
+assert new File(basedir, 'target/invoker-reports-test/BUILD-minvoker-140-executable.xml').exists()
+assert !new File(basedir, 'target/invoker-reports-test/BUILD-minvoker-140-ignorable.xml').exists()
diff --git a/src/it/project-setup/verify.bsh b/src/it/project-setup/verify.bsh
index 59a985d..d6d8643 100644
--- a/src/it/project-setup/verify.bsh
+++ b/src/it/project-setup/verify.bsh
@@ -59,7 +59,7 @@
return false;
}
- File reportFile = new File( basedir, "target/invoker-reports/BUILD-project1.xml" );
+ File reportFile = new File( basedir, "target/invoker-reports-test/BUILD-project1.xml" );
if ( !reportFile.exists() )
{
System.out.println( "reportFile not exists FAILED!" );
diff --git a/src/it/script-streamLogs-false/pom.xml b/src/it/script-streamLogs-false/pom.xml
index 335bad2..268e3eb 100644
--- a/src/it/script-streamLogs-false/pom.xml
+++ b/src/it/script-streamLogs-false/pom.xml
@@ -49,6 +49,7 @@
</goals>
<ignoreFailures>true</ignoreFailures>
<streamLogs>false</streamLogs>
+ <streamLogsOnFailures>false</streamLogsOnFailures>
</configuration>
<executions>
<execution>
diff --git a/src/it/script-streamLogs-true/pom.xml b/src/it/script-streamLogs-true/pom.xml
index 30cb74b..52fd744 100644
--- a/src/it/script-streamLogs-true/pom.xml
+++ b/src/it/script-streamLogs-true/pom.xml
@@ -49,6 +49,7 @@
</goals>
<ignoreFailures>true</ignoreFailures>
<streamLogs>true</streamLogs>
+ <streamLogsOnFailures>false</streamLogsOnFailures>
</configuration>
<executions>
<execution>
diff --git a/src/it/selector-scripts/setup.groovy b/src/it/selector-scripts/setup.groovy
index ac78115..054111a 100644
--- a/src/it/selector-scripts/setup.groovy
+++ b/src/it/selector-scripts/setup.groovy
@@ -21,7 +21,7 @@
// Previous potential target 'content' has impact on IT execution
// (Some new file should be created by verify.sh)
-FileUtils.deleteQuietly( new File( basedir, "target/invoker-reports" ) );
+FileUtils.deleteQuietly( new File( basedir, "target/invoker-reports-test" ) );
FileUtils.deleteQuietly( new File( basedir, "src/it/script-ret-quiet/target" ) );
FileUtils.deleteQuietly( new File( basedir, "src/it/script-ret-true/target" ) );
return true;
diff --git a/src/it/selector-scripts/verify.bsh b/src/it/selector-scripts/verify.bsh
index 422b5d9..6202104 100644
--- a/src/it/selector-scripts/verify.bsh
+++ b/src/it/selector-scripts/verify.bsh
@@ -57,8 +57,8 @@
}
String[] success = {
- "target/invoker-reports/BUILD-script-ret-true.xml",
- "target/invoker-reports/BUILD-script-ret-quiet.xml",
+ "target/invoker-reports-test/BUILD-script-ret-true.xml",
+ "target/invoker-reports-test/BUILD-script-ret-quiet.xml",
};
for ( String file : success )
{
@@ -73,8 +73,8 @@
}
String[] skipped = {
- "target/invoker-reports/BUILD-script-ret-false.xml",
- "target/invoker-reports/BUILD-script-ret-other.xml",
+ "target/invoker-reports-test/BUILD-script-ret-false.xml",
+ "target/invoker-reports-test/BUILD-script-ret-other.xml",
};
for ( String file : skipped )
{
@@ -90,7 +90,7 @@
String[] inerror = {
- "target/invoker-reports/BUILD-script-throw.xml",
+ "target/invoker-reports-test/BUILD-script-throw.xml",
};
for ( String file : inerror )
{
diff --git a/src/it/wrongPropertyInterpolation/invoker.properties b/src/it/wrongPropertyInterpolation/invoker.properties
deleted file mode 100644
index 353946b..0000000
--- a/src/it/wrongPropertyInterpolation/invoker.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-invoker.goals = verify
diff --git a/src/it/wrongPropertyInterpolation/pom.xml b/src/it/wrongPropertyInterpolation/pom.xml
deleted file mode 100644
index 03eab80..0000000
--- a/src/it/wrongPropertyInterpolation/pom.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?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/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.maven.plugins.invoker.its</groupId>
- <artifactId>maven-wrong-interpolation-test</artifactId>
- <version>0.1-SNAPSHOT</version>
- <name>Maven Property Interpolation Test</name>
- <description>Maven Invoker tests for property interpolation</description>
-
- <url>https://issues.apache.org/jira/browse/MINVOKER-194</url>
-
- <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>
- <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
- <postBuildHookScript>verify</postBuildHookScript>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>install</goal>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/src/it/wrongPropertyInterpolation/src/it/project/invoker.properties b/src/it/wrongPropertyInterpolation/src/it/project/invoker.properties
deleted file mode 100644
index 2697e8a..0000000
--- a/src/it/wrongPropertyInterpolation/src/it/project/invoker.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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.
-
-invoker.name=wrong property interpolation
-invoker.goals=org.apache.maven.plugins:maven-project-info-reports-plugin:2.8:summary help:effective-pom -Doutput=effective-pom.xml
diff --git a/src/it/wrongPropertyInterpolation/src/it/project/pom.xml b/src/it/wrongPropertyInterpolation/src/it/project/pom.xml
deleted file mode 100644
index 9902483..0000000
--- a/src/it/wrongPropertyInterpolation/src/it/project/pom.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?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/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.maven.invoker.its.it</groupId>
- <artifactId>maven-prop-interpolation</artifactId>
- <version>0.1-SNAPSHOT</version>
- <packaging>jar</packaging>
- <properties>
- <maven.compiler.source>1.3</maven.compiler.source>
- <maven.compiler.target>1.3</maven.compiler.target>
- <!-- <maven.compiler.target>${maven.compiler.source}</maven.compiler.target> -->
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>com.soebes.maven.plugins</groupId>
- <artifactId>echo-maven-plugin</artifactId>
- <version>0.2</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>echo</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <echos>
- <echo>maven.compiler.source: ${maven.compiler.source}</echo>
- <echo>maven.compiler.target: ${maven.compiler.target}</echo>
- </echos>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>