You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2016/02/26 15:29:18 UTC

[2/3] isis git commit: ISIS-1313: new 'commonSchemas' configuration parameter.

ISIS-1313: new 'commonSchemas' configuration parameter.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/e7f7c8ae
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/e7f7c8ae
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/e7f7c8ae

Branch: refs/heads/master
Commit: e7f7c8aea24e53c878a8bea8cdfd516b70b70843
Parents: 7368588
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Feb 26 14:24:54 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Feb 26 14:24:54 2016 +0000

----------------------------------------------------------------------
 .../org/apache/isis/tool/mavenplugin/IsisMojoXsd.java     | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/e7f7c8ae/core/maven-plugin/src/main/java/org/apache/isis/tool/mavenplugin/IsisMojoXsd.java
----------------------------------------------------------------------
diff --git a/core/maven-plugin/src/main/java/org/apache/isis/tool/mavenplugin/IsisMojoXsd.java b/core/maven-plugin/src/main/java/org/apache/isis/tool/mavenplugin/IsisMojoXsd.java
index d1fd165..67e3279 100644
--- a/core/maven-plugin/src/main/java/org/apache/isis/tool/mavenplugin/IsisMojoXsd.java
+++ b/core/maven-plugin/src/main/java/org/apache/isis/tool/mavenplugin/IsisMojoXsd.java
@@ -70,6 +70,12 @@ public class IsisMojoXsd extends IsisMojoAbstract {
     @Parameter(required = false, readonly = false, property = "separate", defaultValue = "false")
     private boolean separate;
 
+    /**
+     * Whether to also generate the isis common schema(s).
+     */
+    @Parameter(required = false, readonly = false, property = "commonSchemas", defaultValue = "false")
+    private boolean commonSchemas;
+
     @Override
     protected void doExecute(
             final ContextForMojo context, final IsisSystem system)
@@ -102,7 +108,9 @@ public class IsisMojoXsd extends IsisMojoAbstract {
 
         final Object instance = InstanceUtil.createInstance(dtoClassName);
         final Map<String, String> schemaByNamespace =
-                jaxbService.toXsd(instance, JaxbService.IsisSchemas.INCLUDE);
+                jaxbService.toXsd(
+                        instance,
+                        commonSchemas ? JaxbService.IsisSchemas.INCLUDE: JaxbService.IsisSchemas.IGNORE);
 
         final File schemaDir = separate? new File(outputDir, dtoClassName): outputDir;