Hi Keong, I also noticed this and as I mentioned earlier, I also fixed that internally as part of model driven feature and will be taking to Casablanca release. This was one of the reasons why the generateXsd step was a manual process. I also noticed that aai-schema shouldn't be a dependency to aai-core so it was removed. So aai-core gets built first and the generation of schema gets done and then aai-schema will be build last. I was planning to move the schema generation steps to aai-schema but there was some tight coupling that would take too long to fix in this release. I have plans on making changes in the next release to remove that coupling and move the schema generation stuff to aai-schema.
Thanks, Harish -----Original Message----- From: Keong Lim <[email protected]> Sent: Tuesday, July 31, 2018 4:43 AM To: KAJUR, HARISH V <[email protected]>; [email protected] Subject: RE: Problem regenerating schema for AAI v14 #aai Sensitivity: Confidential Hi Harish, My workspace has the following directory structure: - aai/ - aai/aai-common - aai/aai-common/aai-schema - aai/aai-common/aai-core - etc Sometimes after running the command to regenerate the XSD files: > cd ~/LF/aai/aai-common/aai-core/ > mvn -PgenerateXsd install -DskipTests -Dgendoc.version=v14 I see that there is a new sub-directory created, i.e. - aai/aai-schema This new directory contains all freshly generated XSD files for all versions (despite the gendoc.version being for one specific version). Are these files being generated to the wrong directory? If they are intended to overwrite the aai-schema files, then it should go into "aai/aai-common/aai-schema". If they are simply the build products of aai-core, then it should go into "aai/aai-common/aai-core/target". As it happens now, it is polluting the workspace with extra files that need to be manually cleaned up. Regarding the build order in aai-common, maven reports the order is: - aai-aai-common - aai-annotations - aai-schema - aai-schema-ingest - aai-core - aai-auth - aai-utils When the aai-schema sub-component is built, it appears to copy the schema files from "aai-schema/src/" to "aai-schema/target/" subdirectory. Later, when the aai-core sub-component is built, the auto-generation overwrites the "aai-schema/src/" sub-directory. A subsequent build in aai-schema then produces a different result from the first time. Is it appropriate for a later component to be rewriting the src of an earlier component? This makes for a not-very-reproducible build. Could the "generateXSD", "generateHtml" and "generateYaml" be done in "aai-schema" itself? Alternatively, could the auto-generated files be stored in aai-core, separately from the hand-written files (i.e. the OXM)? Thanks, Keong -----Original Message----- From: KAJUR, HARISH V [mailto:[email protected]] Sent: Monday, 30 July 2018 16:01 To: [email protected]; Keong Lim <[email protected]> Subject: RE: Problem regenerating schema for AAI v14 #aai Sensitivity: Confidential Hi Keong, The html and yaml gets automatically generated when you run install but the xsd was never part of the autogenerate maven profile. For Beijing and earlier release, we never auto generated it. In order to run the generation of the xsd, here is the command: cd ~/LF/aai/aai-common/aai-core/ mvn -PgenerateXsd install -DskipTests -Dgendoc.version=v14 I have actually noticed that recently within the internal release and realized that it makes sense for xsd to be also auto generated. I am not sure why it was left out from the autogenerate profile but when developing the model driven feature, I ensured that the auto generate also does xsd generation. Once that feature gets delivered to Casablanca, there wouldn't be a need to run the profile manually. Thanks, Harish -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11552): https://lists.onap.org/g/onap-discuss/message/11552 Mute This Topic: https://lists.onap.org/mt/23857209/21656 Mute #aai: https://lists.onap.org/mk?hashtag=aai&subid=2740164 Group Owner: [email protected] Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
