diff --git a/pom.xml b/pom.xml index 7c61940..8513832 100644 --- a/pom.xml +++ b/pom.xml @@ -58,8 +58,8 @@ - 1.0.2 - 4.0.2 + 1.1.0 + 4.1.0-SNAPSHOT https://oscal-cli.metaschema.dev @@ -89,7 +89,7 @@ 20240303 2.23.1 7.4.0 - 4.8.3 + 4.8.6 12.5 5.2.1 6.0.9 @@ -297,8 +297,7 @@ ${project.basedir}/.git true - - ${project.build.directory}/git.properties + ${project.build.directory}/git.properties true false git @@ -323,8 +322,7 @@ true custom - - ${artifact.groupId}.${artifact.artifactId}-$${artifact.version}.${artifact.extension} + ${artifact.groupId}.${artifact.artifactId}-$${artifact.version}.${artifact.extension} @@ -343,10 +341,8 @@ false flat lib - - @{groupId}@.@{artifactId}@-@{version}@.@{extension}@ - -Dsun.stdout.encoding=UTF-8 - -Dsun.stderr.encoding=UTF-8 + @{groupId}@.@{artifactId}@-@{version}@@{dashClassifier?}@.@{extension}@ + -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 true false @@ -424,8 +420,7 @@ add-third-party - - ${project.build.directory}/generated-distro + ${project.build.directory}/generated-distro LICENSE-THIRD-PARTY.txt The Apache Software License, @@ -453,7 +448,7 @@ maven-jxr-plugin - default + default false diff --git a/src/main/assembly/bin.xml b/src/main/assembly/bin.xml index 38f08c7..30add15 100644 --- a/src/main/assembly/bin.xml +++ b/src/main/assembly/bin.xml @@ -12,7 +12,7 @@ /lib - ${artifact.groupId}.${artifact.artifactId}-${artifact.version}.${artifact.extension} + ${artifact.groupId}.${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension} true org.jetbrains:annotations diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractOscalConvertSubcommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractOscalConvertCommand.java similarity index 96% rename from src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractOscalConvertSubcommand.java rename to src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractOscalConvertCommand.java index 657b960..f279c5a 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractOscalConvertSubcommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractOscalConvertCommand.java @@ -26,9 +26,9 @@ import edu.umd.cs.findbugs.annotations.NonNull; -public abstract class AbstractOscalConvertSubcommand +public abstract class AbstractOscalConvertCommand extends AbstractConvertSubcommand { - private static final Logger LOGGER = LogManager.getLogger(AbstractOscalConvertSubcommand.class); + private static final Logger LOGGER = LogManager.getLogger(AbstractOscalConvertCommand.class); @NonNull public abstract Class getOscalClass(); diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractOscalValidationSubcommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractOscalValidationCommand.java similarity index 97% rename from src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractOscalValidationSubcommand.java rename to src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractOscalValidationCommand.java index ab3f8c8..e491b87 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractOscalValidationSubcommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractOscalValidationCommand.java @@ -26,7 +26,7 @@ import edu.umd.cs.findbugs.annotations.NonNull; -public abstract class AbstractOscalValidationSubcommand +public abstract class AbstractOscalValidationCommand extends AbstractValidateContentCommand { @NonNull diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractRenderSubcommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractRenderCommand.java similarity index 98% rename from src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractRenderSubcommand.java rename to src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractRenderCommand.java index c21f915..7e15f64 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractRenderSubcommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/AbstractRenderCommand.java @@ -34,9 +34,9 @@ import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; -public abstract class AbstractRenderSubcommand +public abstract class AbstractRenderCommand extends AbstractTerminalCommand { - private static final Logger LOGGER = LogManager.getLogger(AbstractRenderSubcommand.class); + private static final Logger LOGGER = LogManager.getLogger(AbstractRenderCommand.class); @NonNull private static final String COMMAND = "render"; diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/ValidateCommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/ValidateCommand.java index 245c7a1..8103d92 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/ValidateCommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/ValidateCommand.java @@ -23,7 +23,7 @@ import edu.umd.cs.findbugs.annotations.NonNull; public class ValidateCommand - extends AbstractOscalValidationSubcommand { + extends AbstractOscalValidationCommand { @Override public String getDescription() { return "Check that the specified OSCAL instance is well-formed and valid to an OSCAL model."; diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/assessmentplan/ConvertSubcommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/assessmentplan/ConvertSubcommand.java index 9c4433c..18cd1b3 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/assessmentplan/ConvertSubcommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/assessmentplan/ConvertSubcommand.java @@ -7,10 +7,10 @@ import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.oscal.lib.model.AssessmentPlan; -import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalConvertSubcommand; +import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalConvertCommand; public class ConvertSubcommand - extends AbstractOscalConvertSubcommand { + extends AbstractOscalConvertCommand { @Override public String getDescription() { return "Convert the specified OSCAL Assessment Plan to a different format"; diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/assessmentresults/ConvertSubcommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/assessmentresults/ConvertSubcommand.java index 2e15625..1d1caeb 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/assessmentresults/ConvertSubcommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/assessmentresults/ConvertSubcommand.java @@ -7,10 +7,10 @@ import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.oscal.lib.model.AssessmentResults; -import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalConvertSubcommand; +import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalConvertCommand; public class ConvertSubcommand - extends AbstractOscalConvertSubcommand { + extends AbstractOscalConvertCommand { @Override public String getDescription() { return "Convert the specified OSCAL Assessment Results to a different format"; diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/catalog/ConvertSubcommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/catalog/ConvertSubcommand.java index 991fbcd..fb16c2a 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/catalog/ConvertSubcommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/catalog/ConvertSubcommand.java @@ -7,10 +7,10 @@ import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.oscal.lib.model.Catalog; -import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalConvertSubcommand; +import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalConvertCommand; public class ConvertSubcommand - extends AbstractOscalConvertSubcommand { + extends AbstractOscalConvertCommand { @Override public String getDescription() { diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/catalog/RenderSubcommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/catalog/RenderSubcommand.java index 2fafef2..4ee9e15 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/catalog/RenderSubcommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/catalog/RenderSubcommand.java @@ -5,7 +5,7 @@ package gov.nist.secauto.oscal.tools.cli.core.commands.catalog; -import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractRenderSubcommand; +import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractRenderCommand; import gov.nist.secauto.oscal.tools.cli.core.operations.XMLOperations; import java.io.IOException; @@ -14,7 +14,7 @@ import javax.xml.transform.TransformerException; public class RenderSubcommand - extends AbstractRenderSubcommand { + extends AbstractRenderCommand { @Override public String getDescription() { return "Render the specified OSCAL Catalog as HTML"; diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/componentdefinition/ConvertSubcommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/componentdefinition/ConvertSubcommand.java index 05e9e56..2e73972 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/componentdefinition/ConvertSubcommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/componentdefinition/ConvertSubcommand.java @@ -7,10 +7,10 @@ import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.oscal.lib.model.ComponentDefinition; -import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalConvertSubcommand; +import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalConvertCommand; public class ConvertSubcommand - extends AbstractOscalConvertSubcommand { + extends AbstractOscalConvertCommand { @Override public String getDescription() { return "Convert the specified OSCAL Component Definition to a different format"; diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/oscal/AbstractDeprecatedOscalValidationSubcommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/oscal/AbstractDeprecatedOscalValidationSubcommand.java index 66df7c4..61ea1d5 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/oscal/AbstractDeprecatedOscalValidationSubcommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/oscal/AbstractDeprecatedOscalValidationSubcommand.java @@ -8,7 +8,7 @@ import gov.nist.secauto.metaschema.cli.processor.CLIProcessor.CallingContext; import gov.nist.secauto.metaschema.cli.processor.ExitStatus; import gov.nist.secauto.metaschema.cli.processor.command.ICommandExecutor; -import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalValidationSubcommand; +import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalValidationCommand; import org.apache.commons.cli.CommandLine; import org.apache.logging.log4j.LogManager; @@ -17,7 +17,7 @@ import edu.umd.cs.findbugs.annotations.NonNull; public abstract class AbstractDeprecatedOscalValidationSubcommand - extends AbstractOscalValidationSubcommand { + extends AbstractOscalValidationCommand { private static final Logger LOGGER = LogManager.getLogger(AbstractDeprecatedOscalValidationSubcommand.class); @Override @@ -26,7 +26,7 @@ public ICommandExecutor newExecutor(CallingContext callingContext, CommandLine c } protected final class DeprecatedOscalCommandExecutor - extends AbstractOscalValidationSubcommand.OscalCommandExecutor { + extends AbstractOscalValidationCommand.OscalCommandExecutor { private DeprecatedOscalCommandExecutor( @NonNull CallingContext callingContext, diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/poam/ConvertSubcommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/poam/ConvertSubcommand.java index c216f08..2b2b702 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/poam/ConvertSubcommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/poam/ConvertSubcommand.java @@ -7,10 +7,10 @@ import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.oscal.lib.model.PlanOfActionAndMilestones; -import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalConvertSubcommand; +import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalConvertCommand; public class ConvertSubcommand - extends AbstractOscalConvertSubcommand { + extends AbstractOscalConvertCommand { @Override public String getDescription() { return "Convert the specified OSCAL Plan of Actions and Milestones to a different format"; diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/profile/ConvertSubcommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/profile/ConvertSubcommand.java index e27c7bb..9a5ba3d 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/profile/ConvertSubcommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/profile/ConvertSubcommand.java @@ -7,10 +7,10 @@ import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.oscal.lib.model.Profile; -import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalConvertSubcommand; +import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalConvertCommand; public class ConvertSubcommand - extends AbstractOscalConvertSubcommand { + extends AbstractOscalConvertCommand { @Override public String getDescription() { return "Convert a specified OSCAL Profile to a different format"; diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/profile/RenderSubcommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/profile/RenderSubcommand.java index 68e413c..2f83f16 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/profile/RenderSubcommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/profile/RenderSubcommand.java @@ -5,7 +5,7 @@ package gov.nist.secauto.oscal.tools.cli.core.commands.profile; -import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractRenderSubcommand; +import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractRenderCommand; import gov.nist.secauto.oscal.tools.cli.core.operations.XMLOperations; import java.io.IOException; @@ -14,7 +14,7 @@ import javax.xml.transform.TransformerException; public class RenderSubcommand - extends AbstractRenderSubcommand { + extends AbstractRenderCommand { @Override public String getDescription() { return "Render the specified OSCAL Profile as HTML"; diff --git a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/ssp/ConvertSubcommand.java b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/ssp/ConvertSubcommand.java index 75407b0..4a28f26 100644 --- a/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/ssp/ConvertSubcommand.java +++ b/src/main/java/gov/nist/secauto/oscal/tools/cli/core/commands/ssp/ConvertSubcommand.java @@ -7,10 +7,10 @@ import gov.nist.secauto.metaschema.core.model.IBoundObject; import gov.nist.secauto.oscal.lib.model.SystemSecurityPlan; -import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalConvertSubcommand; +import gov.nist.secauto.oscal.tools.cli.core.commands.AbstractOscalConvertCommand; public class ConvertSubcommand - extends AbstractOscalConvertSubcommand { + extends AbstractOscalConvertCommand { @Override public String getDescription() { return "Convert the specified OSCAL System Security Plan to a different format"; diff --git a/src/test/java/gov/nist/secauto/oscal/tools/cli/core/commands/Issue96ClassLoaderTest.java b/src/test/java/gov/nist/secauto/oscal/tools/cli/core/commands/Issue96ClassLoaderTest.java index 8bf596f..3afe89f 100644 --- a/src/test/java/gov/nist/secauto/oscal/tools/cli/core/commands/Issue96ClassLoaderTest.java +++ b/src/test/java/gov/nist/secauto/oscal/tools/cli/core/commands/Issue96ClassLoaderTest.java @@ -16,42 +16,42 @@ class Issue96ClassLoaderTest { */ @Test void testAssessmentPlanClassLoader() { - AbstractOscalConvertSubcommand subcommand + AbstractOscalConvertCommand subcommand = new gov.nist.secauto.oscal.tools.cli.core.commands.assessmentplan.ConvertSubcommand(); assertEquals("AssessmentPlan", subcommand.getOscalClass().getSimpleName()); } @Test void testAssessmentResultsClassLoader() { - AbstractOscalConvertSubcommand subcommand + AbstractOscalConvertCommand subcommand = new gov.nist.secauto.oscal.tools.cli.core.commands.assessmentresults.ConvertSubcommand(); assertEquals("AssessmentResults", subcommand.getOscalClass().getSimpleName()); } @Test void testCatalogClassLoader() { - AbstractOscalConvertSubcommand subcommand + AbstractOscalConvertCommand subcommand = new gov.nist.secauto.oscal.tools.cli.core.commands.catalog.ConvertSubcommand(); assertEquals("Catalog", subcommand.getOscalClass().getSimpleName()); } @Test void testPoamClassLoader() { - AbstractOscalConvertSubcommand subcommand + AbstractOscalConvertCommand subcommand = new gov.nist.secauto.oscal.tools.cli.core.commands.poam.ConvertSubcommand(); assertEquals("PlanOfActionAndMilestones", subcommand.getOscalClass().getSimpleName()); } @Test void testSspClassLoader() { - AbstractOscalConvertSubcommand subcommand + AbstractOscalConvertCommand subcommand = new gov.nist.secauto.oscal.tools.cli.core.commands.ssp.ConvertSubcommand(); assertEquals("SystemSecurityPlan", subcommand.getOscalClass().getSimpleName()); } @Test void testComponentDefinitionClassLoader() { - AbstractOscalConvertSubcommand subcommand + AbstractOscalConvertCommand subcommand = new gov.nist.secauto.oscal.tools.cli.core.commands.componentdefinition.ConvertSubcommand(); assertEquals("ComponentDefinition", subcommand.getOscalClass().getSimpleName()); }