proguard:liberate

Full name:

com.lafros.maven.plugins:maven-proguard-plugin:1.2:liberate

Description:

'liberates' the jar artifact, in advance of its creation (by the jar plug-in), from specified library dependencies which are typically large and only sparsely populated with the classes which are actually required. This is achieved by copying those classes, together with the contents of the project's output directory, to the liberatedClassesDirectory[1], and specifying this as the jar:jar goal's classesDirectory. Other dependencies which also depend on the above ones may also be specified, so that the classes which they themselves require will also be included.

[1] Prior to version 1.1, the classes were written to the project's output directory itself.

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Binds by default to the lifecycle phase: prepare-package.

Required Parameters

Name Type Since Description
entryPoints String[] - fully-qualified names of declared 'main' or applet classes - those containing a public static void main or extending java.applet.Applet, respectively.

Optional Parameters

Name Type Since Description
alsoSupportDepsWhoseArtsStartWith String[] - other dependency artifacts which depend on those to be liberated from - any classes they require will also be copied to the liberatedClassesDirectory.
enabled boolean - permits execution of the goal to be disabled.
filter String - ProGuard filter, to be applied when copying classes from the dependencies being liberated from.
liberateFromDepsWhoseArtsStartWith String[] - required classes (see above) from dependency artifacts starting with any of these Strings will be copied to the liberatedClassesDirectory. If not set, "scala-library-" and "scala-swing-" will be assumed.
liberatedClassesDirectory File 1.1 where this goal's output (see above) will be written. Note that the jar:jar goal's classesDirectory parameter must be set to the same value.
Default value is: ${project.build.directory}/liberated-classes.
libraryJars String[] - corresponds to ProGuard's -libraryjars option. If not set, "<java.home>/lib/rt.jar" will be assumed. On Mac OS X, this should be "<java.home>/../Classes/classes.jar", which must be specified as <param>&lt;java.home&gt;/../Classes/classes.jar</param>.
suppressNotes boolean - corresponds to ProGuard's -dontnote option.
suppressWarnings boolean - corresponds to ProGuard's -dontwarn option.
verbose boolean - corresponds to ProGuard's -verbose option.

Parameter Details

alsoSupportDepsWhoseArtsStartWith:

other dependency artifacts which depend on those to be liberated from - any classes they require will also be copied to the liberatedClassesDirectory.
  • Type: java.lang.String[]
  • Required: No

enabled:

permits execution of the goal to be disabled.
  • Type: boolean
  • Required: No
  • Expression: true

entryPoints:

fully-qualified names of declared 'main' or applet classes - those containing a public static void main or extending java.applet.Applet, respectively.
  • Type: java.lang.String[]
  • Required: Yes

filter:

ProGuard filter, to be applied when copying classes from the dependencies being liberated from.
  • Type: java.lang.String
  • Required: No
  • Expression: (!scala/swing/test/**, scala/**)

liberateFromDepsWhoseArtsStartWith:

required classes (see above) from dependency artifacts starting with any of these Strings will be copied to the liberatedClassesDirectory. If not set, "scala-library-" and "scala-swing-" will be assumed.
  • Type: java.lang.String[]
  • Required: No

liberatedClassesDirectory:

where this goal's output (see above) will be written. Note that the jar:jar goal's classesDirectory parameter must be set to the same value.
  • Type: java.io.File
  • Since: 1.1
  • Required: No
  • Default: ${project.build.directory}/liberated-classes

libraryJars:

corresponds to ProGuard's -libraryjars option. If not set, "<java.home>/lib/rt.jar" will be assumed. On Mac OS X, this should be "<java.home>/../Classes/classes.jar", which must be specified as <param>&lt;java.home&gt;/../Classes/classes.jar</param>.
  • Type: java.lang.String[]
  • Required: No

suppressNotes:

corresponds to ProGuard's -dontnote option.
  • Type: boolean
  • Required: No
  • Expression: false

suppressWarnings:

corresponds to ProGuard's -dontwarn option.
  • Type: boolean
  • Required: No
  • Expression: false

verbose:

corresponds to ProGuard's -verbose option.
  • Type: boolean
  • Required: No
  • Expression: false