Search code examples
oraclecci

How to invoking Oracle CCI from a Command Line


I successfully installed the Oracle Code Compliance Inspector (CCI) extension for JDeveloper by following the instructions. Afterwards I was able to run CCI in JDeveloper. But I'm not able to invoke Oracle CCI from a Command Line.

I can't find the script ("checkCompliance.sh") mentioned in the documentation. It's not part of the zip file I downloaded from oracle.com.

I tried to run the compliance.policy.engine.jar file directly but this fails with an error message:

java -jar /oracle/jdevhome/jdeveloper/jdev/extensions/oracle.fp.compliance.inspector/lib/compliance.policy.engine.jar -inputDir /AIA/demo -outputDir /ComplianceOut

Failed to load Main-Class manifest attribute from /oracle/jdevhome/jdeveloper/jdev/extensions/oracle.fp.compliance.inspector/lib/compliance.policy.engine.jar

Any suggestions on how to invoke CCI from a command line or where I can find the script mentioned in the documentation?

Regarding the error message I read that this can be fixed by adding a manifest file to the jar archive which defines the Main-Class - but which one is the Main-Class of this jar file?


Solution

  • Okay, it's solved.

    As mentioned in this part of the documentation, the CCI command line tools are distributed with Oracle Enterprise Repository (OER).

    The CCI command line tools are distributed with OER within the <OER Oracle Home>/tools/solutions/<version>-ComplianceInspector.zip.
    

    What confused me: The OER-Download only contained a single .jar file. It took me some time to realise that the .jar file is a installer.

    java -jar OER111170_generic.jar [-log=full_path_to_log_file]

    See installation documentation for detailed instructions.

    checkCompliance.sh

    After successfully installing OER, I found the <version>-ComplianceInspector.zip in <OER Home>/repository111/core/tools/solutions/.

    The <version>-ComplianceInspector.zip actually contained the checkCompliance.sh file.