4949import org .slf4j .Logger ;
5050import org .slf4j .LoggerFactory ;
5151import org .xml .sax .SAXException ;
52+ import org .yaml .snakeyaml .DumperOptions ;
5253import org .yaml .snakeyaml .Yaml ;
5354
5455import javax .xml .bind .JAXBException ;
@@ -106,7 +107,10 @@ public static void main(String[] args) {
106107 break ;
107108 }
108109 case "buildyaml" :{
109- Yaml yaml = new Yaml ();
110+ DumperOptions options = new DumperOptions ();
111+ options .setDefaultFlowStyle (DumperOptions .FlowStyle .BLOCK );
112+ options .setPrettyFlow (true );
113+ Yaml yaml = new Yaml (options );
110114 JarInputStream jarFileStream = new JarInputStream (new FileInputStream (args [1 ]));
111115 JarFile jarFile = new JarFile (args [1 ]);
112116 ArrayList <JarEntry > listOfAllClasses = getAllClassesFromJar (jarFileStream );
@@ -116,13 +120,10 @@ public static void main(String[] args) {
116120 ArrayList <Map <String ,String >> entryResult = new ArrayList <>();
117121 for (Pair <String , String > entry : nameEntryList )
118122 entryResult .add (Map .ofEntries (entry ("name" ,entry .first ),entry ("entryPoint" ,entry .second )));
119-
120123 Map <String , ArrayList <Map <String ,String >>> dataMap = new HashMap <>();
121-
122124 dataMap .put ("properties" ,entryResult );
123- // PrintWriter writer = new PrintWriter(new File("./mph-tableFull.yaml"));
124- // yaml.dump(dataMap, writer);
125- // ObjectMapper om = new ObjectMapper(new YAMLFactory());
125+ final FileWriter writer = new FileWriter ("mph-table-full.yaml" );
126+ yaml .dump (dataMap , writer );
126127 }
127128 case "test" : {
128129 TestArguments arguments = new TestArguments (args );
0 commit comments