Skip to content

Commit

Permalink
Use -XstartOnFirstThread on macOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
samskivert committed Dec 18, 2016
1 parent 51201a3 commit f489f8f
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions pokeros/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,29 @@
<plugins>
<!-- allows testing of Java backend via: mvn test -Pjava -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>test</phase>
<configuration>
<target>
<!-- these shenanigans are needed to pass -XstartOnFirstThread on Mac OS
but not on other OSes where they would cause the JVM to fail, yay -->
<condition property="jvmarg" value="-XstartOnFirstThread" else="-Dfoo=bar">
<os family="mac" />
</condition>
<java fork="true" classname="${mainClass}" classpathref="maven.test.classpath">
<jvmarg value="${jvmarg}" />
<arg value="${scaleFactor}" />
</java>
</target>
</configuration>
<goals>
<goal>java</goal>
<goal>run</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>${mainClass}</mainClass>
<arguments>
<argument>${scaleFactor}</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit f489f8f

Please sign in to comment.