Skip to main content

OJDeploy: Documentation for the tool

Real DOCS: http://docs.oracle.com/cd/E26098_01/user.1112/e17455/deploying_apps.htm#OJDUG645
OJDeploy Documentation if you run it from the command line - I keep looking for this so I though I would post it here so I remeber.

Oracle JDeveloper Deploy 11.1.2.1.0.6081
Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.

Usage:
  ojdeploy -profile <name> -workspace <jws> [ -project <name> ] [ <options> ]
  ojdeploy -buildfile <ojbuild.xml> [ <options> ]
  ojdeploy -buildfileschema

Arguments:
  -profile               the name of the Profile to deploy
  -workspace      full path to the JDeveloper Workspace file(.jws)
  -project              name of the JDeveloper Project within the .jws where the Profile can be found. If omitted, the Profile is assumed to be in the Workspace.
  -buildfile            full path to a build file for batch deploy
  -buildfileschema  print XML Schema for the build file

Options:
  -basedir          interpret path for workspace relative to a base directory
  -outputfile       substitute for the output file specified in the Profile.
  -nocompile        skip compilation of Project or Workspace
  -nodependents     do not deploy dependent profiles
  -clean            clean output directories before compiling
  -nodatasources    do not include datasources from IDE
  -forcerewrite     rewrite output file even if it is identical to existing file

  -updatewebxmlejbrefs                               update EJB references in web.xml
  -define                               define variables as comma separated name=value pairs
  -statuslogfile                    full path to an output file for status summary. No macros allowed.
  -failonwarning    stop deployment on warnings
  -timeout          time in seconds allowed for each deployment task
  -stdout           redirect stdout to file
  -stderr           redirect stderr to file
  -ojserver         run deployment using ojserver
  -address          listen address for ojserver

Built-in macros:
  workspace.name    name of the workspace (without the .jws extension)
  workspace.dir     directory of the workspace.jws file
  project.name      name of the project ( without the .jpr extension).
  project.dir       directory of the project.jpr file
  Note: project.name and project.dir are only available when project-level
  profile is being deployed.
  profile.name      name of the profile being deployed
  deploy.dir        default deploy directory for the profile
  base.dir          current ojdeploy directory unless overridden by the –basedir  parameter  or by the "basedir" attribute in the build script


Examples:
Deploy a Project-level profile
ojdeploy -profile webapp1 -workspace /usr/jdoe/Application1/Application1.jws -pr
oject Project1
ojdeploy -profile webapp1 -workspace Application1/Application1.jws -basedir /usr
/jdoe -project Project1

Deploy a Workspace-level profile
ojdeploy -profile earprofile1 -workspace /usr/jdoe/Application1/Application1.jws

Deploy all Profiles from all Projects of a Workspace
ojdeploy -workspace /usr/jdoe/Application1/Application1.jws -project \* -profile*/

Build in batch mode from a ojbuild file
ojdeploy -buildfile /usr/jdoe/ojbuild.xml

Build using ojbuild file, pass into, or override default variables in, the build
 file.
ojdeploy -buildfile /usr/jdoe/ojbuild.xml -define myhome=/usr/jdoe,mytmp=/tmp
ojdeploy -buildfile /usr/jdoe/ojbuild.xml -basedir /usr/jdoe

Build using ojbuild file, set or override parameters in the default section
ojdeploy -buildfile /usr/jdoe/ojbuild.xml -nocompile

ojdeploy -buildfile /usr/jdoe/ojbuild.xml -outputfile '${workspace.dir}/${profile.name}.jar'
ojdeploy -buildfile /usr/jdoe/ojbuild.xml -define mydir=/tmp -outputfile  '${mydir}/${workspace.name}-${profile.name}'

More examples:
ojdeploy -workspace Application1/Application1.jws,Application2/Application2.jws -basedir /home/jdoe -profile app*
ojdeploy -buildfile /usr/jdoe/ojbuild.xml -define outdir=/tmp,rel=11.1.1 -outputfile ‘${outdir}/built/${workspace.name}/${rel}/${profile.name}
.jar'
ojdeploy -workspace Application1/Application1.jws -basedir /home/jdoe -nocompile
-outputfile '${base.dir}/${workspace.name}-${profile.name}'
ojdeploy -workspace /usr/jdoe/Application1.jws -project \* -profile \* -stdout home/jdoe/stdout/${project.name}.log




Oracle JDeveloper Audit 11.1.2.1.0 (6081)
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
Audit source files.

Usage
  ojaudit option... file...

Parameters
  file                 Workspace, project, or source file to audit (required).

Options
  -classpath           Set class path for files to audit (if no project).
  -encoding            Set character encoding for report.
  -disable rule*       Disable rule in profile.
  -enable rule*        Enable rule in profile.
  -fail severity       Set issue severity to regard as failure.
  -fix                 Apply default fixes (changes source code!).            -f

  -help                Print command help (this message) and exit.            -h

  -listall             List files with no issues in report.
  -maxfilesize size    Maximum file size, in Mb, to audit.
  -notitle             Set empty report title.
  -output file         Set report file name.                                  -o

  -profile name        Set profile to use (required).                         -p

  -profilehelp         Print defined profile names and exit.
  -project file        Set project for files to audit.
  -quiet               Suppress copyright message.                            -q

  -sourcepath          Set source path for files to audit (if no project).
  -rulehelp            Print available rules and exit.
  -role name           Set active JDeveloper customization role.
  -style file          Set XSLT style sheet to apply to report.               -s

  -stylehelp           Print defined style sheet names and exit.
  -title text          Set report title.
  -verbose             Print all messages.                                    -v

  -version             Print version and exit.
  -workspace file      Set workspace context for files to audit.              -w

  -workingset name     Set working set for files to audit within workspace(s).
  -workingsethelp      Print available working sets for a workspace and exit.
* Repeat option to supply multiple values.

Notes
  Output directed to standard output unless -output specified.
  -project/-sourcepath/-classpath required unless file is workspace or project.
  -workspace required if project depends on other projects in workspace.
  -profile/-style accept name or URL, ignore case, whitespace of name.
  -enable/-disable accept rule id or label, ignore case, whitespace of label.
  Default exit status does not reflect issues detected unless -fail specified.

Examples
  ojaudit -profile auditrules test.jpr
    Audits test.jpr using (predefined) Audit Rules profile.
  ojaudit -profile auditrules -project test.jpr src\mypackage\Test.java
    Audits Test.java in project test.jpr using Audit Rules profile.
  ojaudit -profile checkinrules.xml test.jpr
    Audits test.jpr using exported profile file checkinrules.xml.
  ojaudit -profile auditrules test.jpr -style audit-text
    Audits test.jpr and applies (predefined) audit-text stylesheet to output.
  ojaudit -profile auditrules test.jpr -output test.xml
    Audits test.jpr and directs output to test.xml.

Comments

  1. Hi,

    I am working with ojaudit but I need a way to use the tool with out any dependency on JDeveloper folder structure. Is that possible?
    Is there a stand-alone package for ojaudit?

    Thanks in advance,
    Arvinder Singh.

    Oracle Oracle Retail Global Business Unit

    ORACLE India | NR Enclave A Block, EPIP Industrial Area, White Field | 560066 Bangalore

    ReplyDelete
    Replies
    1. Not that I am aware of unfortunately the only way I can think of to try and do this is extract the ojdeploy classes and configuration files (ojaudit.conf, ojaudit.exe, ojaudit.boot) in the jdev folders and package and configure it yourself (NOTE: this is not easy as they load ide.conf and jdev.conf so it will be a lot of work)
      Some properties you may need to look at
      ojaudit.conf
      initial.classpath=audit-boot.jar

      ojaudit.boot you will need to add the following
      SetJavaHome C:\Dev\jdk160_24_x64

      Alternatively you may want to audit your build with another audit tool like checkstyle etc.

      Delete
    2. Thanks a lot Donovan for your reply.
      Although I have put in my time to try separate ojaudit from Jdev. But now I have got a confirmation from John 'JB' Brock who works a lot with JDeveloper Extension SDK.
      He says that ojaudit cannot be separated from the JDev installation folder.
      Please follow the following post :
      http://blogs.oracle.com/jdevextensions/entry/don_t_fear_the_audit#comments

      Delete
  2. Also you can check and try modify what is happening in the linux shell file.

    ReplyDelete

Post a Comment

Popular posts from this blog

MANIFEST.MF merge JDeveloper for an executable jar

Goto your project > properties. Then click on deployment in the menu. Edit or add a jar deployment profile. Fill in the details under jar options (select Include manifest and give it a main class name) Also remember that the merge functionality only works with a BLANK line at the end of the merge file. REALLY this caught me. My merge file contents: Class-Path: commons-codec-1.3.jar [...empty line here CRLF...]

JBO-25013: TooManyObjectsException

oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[Key null ]. Ok so for you it may be trying to insert a duplicate record this should explain your problem (also check trigger they could be the cause.) NOTE: You can also try to create a new duplicate EO if you have a page with two VO's using the same EO. This could sort your problems. For me I needed to add a launch listener on my LOV and clear the cache of my vo. LOV <af:inputListOfValues id="NameId" popupTitle="#{bindings.Name.hints.label}" value="#{bindings.RolName1.inputValue}" label="#{bindings.RolName1.hints.label}" model="#{bindings.RolName1.listOfValuesModel}" required="#{bindings.RolName1.hints.mandatory}" columns="#{bindings.RolName1.hints.displayWidth}" shortDesc="#{bindings.RolName1.hints.tooltip}" launchPopupListener="#{backingBeanScope.backingBean.launchPop...

ADF Encountered deferred syntax #{ in template text.

OracleJSP error: oracle.jsp.parse.JspParseException:  Error: Encountered deferred syntax #{ in template text.  If intended as a literal, escape it or set directive  deferredSyntaxAllowedAsLiteral This normally happens when you have some tag lib dependancy problems but this was  not the case for me... My problem: For some reason my model project had web stuff in it(public html etc)  so I had to remove the public html stuff from my project and manually edit the Model.jpr project file and remove the tag lib entries at the bottom o the file. Go figure.