proguard:proguard

Full name:

com.github.wvengen:proguard-maven-plugin:2.0.15-SNAPSHOT:proguard

Description:

The Obfuscate task provides a stand-alone obfuscation task

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: package.

Required Parameters

Name Type Since Description
injar String - Specifies the input jar name (or wars, ears, zips) of the application to be processed. You may specify a classes directory e.g. 'classes'. This way plugin will processed the classes instead of jar. You would need to bind the execution to phase 'compile' or 'process-classes' in this case.
outputDirectory File - Directory containing the input and generated JAR.
User property is: project.build.directory.

Optional Parameters

Name Type Since Description
addMavenDescriptor boolean - Set to true to include META-INF/maven/** maven descriptord
Default value is: false.
appendClassifier boolean - Set to false to exclude the attachArtifactClassifier from the Artifact final name. Default value is true.
Default value is: true.
archive MavenArchiveConfiguration - The maven archive configuration to use. only if assembly is used.
assembly Assembly - Bundle project dependency to resulting jar. Specifies list of artifact inclusions
attach boolean - Specifies whether or not to attach the created artifact to the project
Default value is: false.
attachArtifactClassifier String - Specifies attach artifact Classifier, Ignored if attach=false
Default value is: small.
attachArtifactType String - Specifies attach artifact type
Default value is: jar.
attachMap boolean - Determines if attach also attaches the mappingFileName file.
Default value is: false.
attachSeed boolean - Determines if attach also attaches the seedFileName file.
Default value is: false.
exclusions List - List of dependency exclusions
inFilter String - Apply ProGuard classpathentry Filters to input jar. e.g. !**.gif,!**/tests/**'
includeDependency boolean - Specifies that project compile dependencies be added as -libraryjars to proguard arguments. Dependency itself is not included in resulting jar unless you set includeDependencyInjar to true
Default value is: true.
includeDependencyInjar boolean - Specifies that project compile dependencies should be added as injar.
Default value is: false.
injarNotExistsSkip boolean - Set this to 'true' to bypass ProGuard processing when injar does not exists.
Default value is: false.
libs List - Additional -libraryjars e.g. ${java.home}/lib/rt.jar Project compile dependency are added automatically. See exclusions
mappingFileName String - Sets the name of the ProGuard mapping file.
Default value is: proguard_map.txt.
maxMemory String - The max memory the forked java process should use, e.g. 256m
obfuscate boolean - Specifies not to obfuscate the input class files.
Default value is: true.
options String[] - ProGuard configuration options
outFilter String - Apply ProGuard classpathentry Filters to output jar. e.g. !**.gif,!**/tests/**'
outjar String - Specifies the names of the output jars. If attach=true the value ignored and name constructed base on classifier If empty input jar would be overdriven.
proguardInclude File - Recursively reads configuration options from the given file filename
Default value is: ${basedir}/proguard.conf.
proguardJar File - The proguard jar to use. useful for using beta versions of progaurd that aren't yet on Maven central.
proguardMainClass String - ProGuard main class name.
Default value is: proguard.ProGuard.
proguardVersion String - Select specific ProGuard version from plugin dependencies
putLibraryJarsInTempDir boolean - Specifies to copy all the -libraryjars dependencies into a temporary directory and pass that directory as the only -libraryjars argument to ProGuard.
Default value is: false.
seedFileName String - Sets the name of the ProGuard seed file.
Default value is: proguard_seed.txt.
silent boolean - If the plugin should be silent.
Default value is: false.
skip boolean - Set this to 'true' to bypass ProGuard processing entirely.
User property is: proguard.skip.
useDexGuard boolean - To run DexGuard instead of ProGuard, set this to "true".
Default value is: false.

Parameter Details

addMavenDescriptor:

Set to true to include META-INF/maven/** maven descriptord
  • Type: boolean
  • Required: No
  • Default: false

appendClassifier:

Set to false to exclude the attachArtifactClassifier from the Artifact final name. Default value is true.
  • Type: boolean
  • Required: No
  • Default: true

archive:

The maven archive configuration to use. only if assembly is used.
  • Type: org.apache.maven.archiver.MavenArchiveConfiguration
  • Required: No

assembly:

Bundle project dependency to resulting jar. Specifies list of artifact inclusions
  • Type: com.github.wvengen.maven.proguard.Assembly
  • Required: No

attach:

Specifies whether or not to attach the created artifact to the project
  • Type: boolean
  • Required: No
  • Default: false

attachArtifactClassifier:

Specifies attach artifact Classifier, Ignored if attach=false
  • Type: java.lang.String
  • Required: No
  • Default: small

attachArtifactType:

Specifies attach artifact type
  • Type: java.lang.String
  • Required: No
  • Default: jar

attachMap:

Determines if attach also attaches the mappingFileName file.
  • Type: boolean
  • Required: No
  • Default: false

attachSeed:

Determines if attach also attaches the seedFileName file.
  • Type: boolean
  • Required: No
  • Default: false

exclusions:

List of dependency exclusions
  • Type: java.util.List
  • Required: No

inFilter:

Apply ProGuard classpathentry Filters to input jar. e.g. !**.gif,!**/tests/**'
  • Type: java.lang.String
  • Required: No

includeDependency:

Specifies that project compile dependencies be added as -libraryjars to proguard arguments. Dependency itself is not included in resulting jar unless you set includeDependencyInjar to true
  • Type: boolean
  • Required: No
  • Default: true

includeDependencyInjar:

Specifies that project compile dependencies should be added as injar.
  • Type: boolean
  • Required: No
  • Default: false

injar:

Specifies the input jar name (or wars, ears, zips) of the application to be processed. You may specify a classes directory e.g. 'classes'. This way plugin will processed the classes instead of jar. You would need to bind the execution to phase 'compile' or 'process-classes' in this case.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${project.build.finalName}.jar

injarNotExistsSkip:

Set this to 'true' to bypass ProGuard processing when injar does not exists.
  • Type: boolean
  • Required: No
  • Default: false

libs:

Additional -libraryjars e.g. ${java.home}/lib/rt.jar Project compile dependency are added automatically. See exclusions
  • Type: java.util.List
  • Required: No

mappingFileName:

Sets the name of the ProGuard mapping file.
  • Type: java.lang.String
  • Required: No
  • Default: proguard_map.txt

maxMemory:

The max memory the forked java process should use, e.g. 256m
  • Type: java.lang.String
  • Required: No

obfuscate:

Specifies not to obfuscate the input class files.
  • Type: boolean
  • Required: No
  • Default: true

options:

ProGuard configuration options
  • Type: java.lang.String[]
  • Required: No

outFilter:

Apply ProGuard classpathentry Filters to output jar. e.g. !**.gif,!**/tests/**'
  • Type: java.lang.String
  • Required: No

outjar:

Specifies the names of the output jars. If attach=true the value ignored and name constructed base on classifier If empty input jar would be overdriven.
  • Type: java.lang.String
  • Required: No

outputDirectory:

Directory containing the input and generated JAR.
  • Type: java.io.File
  • Required: Yes
  • User Property: project.build.directory

proguardInclude:

Recursively reads configuration options from the given file filename
  • Type: java.io.File
  • Required: No
  • Default: ${basedir}/proguard.conf

proguardJar:

The proguard jar to use. useful for using beta versions of progaurd that aren't yet on Maven central.
  • Type: java.io.File
  • Required: No

proguardMainClass:

ProGuard main class name.
  • Type: java.lang.String
  • Required: No
  • Default: proguard.ProGuard

proguardVersion:

Select specific ProGuard version from plugin dependencies
  • Type: java.lang.String
  • Required: No

putLibraryJarsInTempDir:

Specifies to copy all the -libraryjars dependencies into a temporary directory and pass that directory as the only -libraryjars argument to ProGuard.
  • Type: boolean
  • Required: No
  • Default: false

seedFileName:

Sets the name of the ProGuard seed file.
  • Type: java.lang.String
  • Required: No
  • Default: proguard_seed.txt

silent:

If the plugin should be silent.
  • Type: boolean
  • Required: No
  • Default: false

skip:

Set this to 'true' to bypass ProGuard processing entirely.
  • Type: boolean
  • Required: No
  • User Property: proguard.skip

useDexGuard:

To run DexGuard instead of ProGuard, set this to "true".
  • Type: boolean
  • Required: No
  • Default: false