Update Guice's maven build system to run the unit tests in three configurations, representing the three different values for stack-trace inclusion in error messages. Additionally, modify the open-source InternalFlags to log a warning if a value is passed to the flag that does not correspond to the Enum.
Tested:
normal open-source tests in google's internal build
full maven build from MOE's assembly of the open-source project
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=54815820
diff --git a/pom.xml b/pom.xml
index 48863a5..23aaf7c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -275,6 +275,32 @@
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<!--<argLine>-Dguice_include_stack_traces=OFF</argLine>-->
</configuration>
+ <executions>
+ <execution>
+ <id>stack-traces-off</id>
+ <phase>test</phase>
+ <goals><goal>test</goal></goals>
+ <configuration>
+ <argLine>-Dguice_include_stack_traces=OFF</argLine>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stack-traces-complete</id>
+ <phase>test</phase>
+ <goals><goal>test</goal></goals>
+ <configuration>
+ <argLine>-Dguice_include_stack_traces=COMPLETE</argLine>
+ </configuration>
+ </execution>
+ <execution>
+ <id>default-test</id>
+ <phase>test</phase>
+ <goals><goal>test</goal></goals>
+ <configuration>
+ <argLine>-Dguice_include_stack_traces=ONLY_FOR_DECLARING_SOURCE</argLine>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
<!--
| Shared OSGi manifest configuration