modello/modello-cli-domasxpp3.patch

36 lines
1.4 KiB
Diff
Raw Normal View History

--- modello-2.1.2/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java 2023-09-04 23:38:10.194571922 +0200
+++ modello-2.1.2/modello-core/src/main/java/org/codehaus/modello/ModelloCli.java 2023-09-05 12:10:26.198361088 +0200
@@ -105,11 +105,24 @@
System.exit(1);
}
+ if ( StringUtils.equalsIgnoreCase( javaSource, "true" ) || StringUtils.equalsIgnoreCase( javaSource, "false" ) ) {
+ // The old useJava5 parameter at this position
+ System.err.println( "Missing required parameter: Java Source (replacing the old \"Use Java5\" parameter)" );
+
+ usage();
+
+ System.exit( 1 );
+ }
+
parameters.setProperty(ModelloParameterConstants.OUTPUT_JAVA_SOURCE, javaSource);
if (args.length > 6) {
parameters.setProperty(ModelloParameterConstants.ENCODING, args[6]);
}
+
+ if ( args.length > 7 ) {
+ parameters.setProperty( ModelloParameterConstants.DOM_AS_XPP3, args[7] );
+ }
}
// ----------------------------------------------------------------------
@@ -118,6 +131,6 @@
private static void usage() {
System.err.println("Usage: modello <model> <outputType> <output directory> <modelVersion> <packageWithVersion>"
- + "<javaSource> [<encoding>]");
+ + " <javaSource> [<encoding> [<domAsXpp3>]]" );
}
}