ounce:project-only

This mojo generates an Ounce project file. It does not fork the build like the "project" mojo and is instead intended to be bound in a pom for automatic execution. If you would rather have the project generated on demand via the command line, use the project goal instead.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.
  • Requires dependency resolution of artifacts in scope: test
  • Automatically executes within the lifecycle phase: package

Optional Parameters

Name Type Description
analyzeStrutsFramework boolean Whether to analyze the framework for a Struts application Default value is false.
classpathScope String The scope of the classpath used to analyze this project.

Valid choices are: compile, test, runtime, or system. If includeTestSources is true, then the classpathScope reverts to test. Otherwise, the default is compile. Default value is compile.
coreHint String This hint provides a way to switch the core implementation. Consult Ounce support for details, most users should leave this set to the default. Use -Dounce.core=console to have have the output displayed instead of written to the file for debugging purposes. Default value is ouncexml.
createVariables boolean Whether the plugin should use the Ounce Automation Server to create any necessary variables (such as M2_REPO). Requires that the Ounce Automation Server be installed. Default value is true.
importStrutsValidation boolean Whether to import Struts validation routines Default value is false.
includeTestSources boolean If TestSources should be included in the compilable sources. If set, adds project.getTestSourceRoot() to the path and defaults the classpathScope to test. Default value is false.
installDir String The location of the Ounce client installation directory. Required if ounceauto is not on the path.
javaCompilerOptions String Options to pass to the javac compiler.
jdkName String JDK configuration known to Ounce Core.
pathVariableMap Map Map of Ounce variable names and paths.

pathVariableMap variables are automatically registered with Ounce by the Ounce/Maven plugin if the Ounce Automation Server is installed.
skipPoms boolean If pom packaging projects should be skipped. Typically these will not have source code and should be excluded. This is true by default because typically the application or projects will be created at a pom level and the poms have no source to be analyzed Only set this if you have source in your "pom" packaging projects that needs to be scanned. Default value is true.
webappDirectory String The location of the web context root, if needed.

Parameter Details

analyzeStrutsFramework Whether to analyze the framework for a Struts application
  • Type: boolean
  • Required: No
  • Expression: ${ounce.analyzeStrutsFramework}
  • Default: false

classpathScope The scope of the classpath used to analyze this project.

Valid choices are: compile, test, runtime, or system. If includeTestSources is true, then the classpathScope reverts to test. Otherwise, the default is compile.
  • Type: java.lang.String
  • Required: No
  • Expression: ${ounce.classpathScope}
  • Default: compile

coreHint This hint provides a way to switch the core implementation. Consult Ounce support for details, most users should leave this set to the default. Use -Dounce.core=console to have have the output displayed instead of written to the file for debugging purposes.
  • Type: java.lang.String
  • Required: No
  • Expression: ${ounce.core}
  • Default: ouncexml

createVariables Whether the plugin should use the Ounce Automation Server to create any necessary variables (such as M2_REPO). Requires that the Ounce Automation Server be installed.
  • Type: boolean
  • Required: No
  • Expression: ${ounce.createVariables}
  • Default: true

importStrutsValidation Whether to import Struts validation routines
  • Type: boolean
  • Required: No
  • Expression: ${ounce.importStrutsValidation}
  • Default: false

includeTestSources If TestSources should be included in the compilable sources. If set, adds project.getTestSourceRoot() to the path and defaults the classpathScope to test.
  • Type: boolean
  • Required: No
  • Expression: ${ounce.includeTestSources}
  • Default: false

installDir The location of the Ounce client installation directory. Required if ounceauto is not on the path.
  • Type: java.lang.String
  • Required: No
  • Expression: ${ounce.installDir}

javaCompilerOptions Options to pass to the javac compiler.
  • Type: java.lang.String
  • Required: No
  • Expression: ${ounce.javaCompilerOptions}

jdkName JDK configuration known to Ounce Core.
  • Type: java.lang.String
  • Required: No
  • Expression: ${ounce.jdkName}

pathVariableMap Map of Ounce variable names and paths.

pathVariableMap variables are automatically registered with Ounce by the Ounce/Maven plugin if the Ounce Automation Server is installed.
  • Type: java.util.Map
  • Required: No

skipPoms If pom packaging projects should be skipped. Typically these will not have source code and should be excluded. This is true by default because typically the application or projects will be created at a pom level and the poms have no source to be analyzed Only set this if you have source in your "pom" packaging projects that needs to be scanned.
  • Type: boolean
  • Required: No
  • Expression: ${ounce.skipPoms}
  • Default: true

webappDirectory The location of the web context root, if needed.
  • Type: java.lang.String
  • Required: No
  • Expression: ${project.build.directory}/${project.build.finalName}