<obfuscate-jar>

Description

Obfuscates one or more jars using PreEmptive Protection - DashO. This provides a quick way to obfuscate a Java library or simple application that does not require any advanced configuration.


Task Specific Parameters

Attribute Description Required
src The name of the jar to be obfuscated. Yes, unless <jar> or <fileset> used.
destfile The name of the jar that will be created. No; defaults to dashoout.jar. Can be overriden with nested <output>.
force If true, build continues when reflection is detected. No; defaults to false.

General Parameters

Attribute Description Required
append If true the file specified by output and error will have output appended rather than being overwritten. No; defaults to false
dashohome The location of DashOPro.jar. See Setting DashO Home for details. No
dir The directory where the process will be invoked. No; defaults to the basedir of the buildfile.
error Name of a file to which to write the error output. (Error messages print to the error output) No
errorProperty Name of a property in which to store the standard error output. (Error messages print to the standard error output) No
failonerror If true stops the buildprocess if the process exits with a returncode other than 0. No; defaults to true
if Execute only if the named property has been set. No
jvm The command used to invoke the Java Virtual Machine. The command is resolved by java.lang.Runtime.exec(). No; default is java.
maxmemory Max amount of memory to allocate to the process. No
newenvironment If true the old environment settings will not be propogated when new environment variables are specified. No; defaults to false.
output Name of a file to which to write the output of the process. No
outputProperty Name of a property in which to store the standard output. No
printstacktraces If true stack traces will be printed for errors. No; defaults to false.
quiet If true output will be terse. No; defaults to false.
resultproperty The property name which will contain the return code from the task. No
timeout Stop the process if it doesn't finish within the specified time in milliseconds. No
unless Execute only if the named property has not been set. No
verbose If true additional information will be printed. No; defaults to false.
deleteTempProject If false the created .dox file will not be deleted when DashO finishes. (Set verbose=true to show the file location) No; defaults to true.

Parameters specified as nested elements

NOTE: Ant-based .dox configuration has been deprecated. This includes most of these nested elements.

global (Deprecated)

The <global> element's use is as described in the <global> Section of the DashO User Guide. In addition to the elements described in the user's guide the following nested elements are added:

<makepublic value="..."/>

Sets make public to true, false, or auto. See Makepublic and Nomakepublic Global Options in the DashO User Guide.

<leavedebugginginfo value="true/false"/>

Sets the leavedebugginginfo global option (deprecated).

<fornamedetection value="true/false"/>

Sets the fornamedetection global option.

<renameforname value="true/false"/>

Sets the renameforname global option.

<ignorenotfoundclasses value="true/false"/>

Sets the ignorenotfoundclasses global option.

<ignorebrokencalls value="true/false"/>

Sets the ignorebrokencalls option.

<bypassdasho value="true/false"/>

Sets the bypassdasho global option.

jar (Deprecated)

Use nested <jar> elements to specify the jar or jars to be obfuscated.

Attribute Description Required
file The name of a jar to be obfuscated. Yes

fileset (Deprecated)

Use nested <fileset> elements to a jar to be obfuscated. See FileSet for details.

classpath (Deprecated)

The <classpath> element's use is as described in the <classpath> Section of the DashO User Guide. In addition to the elements described in the user's guide the following element has been added:

<fileset>

The <fileset> element adds jars or zip files to the classpath. See FileSet for details.

output (Deprecated)

The <output> element's use is as described in the <output> Section of the DashO User Guide. In addition to the elements described in the user's guide the following attributes have been added:

Attribute Description Required
dir Equivalent to the nested element <dir path="..."/>. No
jar Equivalent to the nested element <jar path="..."/>. No
manifest Equivalent to the nested element <jar manifest="..."/>. No

arg and jvmarg

Use nested <arg> and <jvmarg> elements to specify arguments to DashO and the JVM respectively. See Command line arguments.

sysproperty

Use nested <sysproperty> elements to specify system properties required by DashO. This tag uses the same syntax as <env>: see the <exec> task for details.

env

Use nested <env> elements to add or replace environment variables passed to the process. See the <exec> task for details.