Re: Cannot run integration tests in maven archetype project with failsave
I tried moving myproject/myproject-api-impl/src/test to myproject/src/test. But the tests are not found ([INFO] No tests to run.). The reason could be that there is no source folder indented in the root project folder, I had to create it. The failsave tests, though, are configured in the root pom.xml (not within the module myproject-api-impl/pom.xml). Martin Am 13.03.2015 um 09:34 schrieb Sandra Parsick: I would move the integration tests from myproject-api-impl to the war module Regards, Sandra Am 13.03.2015 um 09:18 schrieb Martin Gütlein: The failsave integration tests do not run. They should be applied to the whole service (war). But they are defined within a module (myproject-api-impl) and are therefore skipped. I could not figure out how to configure this. Martin Am 13.03.2015 um 09:00 schrieb Hervé BOUTEMY: sorry, can't understand the case: problem when building the archetype? with project generated from archetype? Regards, Hervé Le vendredi 13 mars 2015 08:54:06 Martin Gütlein a écrit : Anyone? Where could I get some help on this issue (already tried stackoverflow as well)? Martin Am 10.03.2015 um 19:59 schrieb Martin Gütlein: Hi, I would like to run integration tests on my project, performing and testing rest-calls to my server. I have a maven project layout like with modules: MyProject-api MyProject-api-impl MyProject-webapp MyProject-webapp-exec MyProject-webapp-it (see https://tomcat.apache.org/maven-plugin-2.0-beta-1/archetype.html) The IT tests are defined in MyProject-api-impl/src/test/java/.../..IT.java This may be part of the problem, because they should be applied not only to the project-api-impl, but to the entire project. How can I specify this? Kind regards, Martin I'll post parts of my pom.xml at the end of this mail. When I run mvn verify the output looks like this: $ mvn clean verify [INFO] Scanning for projects... [INFO] [INFO] Reactor Build Order: [INFO] [INFO] MyProject [INFO] MyProject-api [INFO] MyProject-api-impl [INFO] MyProject-webapp [INFO] MyProject-webapp-exec [INFO] [INFO] [INFO] Building MyProject 0.2 [INFO] [INFO] ... [INFO] [INFO] --- tomcat7-maven-plugin:2.0:run-war-only (tomcat7-run) @ MyProject --- [INFO] Skipping non-war project [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:integration-test (default) @ MyProject --- [INFO] No tests to run. [INFO] [INFO] --- tomcat7-maven-plugin:2.0:shutdown (tomcat7-shutdown) @ MyProject --- [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:verify (default) @ MyProject --- [INFO] No tests to run. [INFO] [INFO] [INFO] Building MyProject-api 0.2 [INFO] [INFO] [INFO] [INFO] [INFO] Building MyProject-api-impl 0.2 [INFO] [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ MyProject-api-impl --- [INFO] Deleting /home/martin/workspace/myproject/MyProject-api-impl/target [INFO] [INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-java) @ MyProject-api-impl --- [INFO] [INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ MyProject-api-impl --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/martin/workspace/myproject/MyProject-api-impl/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ MyProject-api-impl --- [INFO] Compiling 280 source files to /home/martin/workspace/myproject/MyProject-api-impl/target/classes [INFO] [INFO] --- maven-resources-plugin:2.3:testResources (default-testResources) @ MyProject-api-impl --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/martin/workspace/myproject/MyProject-api-impl/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ MyProject-api-impl --- [INFO] Compiling 4 source files to /home/martin/workspace/myproject/MyProject-api-impl/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.12.3:test (default-test) @ MyProject-api-impl --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:2.2:jar (default-jar) @ MyProject-api-impl --- [INFO] Building jar: /home/martin/workspace/myproject/MyProject-api-impl/target/MyProject-api-i mpl-0.2.jar [INFO] [INFO] --- tomcat7-maven-plugin:2.0:run-war-only (tomcat7-run) @ MyProject-api-impl --- [INFO] Skipping non-war project [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:integration-test (default) @ MyProject-api-impl --- [INFO] Failsafe report directory:
Re: Cannot run integration tests in maven archetype project with failsave
The failsave integration tests do not run. They should be applied to the whole service (war). But they are defined within a module (myproject-api-impl) and are therefore skipped. I could not figure out how to configure this. Martin Am 13.03.2015 um 09:00 schrieb Hervé BOUTEMY: sorry, can't understand the case: problem when building the archetype? with project generated from archetype? Regards, Hervé Le vendredi 13 mars 2015 08:54:06 Martin Gütlein a écrit : Anyone? Where could I get some help on this issue (already tried stackoverflow as well)? Martin Am 10.03.2015 um 19:59 schrieb Martin Gütlein: Hi, I would like to run integration tests on my project, performing and testing rest-calls to my server. I have a maven project layout like with modules: MyProject-api MyProject-api-impl MyProject-webapp MyProject-webapp-exec MyProject-webapp-it (see https://tomcat.apache.org/maven-plugin-2.0-beta-1/archetype.html) The IT tests are defined in MyProject-api-impl/src/test/java/.../..IT.java This may be part of the problem, because they should be applied not only to the project-api-impl, but to the entire project. How can I specify this? Kind regards, Martin I'll post parts of my pom.xml at the end of this mail. When I run mvn verify the output looks like this: $ mvn clean verify [INFO] Scanning for projects... [INFO] [INFO] Reactor Build Order: [INFO] [INFO] MyProject [INFO] MyProject-api [INFO] MyProject-api-impl [INFO] MyProject-webapp [INFO] MyProject-webapp-exec [INFO] [INFO] [INFO] Building MyProject 0.2 [INFO] [INFO] ... [INFO] [INFO] --- tomcat7-maven-plugin:2.0:run-war-only (tomcat7-run) @ MyProject --- [INFO] Skipping non-war project [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:integration-test (default) @ MyProject --- [INFO] No tests to run. [INFO] [INFO] --- tomcat7-maven-plugin:2.0:shutdown (tomcat7-shutdown) @ MyProject --- [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:verify (default) @ MyProject --- [INFO] No tests to run. [INFO] [INFO] [INFO] Building MyProject-api 0.2 [INFO] [INFO] [INFO] [INFO] [INFO] Building MyProject-api-impl 0.2 [INFO] [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ MyProject-api-impl --- [INFO] Deleting /home/martin/workspace/myproject/MyProject-api-impl/target [INFO] [INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-java) @ MyProject-api-impl --- [INFO] [INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ MyProject-api-impl --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/martin/workspace/myproject/MyProject-api-impl/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ MyProject-api-impl --- [INFO] Compiling 280 source files to /home/martin/workspace/myproject/MyProject-api-impl/target/classes [INFO] [INFO] --- maven-resources-plugin:2.3:testResources (default-testResources) @ MyProject-api-impl --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/martin/workspace/myproject/MyProject-api-impl/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ MyProject-api-impl --- [INFO] Compiling 4 source files to /home/martin/workspace/myproject/MyProject-api-impl/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.12.3:test (default-test) @ MyProject-api-impl --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:2.2:jar (default-jar) @ MyProject-api-impl --- [INFO] Building jar: /home/martin/workspace/myproject/MyProject-api-impl/target/MyProject-api-i mpl-0.2.jar [INFO] [INFO] --- tomcat7-maven-plugin:2.0:run-war-only (tomcat7-run) @ MyProject-api-impl --- [INFO] Skipping non-war project [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:integration-test (default) @ MyProject-api-impl --- [INFO] Failsafe report directory: /home/martin/workspace/myproject/MyProject-api-impl/target/failsafe-report s --- T E S T S --- Running org.kramerlab.myproject.api.impl.services.CompoundIT anonymous GET to http://localhost:8080 failed, please start services first! Parts of my pom.xml in the root project folder: build pluginManagement plugins ... plugin groupIdorg.apache.tomcat.maven/groupId
Re: Cannot run integration tests in maven archetype project with failsave
sorry, can't understand the case: problem when building the archetype? with project generated from archetype? Regards, Hervé Le vendredi 13 mars 2015 08:54:06 Martin Gütlein a écrit : Anyone? Where could I get some help on this issue (already tried stackoverflow as well)? Martin Am 10.03.2015 um 19:59 schrieb Martin Gütlein: Hi, I would like to run integration tests on my project, performing and testing rest-calls to my server. I have a maven project layout like with modules: MyProject-api MyProject-api-impl MyProject-webapp MyProject-webapp-exec MyProject-webapp-it (see https://tomcat.apache.org/maven-plugin-2.0-beta-1/archetype.html) The IT tests are defined in MyProject-api-impl/src/test/java/.../..IT.java This may be part of the problem, because they should be applied not only to the project-api-impl, but to the entire project. How can I specify this? Kind regards, Martin I'll post parts of my pom.xml at the end of this mail. When I run mvn verify the output looks like this: $ mvn clean verify [INFO] Scanning for projects... [INFO] [INFO] Reactor Build Order: [INFO] [INFO] MyProject [INFO] MyProject-api [INFO] MyProject-api-impl [INFO] MyProject-webapp [INFO] MyProject-webapp-exec [INFO] [INFO] [INFO] Building MyProject 0.2 [INFO] [INFO] ... [INFO] [INFO] --- tomcat7-maven-plugin:2.0:run-war-only (tomcat7-run) @ MyProject --- [INFO] Skipping non-war project [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:integration-test (default) @ MyProject --- [INFO] No tests to run. [INFO] [INFO] --- tomcat7-maven-plugin:2.0:shutdown (tomcat7-shutdown) @ MyProject --- [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:verify (default) @ MyProject --- [INFO] No tests to run. [INFO] [INFO] [INFO] Building MyProject-api 0.2 [INFO] [INFO] [INFO] [INFO] [INFO] Building MyProject-api-impl 0.2 [INFO] [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ MyProject-api-impl --- [INFO] Deleting /home/martin/workspace/myproject/MyProject-api-impl/target [INFO] [INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-java) @ MyProject-api-impl --- [INFO] [INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ MyProject-api-impl --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/martin/workspace/myproject/MyProject-api-impl/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ MyProject-api-impl --- [INFO] Compiling 280 source files to /home/martin/workspace/myproject/MyProject-api-impl/target/classes [INFO] [INFO] --- maven-resources-plugin:2.3:testResources (default-testResources) @ MyProject-api-impl --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/martin/workspace/myproject/MyProject-api-impl/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ MyProject-api-impl --- [INFO] Compiling 4 source files to /home/martin/workspace/myproject/MyProject-api-impl/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.12.3:test (default-test) @ MyProject-api-impl --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:2.2:jar (default-jar) @ MyProject-api-impl --- [INFO] Building jar: /home/martin/workspace/myproject/MyProject-api-impl/target/MyProject-api-i mpl-0.2.jar [INFO] [INFO] --- tomcat7-maven-plugin:2.0:run-war-only (tomcat7-run) @ MyProject-api-impl --- [INFO] Skipping non-war project [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:integration-test (default) @ MyProject-api-impl --- [INFO] Failsafe report directory: /home/martin/workspace/myproject/MyProject-api-impl/target/failsafe-report s --- T E S T S --- Running org.kramerlab.myproject.api.impl.services.CompoundIT anonymous GET to http://localhost:8080 failed, please start services first! Parts of my pom.xml in the root project folder: build pluginManagement plugins ... plugin groupIdorg.apache.tomcat.maven/groupId
Re: Cannot run integration tests in maven archetype project with failsave
I would move the integration tests from myproject-api-impl to the war module Regards, Sandra Am 13.03.2015 um 09:18 schrieb Martin Gütlein: The failsave integration tests do not run. They should be applied to the whole service (war). But they are defined within a module (myproject-api-impl) and are therefore skipped. I could not figure out how to configure this. Martin Am 13.03.2015 um 09:00 schrieb Hervé BOUTEMY: sorry, can't understand the case: problem when building the archetype? with project generated from archetype? Regards, Hervé Le vendredi 13 mars 2015 08:54:06 Martin Gütlein a écrit : Anyone? Where could I get some help on this issue (already tried stackoverflow as well)? Martin Am 10.03.2015 um 19:59 schrieb Martin Gütlein: Hi, I would like to run integration tests on my project, performing and testing rest-calls to my server. I have a maven project layout like with modules: MyProject-api MyProject-api-impl MyProject-webapp MyProject-webapp-exec MyProject-webapp-it (see https://tomcat.apache.org/maven-plugin-2.0-beta-1/archetype.html) The IT tests are defined in MyProject-api-impl/src/test/java/.../..IT.java This may be part of the problem, because they should be applied not only to the project-api-impl, but to the entire project. How can I specify this? Kind regards, Martin I'll post parts of my pom.xml at the end of this mail. When I run mvn verify the output looks like this: $ mvn clean verify [INFO] Scanning for projects... [INFO] [INFO] Reactor Build Order: [INFO] [INFO] MyProject [INFO] MyProject-api [INFO] MyProject-api-impl [INFO] MyProject-webapp [INFO] MyProject-webapp-exec [INFO] [INFO] [INFO] Building MyProject 0.2 [INFO] [INFO] ... [INFO] [INFO] --- tomcat7-maven-plugin:2.0:run-war-only (tomcat7-run) @ MyProject --- [INFO] Skipping non-war project [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:integration-test (default) @ MyProject --- [INFO] No tests to run. [INFO] [INFO] --- tomcat7-maven-plugin:2.0:shutdown (tomcat7-shutdown) @ MyProject --- [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:verify (default) @ MyProject --- [INFO] No tests to run. [INFO] [INFO] [INFO] Building MyProject-api 0.2 [INFO] [INFO] [INFO] [INFO] [INFO] Building MyProject-api-impl 0.2 [INFO] [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ MyProject-api-impl --- [INFO] Deleting /home/martin/workspace/myproject/MyProject-api-impl/target [INFO] [INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-java) @ MyProject-api-impl --- [INFO] [INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ MyProject-api-impl --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/martin/workspace/myproject/MyProject-api-impl/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ MyProject-api-impl --- [INFO] Compiling 280 source files to /home/martin/workspace/myproject/MyProject-api-impl/target/classes [INFO] [INFO] --- maven-resources-plugin:2.3:testResources (default-testResources) @ MyProject-api-impl --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/martin/workspace/myproject/MyProject-api-impl/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ MyProject-api-impl --- [INFO] Compiling 4 source files to /home/martin/workspace/myproject/MyProject-api-impl/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.12.3:test (default-test) @ MyProject-api-impl --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:2.2:jar (default-jar) @ MyProject-api-impl --- [INFO] Building jar: /home/martin/workspace/myproject/MyProject-api-impl/target/MyProject-api-i mpl-0.2.jar [INFO] [INFO] --- tomcat7-maven-plugin:2.0:run-war-only (tomcat7-run) @ MyProject-api-impl --- [INFO] Skipping non-war project [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:integration-test (default) @ MyProject-api-impl --- [INFO] Failsafe report directory: /home/martin/workspace/myproject/MyProject-api-impl/target/failsafe-report s --- T E S T S --- Running org.kramerlab.myproject.api.impl.services.CompoundIT anonymous GET to
Re: Cannot run integration tests in maven archetype project with failsave
Anyone? Where could I get some help on this issue (already tried stackoverflow as well)? Martin Am 10.03.2015 um 19:59 schrieb Martin Gütlein: Hi, I would like to run integration tests on my project, performing and testing rest-calls to my server. I have a maven project layout like with modules: MyProject-api MyProject-api-impl MyProject-webapp MyProject-webapp-exec MyProject-webapp-it (see https://tomcat.apache.org/maven-plugin-2.0-beta-1/archetype.html) The IT tests are defined in MyProject-api-impl/src/test/java/.../..IT.java This may be part of the problem, because they should be applied not only to the project-api-impl, but to the entire project. How can I specify this? Kind regards, Martin I'll post parts of my pom.xml at the end of this mail. When I run mvn verify the output looks like this: $ mvn clean verify [INFO] Scanning for projects... [INFO] [INFO] Reactor Build Order: [INFO] [INFO] MyProject [INFO] MyProject-api [INFO] MyProject-api-impl [INFO] MyProject-webapp [INFO] MyProject-webapp-exec [INFO] [INFO] [INFO] Building MyProject 0.2 [INFO] [INFO] ... [INFO] [INFO] --- tomcat7-maven-plugin:2.0:run-war-only (tomcat7-run) @ MyProject --- [INFO] Skipping non-war project [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:integration-test (default) @ MyProject --- [INFO] No tests to run. [INFO] [INFO] --- tomcat7-maven-plugin:2.0:shutdown (tomcat7-shutdown) @ MyProject --- [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:verify (default) @ MyProject --- [INFO] No tests to run. [INFO] [INFO] [INFO] Building MyProject-api 0.2 [INFO] [INFO] [INFO] [INFO] [INFO] Building MyProject-api-impl 0.2 [INFO] [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ MyProject-api-impl --- [INFO] Deleting /home/martin/workspace/myproject/MyProject-api-impl/target [INFO] [INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-java) @ MyProject-api-impl --- [INFO] [INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ MyProject-api-impl --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/martin/workspace/myproject/MyProject-api-impl/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ MyProject-api-impl --- [INFO] Compiling 280 source files to /home/martin/workspace/myproject/MyProject-api-impl/target/classes [INFO] [INFO] --- maven-resources-plugin:2.3:testResources (default-testResources) @ MyProject-api-impl --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/martin/workspace/myproject/MyProject-api-impl/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ MyProject-api-impl --- [INFO] Compiling 4 source files to /home/martin/workspace/myproject/MyProject-api-impl/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.12.3:test (default-test) @ MyProject-api-impl --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:2.2:jar (default-jar) @ MyProject-api-impl --- [INFO] Building jar: /home/martin/workspace/myproject/MyProject-api-impl/target/MyProject-api-impl-0.2.jar [INFO] [INFO] --- tomcat7-maven-plugin:2.0:run-war-only (tomcat7-run) @ MyProject-api-impl --- [INFO] Skipping non-war project [INFO] [INFO] --- maven-failsafe-plugin:2.12.4:integration-test (default) @ MyProject-api-impl --- [INFO] Failsafe report directory: /home/martin/workspace/myproject/MyProject-api-impl/target/failsafe-reports --- T E S T S --- Running org.kramerlab.myproject.api.impl.services.CompoundIT anonymous GET to http://localhost:8080 failed, please start services first! Parts of my pom.xml in the root project folder: build pluginManagement plugins ... plugin groupIdorg.apache.tomcat.maven/groupId artifactIdtomcat7-maven-plugin/artifactId version2.0/version executions execution idtomcat7-run/id goals goalrun-war-only/goal /goals phasepre-integration-test/phase configuration forktrue/fork /configuration /execution execution idtomcat7-shutdown/id goals goalshutdown/goal