Skip to content

Commit

Permalink
fixed port for faust.diplo.server for easier debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
wissenbach committed Apr 7, 2017
1 parent ce8bfa9 commit d3110be
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
18 changes: 11 additions & 7 deletions pom.xml
Expand Up @@ -11,6 +11,7 @@
<upload.url>beta.faustedition.net:/var/www/dev</upload.url>
<faust.diplo.allowedFailures>10</faust.diplo.allowedFailures>
<faust.diplo.server>false</faust.diplo.server> <!-- Run only the web server, don't actually convert -->
<faust.diplo.port>62436</faust.diplo.port> <!-- Run only the web server, don't actually convert -->
<faust.diplo.debug>false</faust.diplo.debug> <!-- Debug phantomjs, produces massive output -->
<exist.app-name>faust-dev</exist.app-name>
</properties>
Expand Down Expand Up @@ -237,8 +238,8 @@
see the comment there.
-->
<!--
<plugin>

<!-- <plugin>
<groupId>com.github.klieber</groupId>
<artifactId>phantomjs-maven-plugin</artifactId>
<version>0.7</version>
Expand All @@ -251,8 +252,9 @@
</execution>
</executions>
</plugin>
-->
-->


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
Expand Down Expand Up @@ -282,6 +284,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
Expand All @@ -297,20 +300,21 @@
<environmentVariables>
<LANG>en_US.UTF-8</LANG>
<LC_ALL>en_US.UTF-8</LC_ALL>
<SLIMERJSLAUNCHER>${project.build.directory}/dependency/firefox/firefox</SLIMERJSLAUNCHER>
<SLIMERJSLAUNCHER>/Applications/Firefox 38.app/Contents/MacOS/firefox</SLIMERJSLAUNCHER>
</environmentVariables>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<!-- For PhantomJS: -->
<!-- <argument>-Dphantomjs.binary=${phantomjs.binary}</argument> -->
<!-- <argument>-Dphantomjs.binary=/Users/moz/bin/phantomjs</argument> -->
<!-- For SlimerJS instead: -->
<argument>-Dphantomjs.binary=${project.build.directory}/dependency/slimerjs-0.10.1/slimerjs</argument>
<argument>-Dfaust.diplo.allowedFailures=${faust.diplo.allowedFailures}</argument>
<argument>-Dfaust.diplo.server=${faust.diplo.server}</argument>
<argument>-Dfaust.diplo.port=${faust.diplo.port}</argument>
<argument>-Dfaust.diplo.debug=${faust.diplo.debug}</argument>
<argument>net.faustedition.gen.DiplomaticConversion</argument>
<argument>net.faustedition.gen.DiplomaticConversion</argument>
</arguments>
</configuration>
</execution>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/net/faustedition/gen/DiplomaticConversion.java
Expand Up @@ -214,7 +214,8 @@ public static void main(final String[] args) throws IOException {
final SimpleWebServer webServer = new SimpleWebServer("localhost", 0, new File("svg_rendering/page"), true);
webServer.start(60, true);
try {
serverURL = new URL("http", "localhost", webServer.getListeningPort(), "/transcript-generation.html").toString();
final int listeningPort = Integer.valueOf((String) properties.getOrDefault("faust.diplo.port", Integer.toString(webServer.getListeningPort())));
serverURL = new URL("http", "localhost", listeningPort, "/transcript-generation.html").toString();
logger.info(MessageFormat.format("Web server runs on {0}", serverURL));
baseCmdLine = ImmutableList.of(
System.getProperty("phantomjs.binary", "/usr/local/bin/phantomjs"),
Expand Down

0 comments on commit d3110be

Please sign in to comment.