This is an automated email from the ASF dual-hosted git repository. zregvart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 95f5438fbc447f529ba235d1239b0edecc2bfc74 Author: Zoran Regvart <zregv...@apache.org> AuthorDate: Tue Feb 20 08:26:53 2018 +0100 Make olingo2 test setup deterministic `camel-olingo2-component` needs a generated sample project for tests, this is done in a separate profile that is active by default, this poses an issue if the generated project already exists. This adds maven-clean-plugin execution to remove that sample project if it already exists. Now the test should be deterministic and should not fail the build regardless of the existence of the sample project. --- .../camel-olingo2/camel-olingo2-component/pom.xml | 30 ++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/components/camel-olingo2/camel-olingo2-component/pom.xml b/components/camel-olingo2/camel-olingo2-component/pom.xml index a803858..5ca1d85 100644 --- a/components/camel-olingo2/camel-olingo2-component/pom.xml +++ b/components/camel-olingo2/camel-olingo2-component/pom.xml @@ -284,21 +284,31 @@ If the sample service jar becomes available, we can use it directly --> <id>get-olingo2-sample</id> <activation> - <file> - <missing>${basedir}/target/olingo2-my-car-service</missing> - </file> - <!-- the above condition is evaluated prior to the mvn execution and consequently - it evaluates to false when "mvn clean install" is invoked while the folder exists, - which is correct, yet unfortunate, as the clean phase will remove the folder and - subsequently the source folder is not created. - So, we need activate this profle by default and set -fn option to the mvn below to - ignore the duplicate error ;-(( - --> <activeByDefault>true</activeByDefault> </activation> <build> <plugins> <plugin> + <artifactId>maven-clean-plugin</artifactId> + <executions> + <execution> + <id>clean-olingo2-sample</id> + <phase>generate-test-sources</phase> + <goals> + <goal>clean</goal> + </goals> + <configuration> + <excludeDefaultDirectories>true</excludeDefaultDirectories> + <filesets> + <fileset> + <directory>${project.build.directory}/olingo2-my-car-service</directory> + </fileset> + </filesets> + </configuration> + </execution> + </executions> + </plugin> + <plugin> <groupId>org.codehaus.gmavenplus</groupId> <artifactId>gmavenplus-plugin</artifactId> <version>${gmavenplus-plugin-version}</version> -- To stop receiving notification emails like this one, please contact zregv...@apache.org.