Index: maven-commandline-plugin/src/java/org/codelutin/option/generate/JavaGeneratorGoal.java diff -u maven-commandline-plugin/src/java/org/codelutin/option/generate/JavaGeneratorGoal.java:1.8 maven-commandline-plugin/src/java/org/codelutin/option/generate/JavaGeneratorGoal.java:1.9 --- maven-commandline-plugin/src/java/org/codelutin/option/generate/JavaGeneratorGoal.java:1.8 Thu Feb 21 21:03:39 2008 +++ maven-commandline-plugin/src/java/org/codelutin/option/generate/JavaGeneratorGoal.java Fri Feb 22 13:47:45 2008 @@ -150,6 +150,12 @@ */ protected String actionSuperClass; + /** + * @description prefix du nom des config a generer + * @parameter expression="${commandline.concreteConfig}" default-value="false" + */ + protected boolean concreteConfig; + protected DefinitionParser parser; protected boolean needActionConstructor; @@ -159,26 +165,17 @@ protected void initAction() throws Exception { // init i18n - I18n.initISO88591(System.getProperty("user.language"), System.getProperty("user.country")); + I18n.initISO88591(); + //I18n.initISO88591(System.getProperty("user.language"), System.getProperty("user.country")); checkInstanceOf(parserSuperClass, OptionParser.class); checkInstanceOf(optionSuperClass, Option.class); //checkInstanceOf(actionSuperClass, OptionAction.class); //checkInstanceOf(configSuperClass, Config.class); - initClassLoader(); + //initClassLoader(); - if (needSpecializedAction()) { - needActionConstructor = true; - } else { - //TODO We can not do this, source are still not compiled... - // check superClass has a default public constructor - /*Class aClass = Class.forName(actionSuperClass,false,loader); - Constructor cons = aClass.getDeclaredConstructor(); - if (Modifier.isPublic(cons.getModifiers())) { - throw new IllegalArgumentException("could not find public constructor for class " + aClass); - }*/ - needActionConstructor = false; - } + needActionConstructor = needSpecializedAction(); + if (optionPackageName == null) { optionPackageName = parserPackageName + ".options"; } @@ -309,7 +306,8 @@ ConfigJavaGenerator.doGenerate(out, t0, i18nPrefix, context, configPackageName, configSimpleName + suffix, - configSuperClass + configSuperClass, + concreteConfig ); }