File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
full/src/main/java/org/hisrc/jsonix Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,19 @@ public static void main(String[] args) throws Exception {
5656 // TODO
5757 System .setProperty ("javax.xml.accessExternalDTD" , "all" );
5858
59+ File targetDirectory = settings .getTargetDirectory ();
60+
61+ if (targetDirectory == null ) {
62+ targetDirectory = new File ("." );
63+ }
64+
65+ if (!targetDirectory .exists ()) {
66+ targetDirectory .mkdirs ();
67+ }
68+
69+ arguments .add ("-d" );
70+ arguments .add (targetDirectory .getAbsolutePath ());
71+
5972 final Options options = new Options ();
6073
6174 options .parseArguments (arguments .toArray (new String [arguments .size ()]));
@@ -87,7 +100,6 @@ private void execute() {
87100
88101 final File targetDirectory = getOptions ().targetDir ;
89102
90- targetDirectory .mkdirs ();
91103
92104 final ProgramWriter <NType , NClass > programWriter = new TargetDirectoryProgramWriter (
93105 targetDirectory , errorHandler );
You can’t perform that action at this time.
0 commit comments