Skip to content

Commit

Permalink
WINDUP-795 Skip Tattletale's generation of the .png file
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraZizka committed Oct 9, 2015
1 parent fcd9d20 commit 13a1569
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.jboss.windup.rules.apps.tattletale;

import java.io.File;
import java.io.PrintStream;
import java.nio.file.Paths;

import org.jboss.tattletale.Main;
Expand Down Expand Up @@ -40,6 +42,7 @@ public Configuration getConfiguration(GraphContext context)

private class TattletaleOperation extends GraphOperation
{
private static final String TTALE_CONFIG_FILE_NAME = "tattletale-config.properties";

@Override
public void perform(GraphRewrite event, EvaluationContext context)
Expand All @@ -53,8 +56,20 @@ public void perform(GraphRewrite event, EvaluationContext context)
Main main = new Main();
main.setSource(inputPath);
main.setDestination(tattletaleDir);



try
{
// The only way Tattletale accepts configuration is through a file.
new File(tattletaleDir).mkdirs();
File configPath = new File(tattletaleDir, TTALE_CONFIG_FILE_NAME);
PrintStream str = new PrintStream(configPath);
str.append("enableDot=false\n"); // Whether to generate .dot and .png
str.append("graphvizDot=dot\n"); // Dot executable
str.close();
main.setConfiguration(configPath.getAbsolutePath());

main.execute();
}
catch (Exception e)
Expand Down

0 comments on commit 13a1569

Please sign in to comment.