http://git-wip-us.apache.org/repos/asf/isis-site/blob/2f475bbf/content/versions/2.0.0-M1/guides/rgmvn/rgmvn.html ---------------------------------------------------------------------- diff --git a/content/versions/2.0.0-M1/guides/rgmvn/rgmvn.html b/content/versions/2.0.0-M1/guides/rgmvn/rgmvn.html new file mode 100644 index 0000000..4b3afe9 --- /dev/null +++ b/content/versions/2.0.0-M1/guides/rgmvn/rgmvn.html @@ -0,0 +1,1328 @@ +<!doctype html> +<html> + <head> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- No caching headers --> + <meta http-equiv="cache-control" content="no-cache"> + <meta http-equiv="pragma" content="no-cache"> + <meta http-equiv="expires" content="-1"> + <title>Apache Isis Maven plugin</title> + <link rel="icon" type="image/png" href="../../images/isis-favicon.png"> + <!-- + Based on DataNucleus' template, + that was in turn based on an earlier version of Apache Isis' template, + that was in turn based on Apache Deltaspike's template. + + This template uses + * Bootstrap v3.3.7 (https://getbootstrap.com/) for navbar. + * Bootstrap TOC plugin v0.4.1 (https://afeld.github.io/bootstrap-toc/) + for the table of contents. + * jQuery (necessary for Bootstrap's JavaScript plugins) + * Font-Awesome for some icons used by Asciidoctor + + Also: + * Bootswatch "flatly" theme for Bootstrap (https://bootswatch.com/flatly). + * slick.js (carousel) + * add a link to all headers (home-grown, adapted from blog posts) + * integration of elasticlunr.js (home-grown, adapted from blog posts) + --> + <link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/flatly/bootstrap.min.css" rel="stylesheet"> + <link href="../../css/bootstrap-toc/0.4.1/bootstrap-toc.min.css" rel="stylesheet"> + <link href="../../css/asciidoctor/foundation.css" rel="stylesheet"> + <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet"> + <link href="../../css/slick/1.5.0/slick.css" rel="stylesheet"> + <link href="../../css/slick/1.5.0/slick-theme.css" rel="stylesheet"> + <link href="../../css/search-panel/search-panel.css" rel="stylesheet"> + <link href="../../css/header-links/header-links.css" rel="stylesheet"> + <link href="../../css/sticky-header/sticky-header.css" rel="stylesheet"> + <link href="../../css/customisations.css" rel="stylesheet"> + <!-- Coderay syntax formatter --> + <style type="text/css"> + /* Stylesheet for CodeRay to match GitHub theme | MIT License | http://foundation.zurb.com */ +/*pre.CodeRay {background-color:#f7f7f8;}*/ +.CodeRay .line-numbers{border-right:1px solid #d8d8d8;padding:0 0.5em 0 .25em} +.CodeRay span.line-numbers{display:inline-block;margin-right:.5em;color:rgba(0,0,0,.3)} +.CodeRay .line-numbers strong{color:rgba(0,0,0,.4)} +table.CodeRay{border-collapse:separate;border-spacing:0;margin-bottom:0;border:0;background:none} +table.CodeRay td{vertical-align: top;line-height:1.45} +table.CodeRay td.line-numbers{text-align:right} +table.CodeRay td.line-numbers>pre{padding:0;color:rgba(0,0,0,.3)} +table.CodeRay td.code{padding:0 0 0 .5em} +table.CodeRay td.code>pre{padding:0} +.CodeRay .debug{color:#fff !important;background:#000080 !important} +.CodeRay .annotation{color:#007} +.CodeRay .attribute-name{color:#000080} +.CodeRay .attribute-value{color:#700} +.CodeRay .binary{color:#509} +.CodeRay .comment{color:#998;font-style:italic} +.CodeRay .char{color:#04d} +.CodeRay .char .content{color:#04d} +.CodeRay .char .delimiter{color:#039} +.CodeRay .class{color:#458;font-weight:bold} +.CodeRay .complex{color:#a08} +.CodeRay .constant,.CodeRay .predefined-constant{color:#008080} +.CodeRay .color{color:#099} +.CodeRay .class-variable{color:#369} +.CodeRay .decorator{color:#b0b} +.CodeRay .definition{color:#099} +.CodeRay .delimiter{color:#000} +.CodeRay .doc{color:#970} +.CodeRay .doctype{color:#34b} +.CodeRay .doc-string{color:#d42} +.CodeRay .escape{color:#666} +.CodeRay .entity{color:#800} +.CodeRay .error{color:#808} +.CodeRay .exception{color:inherit} +.CodeRay .filename{color:#099} +.CodeRay .function{color:#900;font-weight:bold} +.CodeRay .global-variable{color:#008080} +.CodeRay .hex{color:#058} +.CodeRay .integer,.CodeRay .float{color:#099} +.CodeRay .include{color:#555} +.CodeRay .inline{color:#000} +.CodeRay .inline .inline{background:#ccc} +.CodeRay .inline .inline .inline{background:#bbb} +.CodeRay .inline .inline-delimiter{color:#d14} +.CodeRay .inline-delimiter{color:#d14} +.CodeRay .important{color:#555;font-weight:bold} +.CodeRay .interpreted{color:#b2b} +.CodeRay .instance-variable{color:#008080} +.CodeRay .label{color:#970} +.CodeRay .local-variable{color:#963} +.CodeRay .octal{color:#40e} +.CodeRay .predefined{color:#369} +.CodeRay .preprocessor{color:#579} +.CodeRay .pseudo-class{color:#555} +.CodeRay .directive{font-weight:bold} +.CodeRay .type{font-weight:bold} +.CodeRay .predefined-type{color:inherit} +.CodeRay .reserved,.CodeRay .keyword {color:#000;font-weight:bold} +.CodeRay .key{color:#808} +.CodeRay .key .delimiter{color:#606} +.CodeRay .key .char{color:#80f} +.CodeRay .value{color:#088} +.CodeRay .regexp .delimiter{color:#808} +.CodeRay .regexp .content{color:#808} +.CodeRay .regexp .modifier{color:#808} +.CodeRay .regexp .char{color:#d14} +.CodeRay .regexp .function{color:#404;font-weight:bold} +.CodeRay .string{color:#d20} +.CodeRay .string .string .string{background:#ffd0d0} +.CodeRay .string .content{color:#d14} +.CodeRay .string .char{color:#d14} +.CodeRay .string .delimiter{color:#d14} +.CodeRay .shell{color:#d14} +.CodeRay .shell .delimiter{color:#d14} +.CodeRay .symbol{color:#990073} +.CodeRay .symbol .content{color:#a60} +.CodeRay .symbol .delimiter{color:#630} +.CodeRay .tag{color:#008080} +.CodeRay .tag-special{color:#d70} +.CodeRay .variable{color:#036} +.CodeRay .insert{background:#afa} +.CodeRay .delete{background:#faa} +.CodeRay .change{color:#aaf;background:#007} +.CodeRay .head{color:#f8f;background:#505} +.CodeRay .insert .insert{color:#080} +.CodeRay .delete .delete{color:#800} +.CodeRay .change .change{color:#66f} +.CodeRay .head .head{color:#f4f} + </style> + </head> + <body data-spy="scroll" data-target="#toc"> + <div id="basedir" style="display:none;"> + ../../ + </div> + <div id="docname" style="display:none;"> + rgmvn + </div> + <div id="filetype" style="display:none;"> + html + </div> + <!-- Navbar --> + <nav class="navbar navbar-default navbar-static-top header"> + <div class="container"> + <div class="navbar-header"> + <!-- Three line menu button for use on mobile screens --> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> + <a class="navbar-brand" href="../../index.html"> <img alt="Brand" src="../../images/isis-logo-48x48.png"> </a> + <a class="navbar-brand" href="../../index.html">Apache Isis</a> + </div> + <!-- Navbar that will collapse on mobile screens --> + <div id="navbar" class="navbar-collapse collapse"> + <ul class="nav navbar-nav"> + <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Documentation<span class="caret"></span></a> + <ul class="dropdown-menu"> + <li><a href="../../documentation.html">Table of Contents</a></li> + <li role="separator" class="divider"></li> + <li class="dropdown-header">User Guides</li> + <li><a href="../../guides/ugfun/ugfun.html">Fundamentals</a></li> + <li><a href="../../guides/ugvw/ugvw.html">Wicket Viewer</a></li> + <li><a href="../../guides/ugvro/ugvro.html">Restful Objects Viewer</a></li> + <li><a href="../../guides/ugodn/ugodn.html">DataNucleus Object Store</a></li> + <li><a href="../../guides/ugsec/ugsec.html">Security</a></li> + <li><a href="../../guides/ugtst/ugtst.html">Testing</a></li> + <li><a href="../../guides/ugbtb/ugbtb.html">Beyond the Basics</a></li> + <li role="separator" class="divider"></li> + <li class="dropdown-header">Reference Guides</li> + <li><a href="../../guides/rgant/rgant.html">Annotations</a></li> + <li><a href="../../guides/rgsvc/rgsvc.html">Domain Services</a></li> + <li><a href="../../guides/rgcfg/rgcfg.html">Core Config' Properties</a></li> + <li><a href="../../guides/rgcms/rgcms.html">Classes, Methods and Schema</a></li> + <li><a href="../../guides/rgmvn/rgmvn.html">Maven plugin</a></li> + <li><a href="../../guides/rgfis/rgfis.html">Framework Internal Services</a></li> + <li role="separator" class="divider"></li> + <li class="dropdown-header">Javadoc</li> + <li><a href="http://javadoc.io/doc/org.apache.isis.core/isis-core-applib">Applib</a></li> + </ul> </li> + <li class="dropdown hidden-sm hidden-md"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Downloads<span class="caret"></span></a> + <ul class="dropdown-menu"> + <li class="dropdown-header">Maven archetypes</li> + <li><a href="../../guides/ugfun/ugfun.html#_ugfun_getting-started_helloworld-archetype">helloworld</a></li> + <li><a href="../../guides/ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">simpleapp</a></li> + <li role="separator" class="divider"></li> + <li><a href="../../downloads.html">Downloads</a></li> + <li><a href="../../release-notes/release-notes.html">Release Notes</a></li> + <li><a href="../../migration-notes/migration-notes.html">Migration Notes</a></li> + <li role="separator" class="divider"></li> + <li><a href="https://github.com/apache/isis">Github mirror</a></li> + </ul> </li> + <li class="dropdown hidden-sm"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Support<span class="caret"></span></a> + <ul class="dropdown-menu"> + <li class="dropdown-header">Guides</li> + <li><a href="../../guides/dg/dg.html">Developers' Guide</a></li> + <li><a href="../../guides/cgcom/cgcom.html">Committers' Guide</a></li> + <li><a href="../../guides/htg.html">Hints-n-Tips Guide</a></li> + <li role="separator" class="divider"></li> + <li class="dropdown-header">Mailing Lists</li> + <li><a href="../../support.html">How to subscribe</a></li> + <li><a href="https://lists.apache.org/list.html?us...@isis.apache.org">Archives (ASF Pony mail)</a></li> + <li><a href="http://isis.markmail.org/search/?q=">Archives (Markmail)</a></li> + <li role="separator" class="divider"></li> + <li class="dropdown-header">Other Resources</li> + <li><a href="https://issues.apache.org/jira/browse/ISIS">ASF JIRA</a></li> + <li><a href="https://stackoverflow.com/questions/tagged/isis">Stack Overflow</a></li> + <li><a href="../../help.html">Wiki, Fisheye etc.</a></li> + </ul> </li> + <li class="dropdown hidden-sm hidden-md"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">@ASF<span class="caret"></span></a> + <ul class="dropdown-menu"> + <li><a href="https://www.apache.org/">Apache Homepage</a></li> + <li><a href="https://www.apache.org/events/current-event">Events</a></li> + <li><a href="https://www.apache.org/licenses/">Licenses</a></li> + <li><a href="https://www.apache.org/security/">Security</a></li> + <li><a href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li> + <li><a href="https://www.apache.org/foundation/thanks.html">Thanks</a></li> + <li role="separator" class="divider"></li> + <li><a href="https://whimsy.apache.org/board/minutes/Isis.html">PMC board minutes</a></li> + </ul> </li> + </ul> + <div class="nav navbar-nav navbar-right"> + <!-- 'style' added to fix height of input box. FIX THIS --> + <form class="navbar-form" role="search" id="search-form" style="padding: 1px 15px;"> + <div class="form-group"> + <input class="form-control" id="search-field" type="text" size="30" placeholder="Search"> + </div> + </form> + </div> + <p class="nav navbar-text navbar-right small">v2.0.0-M1</p> + </div> + </div> + </nav> + <div class="container"> + <div class="row-fluid"> + <div class="col-xs-12 col-sm-12 col-md-12 col-lg-9"> + <div id="search-panel"> + <div id="search-results"></div> + <div> + <br> + <a href="#" id="search-results-clear">clear</a> + </div> + </div> + <span class="pdf-link"><a href="rgmvn.pdf"><img src="../../images/PDF-50.png"></a></span> + <div class="page-title"> + <h1>Apache Isis Maven plugin</h1> + </div> + <div id="doc-content"> + <div class="btn-group" style="float: right; font-size: small; padding: 6px; "> + <button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/rgmvn.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button> + <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button> + <ul class="dropdown-menu"> + <li><a href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/rgmvn.adoc" target="_blank"><i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i> Edit</a></li> + <li><a href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/rgmvn.adoc" target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i> History</a></li> + <li><a href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/rgmvn.adoc" target="_blank"><i class="fa fa-file-text-o fa-fw" aria-hidden="true"></i> Raw</a></li> + <li><a href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/rgmvn.adoc" target="_blank"><i class="fa fa-hand-o-right fa-fw" aria-hidden="true"></i> Blame</a></li> + </ul> + </div> + <div class="sect1"> + <h2 id="__rgmvn">1. Apache Isis Maven plugin</h2> + <div class="sectionbody"> + <div class="paragraph"> + <p>This reference guide describes the goals provided by Apache Isis' Maven plugin.</p> + </div> + <div class="sect2"> + <h3 id="_other_guides">1.1. Other Guides</h3> + <div class="paragraph"> + <p>Apache Isis documentation is broken out into a number of user, reference and "supporting procedures" guides.</p> + </div> + <div class="paragraph"> + <p>The user guides available are:</p> + </div> + <div class="ulist"> + <ul> + <li> <p><a href="../ugfun/ugfun.html">Fundamentals</a></p> </li> + <li> <p><a href="../ugvw/ugvw.html">Wicket viewer</a></p> </li> + <li> <p><a href="../ugvro/ugvro.html">Restful Objects viewer</a></p> </li> + <li> <p><a href="../ugodn/ugodn.html">DataNucleus object store</a></p> </li> + <li> <p><a href="../ugsec/ugsec.html">Security</a></p> </li> + <li> <p><a href="../ugtst/ugtst.html">Testing</a></p> </li> + <li> <p><a href="../ugbtb/ugbtb.html">Beyond the Basics</a></p> </li> + </ul> + </div> + <div class="paragraph"> + <p>The reference guides are:</p> + </div> + <div class="ulist"> + <ul> + <li> <p><a href="../rgant/rgant.html">Annotations</a></p> </li> + <li> <p><a href="../rgsvc/rgsvc.html">Domain Services</a></p> </li> + <li> <p><a href="../rgcfg/rgcfg.html">Configuration Properties</a></p> </li> + <li> <p><a href="../rgcms/rgcms.html">Classes, Methods and Schema</a></p> </li> + <li> <p><a href="../rgmvn/rgmvn.html">Apache Isis Maven plugin</a> (this guide)</p> </li> + <li> <p><a href="../rgfis/rgfis.html">Framework Internal Services</a></p> </li> + </ul> + </div> + <div class="paragraph"> + <p>The remaining guides are:</p> + </div> + <div class="ulist"> + <ul> + <li> <p><a href="../dg/dg.html">Developers' Guide</a> (how to set up a development environment for Apache Isis and contribute back to the project)</p> </li> + <li> <p><a href="../cgcom/cgcom.html">Committers' Guide</a> (release procedures and related practices)</p> </li> + </ul> + </div> + </div> + </div> + </div> + <div class="sect1"> + <h2 id="_rgmvn_intro">2. Introduction</h2> + <div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; "> + <button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_intro.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button> + <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button> + <ul class="dropdown-menu"> + <li><a href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_intro.adoc" target="_blank"><i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i> Edit</a></li> + <li><a href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_intro.adoc" target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i> History</a></li> + <li><a href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_intro.adoc" target="_blank"><i class="fa fa-file-text-o fa-fw" aria-hidden="true"></i> Raw</a></li> + <li><a href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_intro.adoc" target="_blank"><i class="fa fa-hand-o-right fa-fw" aria-hidden="true"></i> Blame</a></li> + </ul> + </div> + <div class="sectionbody"> + <div class="paragraph"> + <p>The Apache Isis Maven plugin defines three goals:</p> + </div> + <div class="ulist"> + <ul> + <li> <p><code>validate</code><br></p> + <div class="paragraph"> + <p>Use to verify at build time that the metamodel of an application is valid. This runs the <code>MetaModelValidator</code> that is also run when the application is started up.</p> + </div> </li> + <li> <p><code>swagger</code><br></p> + <div class="paragraph"> + <p>Uses the <a href="../rgsvc/rgsvc.html#_rgsvc_metadata-api_SwaggerService"><code>SwaggerService</code></a> to generate <a href="http://swagger.io">Swagger</a> spec files that describe the public and/or private RESTful APIs exposed by the <a href="../ugvro/ugvro.html">RestfulObjects viewer</a>.</p> + </div> </li> + <li> <p><code>xsd</code><br></p> + <div class="paragraph"> + <p>Uses the <a href="../rgsvc/rgsvc.html#_rgsvc_integration-api_JaxbService"><code>JaxbService</code></a> to generate XSD schemas from any JAXB-annotated view models/DTOs.<br></p> + </div> + <div class="paragraph"> + <p>This is instead of and preferable to using the JAXB <a href="https://jaxb.java.net/2.2.4/docs/schemagen.html">schemagen</a> tool, because it uses the frameworkâs support (via <a href="../rgant/rgant.html#_rgant-XmlJavaTypeAdapter"><code>@XmlJavaTypeAdapter</code></a>) to translate any references to domain objects into <code>OidDto</code>s (as defined by the Apache Isis <a href="../rgcms/rgcms.html#_rgcms_schema-common">common schema</a>).</p> + </div> </li> + </ul> + </div> + <div class="paragraph"> + <p>The <code>validate</code> goal is by default bound to the <code>test</code> phase, and the <code>swagger</code> goal is by default bound to the <code>package</code> phase; both are typically of your applicationâs <code>dom</code> sub-module. The <code>xsd</code> goal meanwhile defaults to the <code>generate-resources</code> phase, and this is generally used in a completely separate sub-module. An example can be found in the (non-ASF) <a href="http://github.com/isisaddons/isis-app-todoapp">Isis addons' todoapp</a> example app; the separate submodule that uses the <code>xsd</code> goal is (also) called <code>todoapp-xsd</code>.</p> + </div> + <div class="paragraph"> + <p>All of these goals require an <a href="../rgcms/rgcms.html#_rgcms_classes_AppManifest-bootstrapping"><code>AppManifest</code></a> to point the plugin at, so that it knows how to bootstrap an Isis runtime. This is discussed below, followed by sections on configuring the two goals.</p> + </div> + <div class="sect2"> + <h3 id="__rgmvn_intro_app-manifest">2.1. <code>AppManifest</code></h3> + <div class="paragraph"> + <p>As noted in the introduction, all the goals require an <a href="../rgcms/rgcms.html#_rgcms_classes_AppManifest-bootstrapping"><code>AppManifest</code></a> to point the plugin at, so that it knows how to bootstrap an Isis runtime.</p> + </div> + <div class="paragraph"> + <p>This can be extremely minimal; it isnât necessary to use the main <code>AppManifest</code> (in the <code>app</code> module) used to bootstrap the application, you can instead use a cut-down one. This then allows the plugins to be run during the build of the <code>dom</code> module, rather than having to run in the context of the <code>integtest</code> module.</p> + </div> + <div class="paragraph"> + <p>For example, the <a href="../ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp</a>'s manifest is:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="java"><span class="keyword">package</span> <span class="namespace">domainapp.dom</span>; +... +public <span class="type">class</span> <span class="class">DomainAppDomManifest</span> <span class="directive">implements</span> AppManifest { + <span class="annotation">@Override</span> + <span class="directive">public</span> <span class="predefined-type">List</span><<span class="predefined-type">Class</span><?>> getModules() { + <span class="keyword">return</span> <span class="predefined-type">Arrays</span>.asList( + DomainAppDomainModule.class <span class="comment">// domain (entities and repositories)</span> + ); + } + <span class="annotation">@Override</span> + <span class="directive">public</span> <span class="predefined-type">List</span><<span class="predefined-type">Class</span><?>> getAdditionalServices() { <span class="keyword">return</span> <span class="predefined-type">Collections</span>.emptyList(); } + <span class="annotation">@Override</span> + <span class="directive">public</span> <span class="predefined-type">String</span> getAuthenticationMechanism() { <span class="keyword">return</span> <span class="predefined-constant">null</span>; } + <span class="annotation">@Override</span> + <span class="directive">public</span> <span class="predefined-type">String</span> getAuthorizationMechanism() { <span class="keyword">return</span> <span class="predefined-constant">null</span>; } + <span class="annotation">@Override</span> + <span class="directive">public</span> <span class="predefined-type">List</span><<span class="predefined-type">Class</span><? <span class="directive">extends</span> FixtureScript>> getFixtures() { <span class="keyword">return</span> <span class="predefined-constant">null</span>; } + <span class="annotation">@Override</span> + <span class="directive">public</span> <span class="predefined-type">Map</span><<span class="predefined-type">String</span>, <span class="predefined-type">String</span>> getConfigurationProperties() { <span class="keyword">return</span> <span class="predefined-constant">null</span>; } +}</code></pre> + </div> + </div> + <div class="paragraph"> + <p>where <code>DomainAppDomainModule</code> simply identifies the package for the manifest to search under:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="java"><span class="keyword">package</span> <span class="namespace">domainapp.dom</span>; +<span class="directive">public</span> <span class="directive">final</span> <span class="type">class</span> <span class="class">DomainAppDomainModule</span> { }</code></pre> + </div> + </div> + <div class="paragraph"> + <p>The downside of using a minimal <code>AppManifest</code> in the <code>dom</code> module is that any contributed actions/associations will be ignored.</p> + </div> + <div class="paragraph"> + <p>We recommend the following:</p> + </div> + <div class="ulist"> + <ul> + <li> <p>run the <code>validate</code> goal in the <code>dom</code> submodule; this will give early warning if there are any syntactic errors in the model, eg orphaned supporting methods</p> </li> + <li> <p>run the <code>swagger</code> goal in the <code>integtest</code> submodule; this ensures that the generated Swagger schema definition files correctly include any contributed actions/associations.</p> </li> + <li> <p>run the <code>xsd</code> plugin in a new <code>xsd</code> submodule; contributed actions are irrelevant for this particular goal; having a separate submodule allows the configuration of both the <code>xsd</code> goal (to generate the XSD schemas) and any other XSD-related configuration to be kept in a single place.</p> </li> + </ul> + </div> + <div class="paragraph"> + <p>The <a href="../ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp archetype</a> reflects these recommendations for the <code>validate</code> and <code>swagger</code> goals. You can find an example of the <code>xsd</code> plugin in the (non-ASF) <a href="http://github.com/isisaddons/isis-app-todoapp">Isis addons' todoapp</a> application.</p> + </div> + </div> + </div> + </div> + <div class="sect1"> + <h2 id="_rgmvn_validate">3. <code>validate</code> goal</h2> + <div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; "> + <button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_validate.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button> + <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button> + <ul class="dropdown-menu"> + <li><a href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_validate.adoc" target="_blank"><i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i> Edit</a></li> + <li><a href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_validate.adoc" target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i> History</a></li> + <li><a href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_validate.adoc" target="_blank"><i class="fa fa-file-text-o fa-fw" aria-hidden="true"></i> Raw</a></li> + <li><a href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_validate.adoc" target="_blank"><i class="fa fa-hand-o-right fa-fw" aria-hidden="true"></i> Blame</a></li> + </ul> + </div> + <div class="sectionbody"> + <div class="paragraph"> + <p>The Apache Isis programming model requires that a number of naming conventions are followed.</p> + </div> + <div class="paragraph"> + <p>For example, the validator will detect any orphaned supporting methods (eg <code>hideXxx()</code>) if the corresponding property or action has been renamed or deleted but the supporting method was not also updated. Another example is that a class cannot have a title specified both using <code>title()</code> method and also using <code>@Title</code> annotation.</p> + </div> + <div class="paragraph"> + <p>When running the application these are enforced by the <code>MetaModelValidator</code> component that detects these errors, failing fast.</p> + </div> + <div class="paragraph"> + <p>The purpose of the <code>validate</code> goal of the <code>isis-maven-plugin</code> is to enforce these naming conventions at build time, typically enforced by way of a continuous integration server.</p> + </div> + <div class="paragraph"> + <p>The <code>validate</code> goal defines a single property:</p> + </div> + <div class="ulist"> + <ul> + <li> <p><code>appManifest</code> - fully qualified class name for the app manifest used to bootstrap the application (see discussion above)</p> </li> + </ul> + </div> + <div class="paragraph"> + <p>The sections below explain how to configure the plugin within an app.</p> + </div> + <div class="admonitionblock note"> + <table> + <tbody> + <tr> + <td class="icon"> <i class="fa icon-note" title="Note"></i> </td> + <td class="content"> + <div class="paragraph"> + <p>The instructions given here relate to <code>1.10.0</code>. This goal was also released for <code>1.9.0</code>, but with a slightly different configuration; see the final section for differences.</p> + </div> </td> + </tr> + </tbody> + </table> + </div> + <div class="sect2"> + <h3 id="__code_dom_code_submodule">3.1. <code>dom</code> submodule</h3> + <div class="paragraph"> + <p>Update the <code>pom.xml</code> (we recommend in your projectâs <code>dom</code> module, and with a <a href="../rgmvn/rgmvn.html#_rgmvn_intro_app-manifest">minimal AppManifest</a>):</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="xml"><span class="tag"><profile></span> + <span class="tag"><id></span>isis-validate<span class="tag"></id></span> + <span class="tag"><activation></span> + <span class="tag"><property></span> + <span class="tag"><name></span>!skip.isis-validate<span class="tag"></name></span> <i class="conum" data-value="1"></i><b>(1)</b> + <span class="tag"></property></span> + <span class="tag"></activation></span> + <span class="tag"><build></span> + <span class="tag"><plugins></span> + <span class="tag"><plugin></span> + <span class="tag"><groupId></span>org.apache.isis.tool<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>isis-maven-plugin<span class="tag"></artifactId></span> + <span class="tag"><version></span>${isis.version}<span class="tag"></version></span> <i class="conum" data-value="2"></i><b>(2)</b> + <span class="tag"><configuration></span> + <span class="tag"><appManifest></span>domainapp.dom.DomainAppDomManifest<span class="tag"></appManifest></span> <i class="conum" data-value="3"></i><b>(3)</b> + <span class="tag"></configuration></span> + <span class="tag"><dependencies></span> + <span class="tag"><dependency></span> + <span class="tag"><groupId></span>${project.groupId}<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>simpleapp-dom<span class="tag"></artifactId></span> <i class="conum" data-value="4"></i><b>(4)</b> + <span class="tag"><version></span>${project.version}<span class="tag"></version></span> + <span class="tag"></dependency></span> + <span class="comment"><!-- workaround to avoid conflict with plexus-default --></span> + <span class="tag"><dependency></span> + <span class="tag"><groupId></span>com.google.guava<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>guava<span class="tag"></artifactId></span> + <span class="tag"><version></span>16.0.1<span class="tag"></version></span> + <span class="tag"></dependency></span> + <span class="tag"></dependencies></span> + <span class="tag"><executions></span> + <span class="tag"><execution></span> + <span class="tag"><phase></span>test<span class="tag"></phase></span> + <span class="tag"><goals></span> + <span class="tag"><goal></span>validate<span class="tag"></goal></span> <i class="conum" data-value="5"></i><b>(5)</b> + <span class="tag"></goals></span> + <span class="tag"></execution></span> + <span class="tag"></executions></span> + <span class="tag"></plugin></span> + <span class="tag"></plugins></span> + <span class="tag"></build></span> +<span class="tag"></profile></span></code></pre> + </div> + </div> + <div class="colist arabic"> + <table> + <tbody> + <tr> + <td><i class="conum" data-value="1"></i><b>1</b></td> + <td>the profile is active by default, though can be disabled using <code>-Dskip.isis-validate</code></td> + </tr> + <tr> + <td><i class="conum" data-value="2"></i><b>2</b></td> + <td>set to <code>1.10.0</code> (or any later version)</td> + </tr> + <tr> + <td><i class="conum" data-value="3"></i><b>3</b></td> + <td>the manifest discussed <a href="../rgmvn/rgmvn.html#_rgmvn_intro_app-manifest">previously</a>; adjust as required</td> + </tr> + <tr> + <td><i class="conum" data-value="4"></i><b>4</b></td> + <td>the <code>dom</code> module for the project; adjust as required</td> + </tr> + <tr> + <td><i class="conum" data-value="5"></i><b>5</b></td> + <td>binds the pluginâs <code>validate</code> goal to the Maven <code>test</code> lifecycle phase (ie the goal will be called when <code>mvn test</code> is run).</td> + </tr> + </tbody> + </table> + </div> + </div> + <div class="sect2"> + <h3 id="_to_run">3.2. To run</h3> + <div class="paragraph"> + <p>The plugin is activated by default, so is run simply using:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="bash">mvn test</code></pre> + </div> + </div> + <div class="paragraph"> + <p>This will run any tests, and then also - because the plugin is activated by the <code>isis-validate</code> property and bound to the <code>test</code> phase, will run the pluginâs <code>validate</code> goal.</p> + </div> + <div class="paragraph"> + <p>If for any reason you want to disable the validation, use:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="bash">mvn test -Dskip.isis-validate</code></pre> + </div> + </div> + </div> + <div class="sect2"> + <h3 id="_example_of_failure">3.3. Example of failure</h3> + <div class="paragraph"> + <p>In the <a href="../ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp</a> application the <code>SimpleObject</code> defines an <code>updateName</code> action. This has a supporting method:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> SimpleObject updateName( ... ) { ... } +<span class="directive">public</span> <span class="predefined-type">String</span> default0UpdateName() { ... }</code></pre> + </div> + </div> + <div class="paragraph"> + <p>We can introduce an error by misspelling the supporting method, for example:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="predefined-type">String</span> default0XUpdateName() { ... }</code></pre> + </div> + </div> + <div class="paragraph"> + <p>Running <code>mvn test</code> then generates this output:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="bash">[error] +[error] +[error] +[error] domainapp.dom.simple.SimpleObject#default0XUpdateName: has prefix default, is probably a supporting method for a property, collection or action. If the method is intended to be an action, then rename and use @ActionLayout(named="...") or ignore completely using @Programmatic +[error] +[error] +[error] +[INFO] ------------------------------------------------------------------------ +[INFO] Reactor Summary: +[INFO] +[INFO] Simple App ......................................... SUCCESS [ 0.087 s] +[INFO] Simple App DOM ..................................... FAILURE [ 4.182 s] +[INFO] Simple App Fixtures ................................ SKIPPED +[INFO] Simple App Application ............................. SKIPPED +[INFO] Simple App Integration Tests ....................... SKIPPED +[INFO] Simple App Webapp .................................. SKIPPED +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD FAILURE +[INFO] ------------------------------------------------------------------------ +[INFO] ... +[ERROR] Failed to execute goal org.apache.isis.tool:isis-maven-plugin:1.13.0:validate (default) on project simpleapp-dom: 1 problems found. -> [Help 1]</code></pre> + </div> + </div> + <div class="paragraph"> + <p>If one were to attempt to run the application, the same error would appear in the log files on startup (and the application would not boot).</p> + </div> + </div> + <div class="sect2"> + <h3 id="_custom_validation_rules">3.4. Custom validation rules</h3> + <div class="paragraph"> + <p>It is also possible to customize the validation, explained <a href="../ugbtb/ugbtb.html#_ugbtb_programming-model_custom-validator">here</a>. For example, you could enforce project-specific conventions by implementing a custom <code>MetaModelValidator</code>, and registering using a configuration property.</p> + </div> + <div class="paragraph"> + <p>To support this using <code>AppManifest`s, override its `getConfigurationProperties()</code> method:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="ini">public class DomainAppDomManifest implements AppManifest { + ... + public Map<String, String> getConfigurationProperties() { + final Map<String, String> map = Maps.newTreeMap(); + map.put("isis.reflector.validator","com.mycompany.myapp.MyMetaModelValidator"); + return map; + } +}</code></pre> + </div> + </div> + </div> + <div class="sect2"> + <h3 id="_1_9_0_version">3.5. 1.9.0 version</h3> + <div class="paragraph"> + <p>The <code>1.9.0</code> version of the plugin requires slightly different configuration. Rather than using an <code>AppManifest</code>, instead the configuration directory containing <code>isis.properties</code> is specified:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="xml"><span class="tag"><profile></span> + <span class="tag"><id></span>isis-validate<span class="tag"></id></span> + <span class="tag"><activation></span> + <span class="tag"><activeByDefault></span>false<span class="tag"></activeByDefault></span> <i class="conum" data-value="1"></i><b>(1)</b> + <span class="tag"></activation></span> + <span class="tag"><build></span> + <span class="tag"><plugins></span> + <span class="tag"><plugin></span> + <span class="tag"><groupId></span>org.apache.isis.tool<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>isis-maven-plugin<span class="tag"></artifactId></span> + <span class="tag"><version></span>1.9.0<span class="tag"></version></span> + <span class="tag"><configuration></span> + <span class="tag"><isisConfigDir></span>../webapp/src/main/webapp/WEB-INF<span class="tag"></isisConfigDir></span> <i class="conum" data-value="2"></i><b>(2)</b> + <span class="tag"></configuration></span> + <span class="tag"><dependencies></span> + <span class="tag"><dependency></span> + <span class="tag"><groupId></span>org.apache.isis.example.application<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>simpleapp-dom<span class="tag"></artifactId></span> + <span class="tag"><version></span>1.9.0<span class="tag"></version></span> + <span class="tag"></dependency></span> + <span class="comment"><!-- workaround to avoid conflict with plexus-default --></span> + <span class="tag"><dependency></span> + <span class="tag"><groupId></span>com.google.guava<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>guava<span class="tag"></artifactId></span> + <span class="tag"><version></span>16.0.1<span class="tag"></version></span> + <span class="tag"></dependency></span> + <span class="tag"></dependencies></span> + <span class="tag"><executions></span> + <span class="tag"><execution></span> + <span class="tag"><phase></span>test<span class="tag"></phase></span> + <span class="tag"><goals></span> + <span class="tag"><goal></span>validate<span class="tag"></goal></span> + <span class="tag"></goals></span> + <span class="tag"></execution></span> + <span class="tag"></executions></span> + <span class="tag"></plugin></span> + <span class="tag"></plugins></span> + <span class="tag"></build></span> +<span class="tag"></profile></span></code></pre> + </div> + </div> + <div class="colist arabic"> + <table> + <tbody> + <tr> + <td><i class="conum" data-value="1"></i><b>1</b></td> + <td>activated using the <code>-P</code> profile flag rather than a <code>-D</code> system property</td> + </tr> + <tr> + <td><i class="conum" data-value="2"></i><b>2</b></td> + <td>specify the <code>isisConfigDir</code> directory (containing the <code>isis.properties</code> file).</td> + </tr> + </tbody> + </table> + </div> + <div class="paragraph"> + <p>To use the <code>1.9.0</code> version, use:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="bash">mvn -P isis-validate test</code></pre> + </div> + </div> + <div class="admonitionblock note"> + <table> + <tbody> + <tr> + <td class="icon"> <i class="fa icon-note" title="Note"></i> </td> + <td class="content"> + <div class="paragraph"> + <p>Note that the <code>isisConfigDir</code> property was removed in <code>1.10.0</code>; only the <code>AppManifest</code> approach is supported.</p> + </div> </td> + </tr> + </tbody> + </table> + </div> + </div> + </div> + </div> + <div class="sect1"> + <h2 id="_rgmvn_swagger">4. <code>swagger</code> goal</h2> + <div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; "> + <button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_swagger.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button> + <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button> + <ul class="dropdown-menu"> + <li><a href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_swagger.adoc" target="_blank"><i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i> Edit</a></li> + <li><a href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_swagger.adoc" target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i> History</a></li> + <li><a href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_swagger.adoc" target="_blank"><i class="fa fa-file-text-o fa-fw" aria-hidden="true"></i> Raw</a></li> + <li><a href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_swagger.adoc" target="_blank"><i class="fa fa-hand-o-right fa-fw" aria-hidden="true"></i> Blame</a></li> + </ul> + </div> + <div class="sectionbody"> + <div class="paragraph"> + <p>The <code>swagger</code> goal of the <code>isis-maven-plugin</code> uses the <a href="../rgsvc/rgsvc.html#_rgsvc_metadata-api_SwaggerService"><code>SwaggerService</code></a> to generate <a href="http://swagger.io">Swagger</a> spec files to describe the public and/or private RESTful APIs exposed by the <a href="../ugvro/ugvro.html">RestfulObjects viewer</a>.</p> + </div> + <div class="paragraph"> + <p>These spec files, once generated, can then be used in the build pipeline to generate client-side stubs, typically using Swaggerâs own <a href="https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen-maven-plugin">swagger-codegen-maven</a> plugin.</p> + </div> + <div class="paragraph"> + <p>The <code>swagger</code> goal defines the following properties:</p> + </div> + <div class="ulist"> + <ul> + <li> <p><code>appManifest</code> - fully qualified class name for the app manifest used to bootstrap the application (see discussion above)</p> </li> + <li> <p><code>fileNamePrefix</code> - (optional) a prefix to the generated file names (is suffixed by the requested visibilities, see below).<br></p> + <div class="paragraph"> + <p>Defaults to <code>swagger</code>.</p> + </div> </li> + <li> <p><code>visibilities</code> - (optional) list of required visibilities.<br></p> + <div class="paragraph"> + <p>Defaults to [<code>PUBLIC</code>, <code>PRIVATE</code>] (meaning that two spec files will be created).</p> + </div> </li> + <li> <p><code>format</code> - (optional) which format to generate, either <code>JSON</code> or <code>YAML</code>.<br></p> + <div class="paragraph"> + <p>Defaults to <code>JSON</code>.</p> + </div> </li> + <li> <p><code>output</code> - (optional) subdirectory under the <code>target</code> directory to generate the swagger schema definition files<br></p> + <div class="paragraph"> + <p>Defaults to <code>generated-resources/isis-swagger</code></p> + </div> </li> + </ul> + </div> + <div class="sect2"> + <h3 id="__code_integtest_code_submodule">4.1. <code>integtest</code> submodule</h3> + <div class="paragraph"> + <p>Update the <code>pom.xml</code> (in your projectâs <code>integtest</code> module):</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="xml"><span class="tag"><profile></span> + <span class="tag"><id></span>isis-swagger<span class="tag"></id></span> + <span class="tag"><activation></span> + <span class="tag"><property></span> + <span class="tag"><name></span>!skip.isis-swagger<span class="tag"></name></span> <i class="conum" data-value="1"></i><b>(1)</b> + <span class="tag"></property></span> + <span class="tag"></activation></span> + <span class="tag"><build></span> + <span class="tag"><plugins></span> + <span class="tag"><plugin></span> + <span class="tag"><groupId></span>org.apache.isis.tool<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>isis-maven-plugin<span class="tag"></artifactId></span> + <span class="tag"><version></span>${isis.version}<span class="tag"></version></span> <i class="conum" data-value="2"></i><b>(2)</b> + <span class="tag"><configuration></span> + <span class="tag"><appManifest></span>domainapp.app.DomainAppAppManifest<span class="tag"></appManifest></span> <i class="conum" data-value="3"></i><b>(3)</b> + <span class="tag"><visibilities></span> <i class="conum" data-value="4"></i><b>(4)</b> + <span class="tag"><visibility></span>PUBLIC<span class="tag"></visibility></span> + <span class="tag"><visibility></span>PRIVATE<span class="tag"></visibility></span> + <span class="tag"></visibilities></span> + <span class="tag"><format></span>JSON<span class="tag"></format></span> <i class="conum" data-value="5"></i><b>(5)</b> + <span class="tag"><fileNamePrefix></span>swagger<span class="tag"></fileNamePrefix></span> <i class="conum" data-value="5"></i><b>(5)</b> + <span class="tag"></configuration></span> + <span class="tag"><dependencies></span> + <span class="tag"><dependency></span> + <span class="tag"><groupId></span>${project.groupId}<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>simpleapp-dom<span class="tag"></artifactId></span> <i class="conum" data-value="6"></i><b>(6)</b> + <span class="tag"><version></span>${project.version}<span class="tag"></version></span> + <span class="tag"></dependency></span> + <span class="tag"><dependency></span> + <span class="tag"><groupId></span>com.google.guava<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>guava<span class="tag"></artifactId></span> + <span class="tag"><version></span>16.0.1<span class="tag"></version></span> + <span class="tag"></dependency></span> + <span class="tag"></dependencies></span> + <span class="tag"><executions></span> + <span class="tag"><execution></span> + <span class="tag"><phase></span>package<span class="tag"></phase></span> + <span class="tag"><goals></span> + <span class="tag"><goal></span>swagger<span class="tag"></goal></span> <i class="conum" data-value="7"></i><b>(7)</b> + <span class="tag"></goals></span> + <span class="tag"></execution></span> + <span class="tag"></executions></span> + <span class="tag"></plugin></span> + <span class="tag"></plugins></span> + <span class="tag"></build></span> +<span class="tag"></profile></span></code></pre> + </div> + </div> + <div class="colist arabic"> + <table> + <tbody> + <tr> + <td><i class="conum" data-value="1"></i><b>1</b></td> + <td>the profile is active by default, though can be disabled using <code>-Dskip.isis-swagger</code></td> + </tr> + <tr> + <td><i class="conum" data-value="2"></i><b>2</b></td> + <td>set to <code>1.11.0</code> (or any later version)</td> + </tr> + <tr> + <td><i class="conum" data-value="3"></i><b>3</b></td> + <td>the manifest discussed <a href="../rgmvn/rgmvn.html#_rgmvn_intro_app-manifest">previously</a>; adjust as required</td> + </tr> + <tr> + <td><i class="conum" data-value="4"></i><b>4</b></td> + <td>the visibilities to create (one swagger spec file per visibility listed)</td> + </tr> + <tr> + <td><i class="conum" data-value="5"></i><b>5</b></td> + <td>which file format to generate the spec files as.</td> + </tr> + <tr> + <td><i class="conum" data-value="6"></i><b>6</b></td> + <td>the <code>dom</code> module for the project; adjust as required</td> + </tr> + <tr> + <td><i class="conum" data-value="7"></i><b>7</b></td> + <td>binds the pluginâs <code>swagger</code> goal to the Maven <code>package</code> lifecycle phase (ie the goal will be called when <code>mvn package</code> is run).</td> + </tr> + </tbody> + </table> + </div> + </div> + <div class="sect2"> + <h3 id="_to_run_2">4.2. To run</h3> + <div class="paragraph"> + <p>The plugin is activated by default, so is run simply using:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="bash">mvn package</code></pre> + </div> + </div> + </div> + </div> + </div> + <div class="sect1"> + <h2 id="_rgmvn_xsd">5. <code>xsd</code> goal</h2> + <div class="btn-group" style="float: right; font-size: small; padding: 6px; margin-top: -55px; "> + <button type="button" class="btn btn-xs btn-default" onclick="window.location.href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_xsd.adoc""><i class="fa fa-pencil-square-o"></i> Edit</button> + <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button> + <ul class="dropdown-menu"> + <li><a href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_xsd.adoc" target="_blank"><i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i> Edit</a></li> + <li><a href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_xsd.adoc" target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i> History</a></li> + <li><a href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_xsd.adoc" target="_blank"><i class="fa fa-file-text-o fa-fw" aria-hidden="true"></i> Raw</a></li> + <li><a href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/rgmvn/_rgmvn_xsd.adoc" target="_blank"><i class="fa fa-hand-o-right fa-fw" aria-hidden="true"></i> Blame</a></li> + </ul> + </div> + <div class="sectionbody"> + <div class="paragraph"> + <p>The <code>xsd</code> goal of the <code>isis-maven-plugin</code> uses the <a href="../rgsvc/rgsvc.html#_rgsvc_integration-api_JaxbService"><code>JaxbService</code></a> to generate XSD schemas from any JAXB-annotated <a href="../ugfun/ugfun.html#_ugfun_building-blocks_types-of-domain-objects_view-models">view model/DTOs</a>.</p> + </div> + <div class="paragraph"> + <p>This is instead of and preferable to using the JAXB <a href="https://jaxb.java.net/2.2.4/docs/schemagen.html">schemagen</a> tool, because it uses the frameworkâs support (via <a href="../rgant/rgant.html#_rgant-XmlJavaTypeAdapter"><code>@XmlJavaTypeAdapter</code></a>) to translate any references to domain objects into <code>OidDto</code>s (as defined by the Apache Isis <a href="../rgcms/rgcms.html#_rgcms_schema-common">common schema</a>).</p> + </div> + <div class="paragraph"> + <p>The <code>xsd</code> goal defines the following properties:</p> + </div> + <div class="ulist"> + <ul> + <li> <p><code>appManifest</code> - fully qualified class name for the app manifest used to bootstrap the application (see discussion above)</p> </li> + <li> <p><code>jaxbClasses</code> - a list of <a href="../ugfun/ugfun.html#_ugfun_programming-model_view-models_jaxb">JAXB-annotated view model</a> classes;</p> </li> + <li> <p><code>output</code> - (optional) subdirectory under the <code>target</code> directory to generate the XSDs<br></p> + <div class="paragraph"> + <p>Defaults to <code>generated-resources/isis-xsd</code></p> + </div> </li> + <li> <p><code>separate</code> - (optional) whether to create separate directories for each JAXB-class.<br></p> + <div class="paragraph"> + <p>Defaults to <code>false</code>. Most DTO classes will reference one another or the <a href="../rgcms/rgcms.html#_rgcms_schema-common">common schema</a>. Normally itâs fine to merge all these XSDs together. This property, if set, results in each a separate directory for each generation of its XSD or XSDs.</p> + </div> </li> + <li> <p><code>commonSchemas</code> - (optional) whether to also generate the isis common schema(s).<br></p> + <div class="paragraph"> + <p>Defaults to <code>false</code>; if set then the call to <a href="../rgsvc/rgsvc.html#_rgsvc_integration-api_JaxbService"><code>JaxbService</code></a> will set <code>IsisSchemas.INCLUDE</code> flag.</p> + </div> </li> + </ul> + </div> + <div class="paragraph"> + <p>As a convenience to any (Java) consumers, the XSDs generated from the view models can then in turn be generated into DTOs. The original view models and these DTOs are similar but not identical: while the view models can only be used within the Isis application (they may reference underlying domain entities) whereas the DTO classes generated from the XSDs can be used standalone, eg by a Java subscriber running on an ESB such as Apache Camel.</p> + </div> + <div class="paragraph"> + <p>The rest of this section explains how to configure a new <code>xsd</code> submodule that uses the <code>isis-maven-plugin</code> along with other standard plugins in order to generate both XSDs and DTOs. The <code>pom.xml</code> described below uses Maven profiles to separate out these two responsibilities.</p> + </div> + <div class="sect2"> + <h3 id="__rgmvn_xsd_xsd-submodule">5.1. <code>xsd</code> submodule</h3> + <div class="paragraph"> + <p>We recommend creating a new submodule that will perform the following build steps:</p> + </div> + <div class="ulist"> + <ul> + <li> <p>run the <code>xsd</code> goal (in the <code>generate-resources</code> phase) to generate the XSDs from the specified view model/DTOs</p> </li> + <li> <p>use the <a href="http://maven.apache.org/plugins/maven-assembly-plugin/">maven-assembly-plugin</a> to bundle the generated XSD files into a zip file.</p> </li> + <li> <p>use the <code>xjc-gen</code> to generate corresponding DTO classes from the XSDs.<br></p> + <div class="paragraph"> + <p>These are <em>not</em> the same as the original view models; they are provided as a convenience for subscribers to marshall XML documents into Java classes, but running as a standalone process (not part of the Isis app)</p> + </div> </li> + </ul> + </div> + <div class="paragraph"> + <p>These two main responsibilities can then be placed into separate Maven profiles, for better modularity. The diagram below shows the overall design:</p> + </div> + <div class="imageblock"> + <div class="content"> + <a class="image" href="images/maven-plugin/xsd-goal.png"><img src="images/maven-plugin/xsd-goal.png" alt="xsd goal" width="800px"></a> + </div> + </div> + <div class="paragraph"> + <p>For example, here is the <code>pom.xml</code> file for the (non-ASF) <a href="http://github.com/isisaddons/isis-app-todoapp">Isis addons' todoapp</a> example appâs <code>todoapp-xsd</code> submodule.</p> + </div> + <div class="paragraph"> + <p>First, the usual boilerplate:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="xml"><span class="preprocessor"><?xml version="1.0" encoding="UTF-8"?></span> +<span class="tag"><project</span> <span class="attribute-name">xmlns</span>=<span class="string"><span class="delimiter">"</span><span class="content">http://maven.apache.org/POM/4.0.0</span><span class="delimiter">"</span></span> <span class="attribute-name">xmlns:xsi</span>=<span class="string"><span class="delimiter">"</span><span class="content">http://www.w3.org/2001/XMLSchema-instance</span><span class="delimiter">"</span></span> <span class="attribute-name">xsi:schemaLocation</span>=<span class="string"><span class="delimiter">"</span><span class="content">http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd</span><span class="delimiter">"</span></span><span class="tag">></span> + <span class="tag"><modelVersion></span>4.0.0<span class="tag"></modelVersion></span> + + <span class="tag"><parent></span> + <span class="tag"><groupId></span>com.mycompany<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>todoapp<span class="tag"></artifactId></span> + <span class="tag"><version></span>1.0.0-SNAPSHOT<span class="tag"></version></span> + <span class="tag"></parent></span> + + <span class="tag"><artifactId></span>todoapp-xsd<span class="tag"></artifactId></span> + <span class="tag"><name></span>Isis Addons ToDoApp XSD<span class="tag"></name></span> + + <span class="tag"><dependencies></span> + <span class="tag"><dependency></span> + <span class="tag"><groupId></span>${project.groupId}<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>todoapp-app<span class="tag"></artifactId></span> <i class="conum" data-value="1"></i><b>(1)</b> + <span class="tag"></dependency></span> + <span class="tag"></dependencies></span> + + <span class="tag"><profiles></span> + <span class="tag"><profile></span> + <span class="tag"><id></span>isis-xsd<span class="tag"></id></span> <i class="conum" data-value="2"></i><b>(2)</b> + ... + <span class="tag"></profile></span> + <span class="tag"><profile></span> + <span class="tag"><id></span>xjc<span class="tag"></id></span> <i class="conum" data-value="3"></i><b>(3)</b> + ... + <span class="tag"></profile></span> + <span class="tag"></profiles></span> +<span class="tag"></project></span></code></pre> + </div> + </div> + <div class="colist arabic"> + <table> + <tbody> + <tr> + <td><i class="conum" data-value="1"></i><b>1</b></td> + <td>depends on the rest of the applicationâs modules</td> + </tr> + <tr> + <td><i class="conum" data-value="2"></i><b>2</b></td> + <td>XSD generation, to run the <code>xsd</code> goal and then assemble into a zip file; within a profile for modularity; see section <a href="#__rgmvn_xsd_xsd-submodule_xsd-profile">below</a></td> + </tr> + <tr> + <td><i class="conum" data-value="3"></i><b>3</b></td> + <td>XJC generation, to run the <code>xjc</code> to generate Java DTO classes from XSDs; within a profile for modularity; see section <a href="#__rgmvn_xsd_xsd-submodule_xjc-profile">below</a></td> + </tr> + </tbody> + </table> + </div> + <div class="paragraph"> + <p>The <a href="#<em>rgmvn_xsd_xsd-submodule_xsd-profile">sections</a> <a href="#</em>rgmvn_xsd_xsd-submodule_xjc-profile">below</a> flesh out the gaps.</p> + </div> + <div class="sect3"> + <h4 id="__rgmvn_xsd_xsd-submodule_xsd-profile">5.1.1. XSD profile</h4> + <div class="paragraph"> + <p>The <code>isis-xsd</code> profile runs the <code>xsd</code> goal of the <code>isis-maven-plugin</code>; these are then zipped up by the assembly plugin:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="xml"><span class="tag"><profile></span> + <span class="tag"><id></span>isis-xsd<span class="tag"></id></span> + <span class="tag"><activation></span> + <span class="tag"><property></span> + <span class="tag"><name></span>!skip.isis-xsd<span class="tag"></name></span> <i class="conum" data-value="1"></i><b>(1)</b> + <span class="tag"></property></span> + <span class="tag"></activation></span> + <span class="tag"><build></span> + <span class="tag"><plugins></span> + <span class="tag"><plugin></span> + <span class="tag"><groupId></span>org.apache.isis.tool<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>isis-maven-plugin<span class="tag"></artifactId></span> + <span class="tag"><version></span>${isis.version}<span class="tag"></version></span> + <span class="tag"><configuration></span> + <span class="tag"><appManifest></span>todoapp.dom.ToDoAppDomManifest<span class="tag"></appManifest></span> <i class="conum" data-value="2"></i><b>(2)</b> + <span class="tag"><jaxbClasses></span> <i class="conum" data-value="3"></i><b>(3)</b> + <span class="tag"><jaxbClass></span>todoapp.app.viewmodels.todoitem.v1_0.ToDoItemDto<span class="tag"></jaxbClass></span> + <span class="tag"><jaxbClass></span>todoapp.app.viewmodels.todoitem.v1_1.ToDoItemDto<span class="tag"></jaxbClass></span> + <span class="tag"></jaxbClasses></span> + <span class="tag"></configuration></span> + <span class="tag"><dependencies></span> + <span class="tag"><dependency></span> + <span class="tag"><groupId></span>${project.groupId}<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>todoapp-dom<span class="tag"></artifactId></span> + <span class="tag"><version></span>${project.version}<span class="tag"></version></span> + <span class="tag"></dependency></span> + <span class="tag"><dependency></span> <i class="conum" data-value="4"></i><b>(4)</b> + <span class="tag"><groupId></span>com.google.guava<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>guava<span class="tag"></artifactId></span> + <span class="tag"><version></span>16.0.1<span class="tag"></version></span> + <span class="tag"></dependency></span> + <span class="tag"></dependencies></span> + <span class="tag"><executions></span> + <span class="tag"><execution></span> + <span class="tag"><phase></span>generate-sources<span class="tag"></phase></span> <i class="conum" data-value="5"></i><b>(5)</b> + <span class="tag"><goals></span> + <span class="tag"><goal></span>xsd<span class="tag"></goal></span> <i class="conum" data-value="6"></i><b>(6)</b> + <span class="tag"></goals></span> + <span class="tag"></execution></span> + <span class="tag"></executions></span> + <span class="tag"></plugin></span> + <span class="tag"><plugin></span> + <span class="tag"><artifactId></span>maven-assembly-plugin<span class="tag"></artifactId></span> <i class="conum" data-value="7"></i><b>(7)</b> + <span class="tag"><version></span>2.5.3<span class="tag"></version></span> + <span class="tag"><configuration></span> + <span class="tag"><descriptor></span>src/assembly/dep.xml<span class="tag"></descriptor></span> <i class="conum" data-value="8"></i><b>(8)</b> + <span class="tag"></configuration></span> + <span class="tag"><executions></span> + <span class="tag"><execution></span> + <span class="tag"><id></span>create-archive<span class="tag"></id></span> + <span class="tag"><phase></span>package<span class="tag"></phase></span> + <span class="tag"><goals></span> + <span class="tag"><goal></span>single<span class="tag"></goal></span> + <span class="tag"></goals></span> + <span class="tag"></execution></span> + <span class="tag"></executions></span> + <span class="tag"></plugin></span> + <span class="tag"></plugins></span> + <span class="tag"></build></span> +<span class="tag"></profile></span></code></pre> + </div> + </div> + <div class="colist arabic"> + <table> + <tbody> + <tr> + <td><i class="conum" data-value="1"></i><b>1</b></td> + <td>enabled <em>unless</em> <code>skip.isis-xsd</code> property specified</td> + </tr> + <tr> + <td><i class="conum" data-value="2"></i><b>2</b></td> + <td>specify the app manifest to bootstrap the Isis runtime within the maven plugin</td> + </tr> + <tr> + <td><i class="conum" data-value="3"></i><b>3</b></td> + <td>enumerate all JAXB-annotated view models</td> + </tr> + <tr> + <td><i class="conum" data-value="4"></i><b>4</b></td> + <td>workaround to avoid conflict with plexus-default</td> + </tr> + <tr> + <td><i class="conum" data-value="5"></i><b>5</b></td> + <td>by default is bound to <code>generate-resources</code>, but bind instead to <code>generate-sources</code> if also running the <code>xjc</code> profile: the XSD are an input to <code>xjc</code>, but it is bound by default to <code>generate-sources</code> and the <code>generate-sources</code> phase runs before the <code>generate-resources</code>.</td> + </tr> + <tr> + <td><i class="conum" data-value="6"></i><b>6</b></td> + <td>run the <code>xsd</code> goal</td> + </tr> + <tr> + <td><i class="conum" data-value="7"></i><b>7</b></td> + <td>define the assembly plugin</td> + </tr> + <tr> + <td><i class="conum" data-value="8"></i><b>8</b></td> + <td>assembles the XSD schemas into a zip file, as defined by the <code>dep.xml</code> file (see below).</td> + </tr> + </tbody> + </table> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="xml"><span class="tag"><assembly</span> <span class="attribute-name">xmlns</span>=<span class="string"><span class="delimiter">"</span><span class="content">http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2</span><span class="delimiter">"</span></span> + <span class="attribute-name">xmlns:xsi</span>=<span class="string"><span class="delimiter">"</span><span class="content">http://www.w3.org/2001/XMLSchema-instance</span><span class="delimiter">"</span></span> + <span class="attribute-name">xsi:schemaLocation</span>=<span class="string"><span class="delimiter">"</span><span class="content">http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2</span> <span class="content">http://maven.apache.org/xsd/assembly-1.1.2.xsd</span><span class="delimiter">"</span></span><span class="tag">></span> + <span class="tag"><id></span>xsd<span class="tag"></id></span> + <span class="tag"><formats></span> + <span class="tag"><format></span>zip<span class="tag"></format></span> + <span class="tag"></formats></span> + <span class="tag"><fileSets></span> + <span class="tag"><fileSet></span> + <span class="tag"><directory></span>${project.build.directory}/generated-resources/isis-xsd<span class="tag"></directory></span> <i class="conum" data-value="1"></i><b>(1)</b> + <span class="tag"><outputDirectory></span>/<span class="tag"></outputDirectory></span> + <span class="tag"></fileSet></span> + <span class="tag"></fileSets></span> +<span class="tag"></assembly></span></code></pre> + </div> + </div> + <div class="colist arabic"> + <table> + <tbody> + <tr> + <td><i class="conum" data-value="1"></i><b>1</b></td> + <td>the location that the <code>xsd</code> goal writes to.</td> + </tr> + </tbody> + </table> + </div> + </div> + <div class="sect3"> + <h4 id="__rgmvn_xsd_xsd-submodule_xjc-profile">5.1.2. XJC profile</h4> + <div class="paragraph"> + <p>The <code>xjc</code> profile reads the XSD generated by the <code>xsd</code> goal, and from it generates Java DTOs. Note that this isnât round-tripping: the original view model is only for use within the Isis app, whereas the DTO generated from the XSDs is for use in a standalone context, eg in a Java subscriber on an event bus.</p> + </div> + <div class="paragraph"> + <p>The <code>xjc</code> profile is defined as:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="xml"><span class="tag"><profile></span> + <span class="tag"><id></span>xjc<span class="tag"></id></span> + <span class="tag"><activation></span> + <span class="tag"><property></span> + <span class="tag"><name></span>!skip.xjc<span class="tag"></name></span> <i class="conum" data-value="1"></i><b>(1)</b> + <span class="tag"></property></span> + <span class="tag"></activation></span> + <span class="tag"><build></span> + <span class="tag"><plugins></span> + <span class="tag"><plugin></span> + <span class="tag"><groupId></span>org.jvnet.jaxb2.maven2<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>maven-jaxb2-plugin<span class="tag"></artifactId></span> + <span class="tag"><version></span>0.12.3<span class="tag"></version></span> + <span class="tag"><executions></span> + <span class="tag"><execution></span> + <span class="tag"><id></span>xjc-generate<span class="tag"></id></span> + <span class="tag"><phase></span>generate-sources<span class="tag"></phase></span> + <span class="tag"><goals></span> + <span class="tag"><goal></span>generate<span class="tag"></goal></span> + <span class="tag"></goals></span> + <span class="tag"></execution></span> + <span class="tag"></executions></span> + <span class="tag"><configuration></span> + <span class="tag"><removeOldOutput></span>true<span class="tag"></removeOldOutput></span> + <span class="tag"><schemaDirectory></span> <i class="conum" data-value="2"></i><b>(2)</b> + target/generated-resources/isis-xsd/viewmodels.app.todoapp/todoitem + <span class="tag"></schemaDirectory></span> + <span class="tag"><schemaIncludes></span> <i class="conum" data-value="3"></i><b>(3)</b> + <span class="tag"><schemaInclude></span>v1_0/todoitem.xsd<span class="tag"></schemaInclude></span> + <span class="tag"><schemaInclude></span>v1_1/todoitem.xsd<span class="tag"></schemaInclude></span> + <span class="tag"></schemaIncludes></span> + <span class="tag"><catalog></span>src/main/resources/catalog.xml<span class="tag"></catalog></span> <i class="conum" data-value="4"></i><b>(4)</b> + <span class="tag"></configuration></span> + <span class="tag"></plugin></span> + <span class="tag"><plugin></span> + <span class="tag"><groupId></span>org.codehaus.mojo<span class="tag"></groupId></span> + <span class="tag"><artifactId></span>build-helper-maven-plugin<span class="tag"></artifactId></span> <i class="conum" data-value="5"></i><b>(5)</b> + <span class="tag"><version></span>1.9.1<span class="tag"></version></span> + <span class="tag"><executions></span> + <span class="tag"><execution></span> + <span class="tag"><id></span>add-source<span class="tag"></id></span> + <span class="tag"><phase></span>generate-sources<span class="tag"></phase></span> + <span class="tag"><goals></span> + <span class="tag"><goal></span>add-source<span class="tag"></goal></span> + <span class="tag"></goals></span> + <span class="tag"><configuration></span> + <span class="tag"><sources></span> + <span class="tag"><source></span>target/generated-sources/xjc<span class="tag"></source></span> <i class="conum" data-value="6"></i><b>(6)</b> + <span class="tag"></sources></span> + <span class="tag"></configuration></span> + <span class="tag"></execution></span> + <span class="tag"></executions></span> + <span class="tag"></plugin></span> + <span class="tag"></plugins></span> + <span class="tag"></build></span> +<span class="tag"></profile></span></code></pre> + </div> + </div> + <div class="colist arabic"> + <table> + <tbody> + <tr> + <td><i class="conum" data-value="1"></i><b>1</b></td> + <td>enabled <em>unless</em> <code>skip.xjc</code> property specified</td> + </tr> + <tr> + <td><i class="conum" data-value="2"></i><b>2</b></td> + <td>specifies the directory that the XSD schemas were generated to by the <code>isis-maven-plugin</code></td> + </tr> + <tr> + <td><i class="conum" data-value="3"></i><b>3</b></td> + <td>specify each of the XSDs to be processed</td> + </tr> + <tr> + <td><i class="conum" data-value="4"></i><b>4</b></td> + <td>catalog file indicates the location of the referenced <a href="../rgcms/rgcms.html#_rgcms_schema-common">common schema</a> XSDs.</td> + </tr> + <tr> + <td><i class="conum" data-value="5"></i><b>5</b></td> + <td>the <code>build-helper-maven-plugin</code> adds the Java source generated by the <code>xjc</code> plugin so that it can be compiled and packaged as any other code</td> + </tr> + <tr> + <td><i class="conum" data-value="6"></i><b>6</b></td> + <td>the location that the <code>xjc</code> plugin generates its source code.</td> + </tr> + </tbody> + </table> + </div> + <div class="paragraph"> + <p>The referenced <code>catalog.xml</code> file instructs the <code>xjc</code> plugin how to resolve referenced schema locations. Only a reference for the Apache Isis <a href="../rgcms/rgcms.html#_rgcms_schema-common">common schema</a> is likely to be needed:</p> + </div> + <div class="listingblock"> + <div class="content"> + <pre class="CodeRay highlight"><code data-lang="xml"><span class="preprocessor"><?xml version="1.0" encoding="UTF-8"?></span> +<span class="doctype"><!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"></span> +<span class="tag"><catalog</span> <span
<TRUNCATED>