@@ -21,13 +21,13 @@ specific language governing permissions and limitations |
21 | 21 | under the License. |
22 | 22 | --> |
23 | 23 |
|
24 | | -<a name="top"></a> |
| 24 | +<a id="top"></a> |
25 | 25 |
|
26 | 26 | # Frequently Asked Questions |
27 | 27 |
|
28 | 28 | 1. [What is the difference between maven-failsafe-plugin and maven-surefire-plugin?](#surefire-v-failsafe) |
29 | 29 | 2. [How can I reuse my test code in other modules?](#reuse-test-code) |
30 | | -3. [Surefire fails with the message "The forked VM terminated without properly saying goodbye".](#vm-termination) |
| 30 | +3. [Surefire fails with the message "The forked VM terminated without properly saying goodbye".](#vm-termination) |
31 | 31 | 4. [Crashed Surefire or Failsafe plugin must indicate crashed tests](#crashed-forks) |
32 | 32 | 5. [How can I run GWT tests?](#GWT) |
33 | 33 | 6. [How do I use properties set by other plugins in `argLine`?](#late-property-evaluation) |
@@ -36,7 +36,7 @@ under the License. |
36 | 36 | 9. [Corrupted channel by directly writing to native stream in forked JVM](#corruptedstream) |
37 | 37 | 10. [The files cannot be deleted when Jenkins CI killed Maven process and the tests still continue running.](#kill-jvm) |
38 | 38 |
|
39 | | -<a name="surefire-v-failsafe"></a> |
| 39 | +<a id="surefire-v-failsafe"></a> |
40 | 40 |
|
41 | 41 | ### What is the difference between maven-failsafe-plugin and maven-surefire-plugin? |
42 | 42 |
|
@@ -46,38 +46,38 @@ tests and if any of the tests fail then it will fail the build immediately. |
46 | 46 | [maven-failsafe-plugin](http://maven.apache.org/plugins/maven-failsafe-plugin/) is designed for running |
47 | 47 | integration tests, and decouples failing the build if there are test failures from actually running the tests. |
48 | 48 |
|
49 | | -<a name="reuse-test-code"></a> |
| 49 | +<a id="reuse-test-code"></a> |
50 | 50 |
|
51 | 51 | ### How can I reuse my test code in other modules? |
52 | 52 |
|
53 | 53 | Visit this link for your reference, |
54 | 54 | [Attaching tests](http://maven.apache.org/guides/mini/guide-attached-tests.html). Also see the examples for |
55 | 55 | [Inclusions and Exclusions of Tests](examples/inclusion-exclusion.html). |
56 | 56 |
|
57 | | -<a name="vm-termination"></a> |
| 57 | +<a id="vm-termination"></a> |
58 | 58 |
|
59 | | -### Surefire fails with the message "The forked VM terminated without properly saying goodbye". |
| 59 | +### Surefire fails with the message "The forked VM terminated without properly saying goodbye". |
60 | 60 |
|
61 | 61 | Surefire does not support tests or any referenced libraries calling `System.exit()` at any time. If they do so, |
62 | 62 | they are incompatible with Surefire and you should probably file an issue with the library/vendor. |
63 | 63 |
|
64 | 64 | Alternatively the forked VM could also have crashed for a number of reasons. Look for the classical |
65 | 65 | `hs_err*` files indicating VM crashes or examine the Maven log output when the tests execute. Some |
66 | | -"extraordinary" output from crashing processes may be dumped to the console/log. |
| 66 | +"extraordinary" output from crashing processes may be dumped to the console/log. |
67 | 67 |
|
68 | 68 | If this happens on a CI environment and only after it runs for some time, there is a fair chance your test |
69 | 69 | suite is leaking some kind of OS-level resource that makes things worse at every run. Regular OS-level |
70 | 70 | monitoring tools may give you some indication. |
71 | 71 |
|
72 | | -<a name="crashed-forks"></a> |
| 72 | +<a id="crashed-forks"></a> |
73 | 73 |
|
74 | 74 | ### Crashed Surefire or Failsafe plugin must indicate crashed tests |
75 | 75 |
|
76 | 76 | After a forked JVM has crashed the console of forked JVM prints *Crashed tests:* and lists the last test which |
77 | 77 | has crashed. In the console log you can find the message *The forked VM terminated without properly saying |
78 | 78 | goodbye*. |
79 | 79 |
|
80 | | -<a name="GWT"></a> |
| 80 | +<a id="GWT"></a> |
81 | 81 |
|
82 | 82 | ### How can I run GWT tests? |
83 | 83 |
|
@@ -92,7 +92,7 @@ to run with Surefire, you need the following settings: |
92 | 92 |
|
93 | 93 | Try `reuseForks=true` and if it doesn't work, fall back to `reuseForks=false` |
94 | 94 |
|
95 | | -<a name="late-property-evaluation"></a> |
| 95 | +<a id="late-property-evaluation"></a> |
96 | 96 |
|
97 | 97 | ### How do I use properties set by other plugins in `argLine`? |
98 | 98 |
|
@@ -107,16 +107,16 @@ also available with a different value at initialization of the POM model. Otherw |
107 | 107 | replacement kicks in properly directly before this goal is being executed (instead of when the POM model is |
108 | 108 | being resolved)*. |
109 | 109 |
|
110 | | -<a name="failsafe-jar"></a> |
| 110 | +<a id="failsafe-jar"></a> |
111 | 111 |
|
112 | 112 | ### How maven-failsafe-plugin allows me to configure the jar file or classes to use? |
113 | 113 |
|
114 | | -By default maven-failsafe-plugin uses project artifact file in test classpath if packaging is set to "jar" in |
| 114 | +By default maven-failsafe-plugin uses project artifact file in test classpath if packaging is set to "jar" in |
115 | 115 | pom.xml. This can be modified and for instance set to main project classes if you use configuration parameter |
116 | | -"classesDirectory". This would mean that you set value "${project.build.outputDirectory}" for the parameter |
117 | | -"classesDirectory" in the configuration of plugin. |
| 116 | +"classesDirectory". This would mean that you set value "${project.build.outputDirectory}" for the parameter |
| 117 | +"classesDirectory" in the configuration of plugin. |
118 | 118 |
|
119 | | -<a name="dumpfiles"></a> |
| 119 | +<a id="dumpfiles"></a> |
120 | 120 |
|
121 | 121 | ### How to dump fatal errors and stack trace of plugin runtime if it fails? |
122 | 122 |
|
@@ -134,7 +134,7 @@ follows: |
134 | 134 | Forked JVM process and plugin process communicate via std/out. If this channel is corrupted, for a whatever |
135 | 135 | reason, the dump of the corrupted stream appears in *\*.dumpstream*. |
136 | 136 |
|
137 | | -<a name="corruptedstream"></a> |
| 137 | +<a id="corruptedstream"></a> |
138 | 138 |
|
139 | 139 | ### Corrupted channel by directly writing to native stream in forked JVM |
140 | 140 |
|
@@ -145,19 +145,19 @@ to be corrupted but the Maven will never see the tests finished and build may ha |
145 | 145 |
|
146 | 146 | This warning message appears if you use *FileDescriptor.out* or JVM prints GC summary. |
147 | 147 |
|
148 | | -In that case the warning is printed *"Corrupted channel by directly writing to native stream in forked JVM"*, |
| 148 | +In that case the warning is printed *"Corrupted channel by directly writing to native stream in forked JVM"*, |
149 | 149 | and a dump file can be found in Reports directory. |
150 | 150 |
|
151 | 151 | If debug level is enabled then messages of corrupted stream appear in the console. |
152 | 152 |
|
153 | | -<a name="kill-jvm"></a> |
| 153 | +<a id="kill-jvm"></a> |
154 | 154 |
|
155 | 155 | ### The files cannot be deleted when Jenkins CI killed Maven process and the tests still continue running. |
156 | 156 |
|
157 | 157 | Surefire and Failsafe plugin may kill forked Surefire JVM when the standard-input stream is closed. This works |
158 | 158 | when you stop Maven process by CTRL+C but it is not guaranteed on all platforms. By default, the plugins use |
159 | 159 | process pipes for interprocess communication. Since version 3.0.0-M5, TCP/IP sockets are also available and can |
160 | 160 | be selected with the forkNode configuration parameter. See the documentation of the configuration parameter |
161 | | -"enableProcessChecker" for mechanisms to detect and kill orphan forked JVMs. These mechanisms have some |
| 161 | +"enableProcessChecker" for mechanisms to detect and kill orphan forked JVMs. These mechanisms have some |
162 | 162 | drawbacks regarding your OS systems and GC, therefore see the documentation for the parameter |
163 | | -"enableProcessChecker". |
| 163 | +"enableProcessChecker". |