Skip to content

Commit

Permalink
Removed OSCAL schemas from build. Using schemas generated directly fr…
Browse files Browse the repository at this point in the history
…om the OSCAL Metaschema modules instead.

Streamlined the build removing extra unneeded configurations. Kept some default configurations for readability.
  • Loading branch information
david-waltermire committed Aug 29, 2023
1 parent 4905565 commit 622aa4f
Showing 1 changed file with 28 additions and 56 deletions.
84 changes: 28 additions & 56 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -284,18 +284,6 @@
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>${project.build.directory}/generated-resources/oscal</directory>
<includes>
<include>**/*.xsd</include>
<include>**/*.json</include>
</includes>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
Expand Down Expand Up @@ -419,45 +407,6 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-oscal-xml-schema</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/generated-resources/oscal/schema/xml</outputDirectory>
<resources>
<resource>
<directory>
${project.basedir}/oscal/xml/schema</directory>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-oscal-json-schema</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/generated-resources/oscal/schema/json</outputDirectory>
<resources>
<resource>
<directory>
${project.basedir}/oscal/json/schema</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
Expand All @@ -474,7 +423,7 @@
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.8</version>
<version>1.7.1</version>
<configuration>
<skipCache>true</skipCache>
<overwrite>false</overwrite>
Expand Down Expand Up @@ -553,13 +502,15 @@
<version>${dependency.metaschema-framework.version}</version>
<executions>
<execution>
<id>default-cli</id>
<id>oscal-codegen</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-sources</goal>
</goals>
<configuration>
<metaschemaDir>
${project.basedir}/oscal/src/metaschema</metaschemaDir>
<outputDirectory>${project.build.directory}/generated-sources/metaschema</outputDirectory>
<configs>
<config>
${project.basedir}/src/main/metaschema-bindings/oscal-metaschema-bindings.xml</config>
Expand All @@ -570,18 +521,39 @@
</configuration>
</execution>
<execution>
<id>generate-schemas</id>
<id>generate-xml-schemas</id>
<goals>
<goal>generate-schemas</goal>
</goals>
<configuration>
<metaschemaDir>
${project.basedir}/oscal/src/metaschema</metaschemaDir>
<outputDirectory>
${project.build.directory}/generated-resources/oscal/schema/xml</outputDirectory>
<includes>
<include>oscal_*_metaschema.xml</include>
</includes>
<formats>
<format>xsd</format>
</formats>
</configuration>
</execution>
<execution>
<id>generate-json-schemas</id>
<goals>
<goal>generate-schemas</goal>
</goals>
<configuration>
<metaschemaDir>
${project.basedir}/oscal/src/metaschema</metaschemaDir>
<outputDirectory>
${project.build.directory}/generated-resources/metaschema-schema</outputDirectory>
${project.build.directory}/generated-resources/oscal/schema/json</outputDirectory>
<includes>
<include>oscal_*_metaschema.xml</include>
</includes>
<formats>
<format>json</format>
</formats>
</configuration>
</execution>
</executions>
Expand All @@ -605,7 +577,7 @@
</execution>
<execution>
<id>add-oscal-resources</id>
<phase>process-resources</phase>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
Expand Down

0 comments on commit 622aa4f

Please sign in to comment.