Index: anttask/src/main/java/org/castor/anttask/CastorCodeGenTask.java =================================================================== --- anttask/src/main/java/org/castor/anttask/CastorCodeGenTask.java (Revision 6807) +++ anttask/src/main/java/org/castor/anttask/CastorCodeGenTask.java (Arbeitskopie) @@ -154,6 +154,9 @@ /** CastorBuilderProperties file. */ private String _properties; + /** The name conflict strategy to use */ + private String _nameConflictStrategy = "warnViaConsoleDialog"; + /** SourceGenerator instance. */ private SourceGenerator _sgen; @@ -251,6 +254,15 @@ } /** + * Sets the name conflict strategy to use. + * + * @param nameConflictStrategy The name conflict strategy to use + */ + public void setNameConflictStrategy(final String nameConflictStrategy) { + _nameConflictStrategy = nameConflictStrategy; + } + + /** * Sets whether or not non-fatal warnings should be suppressed. * * @param b If true, non-fatal warnings will be suppressed. This additionally @@ -387,6 +399,8 @@ _sgen.setSAX1(_sax1); _sgen.setCaseInsensitive(_caseInsensitive); + + _sgen.setNameConflictStrategy(_nameConflictStrategy); _sgen.setTestable(_testable); if (this._testable) { log(CASTOR_TESTABLE_MSG); } Index: src/doc/sourcegen.xml =================================================================== --- src/doc/sourcegen.xml (Revision 6807) +++ src/doc/sourcegen.xml (Arbeitskopie) @@ -255,6 +255,12 @@ Optional + nameConflictStrategy + Name conflict strategy. + Sets the name conflict strategy to use during XML code generation + Optional + + fail
Index: src/doc/srcgen-anttask.xml =================================================================== --- src/doc/srcgen-anttask.xml (Revision 6807) +++ src/doc/srcgen-anttask.xml (Arbeitskopie) @@ -111,6 +111,13 @@ No
+ nameConflictStrategy + If used, sets the name conflict strategy to use during XML code generation; + possible values are 'warnViaConsoleDialog' and + 'informViaLog'. + No + + properties Location of file defining a set of properties to be used during source code generation. This overrides the default mechanisms of configuring the source