Skip to content

Commit

Permalink
WELD-2055 added a profile to exclude shutdown hook test on Windows. M…
Browse files Browse the repository at this point in the history
…entioned shutdown hook behaviour in docs.
  • Loading branch information
manovotn authored and mkouba committed Nov 2, 2015
1 parent 6c96e08 commit 6326490
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/reference/src/main/asciidoc/environments.asciidoc
Expand Up @@ -406,6 +406,11 @@ public class HelloWorld
}
------------------------------------------------------------------------------------------------------

NOTE: Weld automatically registers shutdown hook during initialization in order to properly terminate
all running containers should the VM be terminated or program exited. Even though it is possible to register
an alternative hook and implement the logic, it is not recommended. The behavior across OS platforms may
differ and specifically on Windows it proves to be problematic.

==== Bootstrapping CDI SE

CDI SE applications can be bootstrapped in the following ways.
Expand Down
22 changes: 22 additions & 0 deletions pom.xml
Expand Up @@ -673,6 +673,28 @@
</plugins>
</build>
</profile>
<profile>
<!-- Following profile is automatically triggered in Windows environment and allows to handle behaviour/problems
specific for this OS. For instance excluding a test here will skip its execution on Windows. -->
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/ShutdownHookTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>

0 comments on commit 6326490

Please sign in to comment.