aem-plugin / com.cognifide.gradle.aem / AemExtension

AemExtension

class AemExtension : Serializable

Core of library, facade for implementing tasks.

Constructors

<init>

Core of library, facade for implementing tasks.

AemExtension(project: Project)

Properties

anyInstance

Get instance from command line parameter named 'instance' which holds instance name or URL. If it is not specified, then first instance matching default filtering fill be returned.

val anyInstance: Instance

authorInstance

val authorInstance: Instance

authorInstances

Get all author instances running on current environment.

val authorInstances: List<Instance>

availableInstance

Get available instance of any type (most often first defined).

val availableInstance: Instance?

bundle

Get OSGi bundle defined to be built (could not yet exist).

val bundle: File

bundles

Get all OSGi bundles defined to be built.

val bundles: List<File>

common

val common: CommonExtension

commonOptions

val commonOptions: CommonOptions

filter

Vault filter determined by convention and properties.

val filter: FilterFile

instanceManager

val instanceManager: InstanceManager

instances

All instances matching default filtering.

val instances: List<Instance>

javaPackages

Collection of all java packages from all projects applying bundle plugin.

val javaPackages: List<String>

localInstanceManager

val localInstanceManager: LocalInstanceManager

localInstances

Get all local instances.

val localInstances: List<LocalInstance>

logger

val logger: Logger!

obj

val obj: ObjectFactory

package

Get CRX package defined to be built (could not yet exist).

val package: File

packageOptions

val packageOptions: PackageOptions

packages

Get all CRX packages defined to be built.

val packages: List<File>

pkg

val pkg: File

project

val project: Project

prop

val prop: PropertyParser

publishInstance

val publishInstance: Instance

publishInstances

Get all publish instances running on current environment.

val publishInstances: List<Instance>

remoteInstances

Get all remote instances.

val remoteInstances: List<Instance>

Functions

authorInstances

Work in parallel with all author instances running on current environment.

fun authorInstances(consumer: (Instance) -> Unit): Unit

bundleEmbed

Shorthand for embedding code inside OSGi bundle being composed when configuration on demand is enabled. When this feature is not enabled, it is preferred to use BundleCompose.embedPackage.

fun bundleEmbed(dependencyNotation: Any, pkgs: Iterable<String>, export: Boolean = false): Unit
fun bundleEmbed(dependencyNotation: Any, vararg pkgs: String, export: Boolean = false): Unit

common

Defines common settings like environment name, line endings when generating files etc

fun common(options: CommonOptions.() -> Unit): Unit

composePackage

Build minimal CRX package in-place / only via code. All details like Vault properties, archive destination directory, file name are customizable.

fun composePackage(definition: PackageDefinition.() -> Unit): File

filter

Get Vault filter object for specified file.

fun filter(file: File): FilterFile

Get Vault filter object for specified path.

fun filter(path: String): FilterFile

filterInstances

Find all instances which names are matching wildcard filter specified via command line parameter 'instance.name'.

fun filterInstances(nameMatcher: String = prop.string("instance.name") ?: "${commonOptions.env.get()}-*"): List<Instance>

findInstance

Find instance which name is matching wildcard filter specified via command line parameter 'instance.name'. By default, this method respects current environment which is used to work only with instances running locally.

fun findInstance(desiredName: String? = prop.string("instance.name"), defaultName: String = "${commonOptions.env.get()}-*"): Instance?

groovyEval

Execute Groovy script(s) using specified options.

fun <T> groovyEval(options: GroovyEvaluator.() -> T): T

Execute Groovy script(s) matching file pattern on AEM instances.

fun groovyEval(scriptPattern: String): GroovyEvalSummary

instance

Defines instances to work with.

fun instance(options: InstanceManager.() -> Unit): Unit

Shorthand method for getting defined instance or creating temporary instance by URL.

fun instance(urlOrName: String): Instance

instances

Work in parallel with instances matching default filtering.

fun instances(consumer: (Instance) -> Unit): Unit

Work in parallel with instances which name is matching specified wildcard filter.

fun instances(filter: String, consumer: (Instance) -> Unit): Unit

Shorthand method for getting defined instances or creating temporary instances by URLs.

fun instances(urlsOrNames: Iterable<String>): List<Instance>

localInstance

Define common settings valid only for instances created at local file system.

fun localInstance(options: LocalInstanceManager.() -> Unit): LocalInstanceManager

localInstances

Work in parallel with all local instances.

fun localInstances(consumer: LocalInstance.() -> Unit): Unit

namedInstance

Get instance which name is matching wildcard filter specified via command line parameter 'instance.name'. By default, this method respects current environment which is used to work only with instances running locally.

fun namedInstance(desiredName: String? = prop.string("instance.name"), defaultName: String = "${commonOptions.env.get()}-*"): Instance

package

Defines common settings for built packages and deployment related behavior.

fun package(options: PackageOptions.() -> Unit): Unit

Read CRX package properties of specified ZIP file.

fun package(file: File): PackageFile

pkg

Defines common settings for built packages and deployment related behavior.

fun pkg(options: PackageOptions.() -> Unit): Unit

Read CRX package properties of specified ZIP file.

fun pkg(file: File): PackageFile

publishInstances

Work in parallel with all publish instances running on current environment.

fun publishInstances(consumer: Instance.() -> Unit): Unit

rcp

Execute any Vault JCR content remote copying with customized options like content directory.

fun <T> rcp(options: RcpClient.() -> T): T

remoteInstances

Work in parallel with all remote instances.

fun remoteInstances(consumer: Instance.() -> Unit): Unit

sync

In parallel, work with services of all instances matching default filtering.

fun sync(action: InstanceSync.() -> Unit): Unit

Work with instance services of specified instance.

fun <T> sync(instance: Instance, action: InstanceSync.() -> T): T

In parallel, work with services of all specified instances.

fun sync(instances: Iterable<Instance>, action: InstanceSync.() -> Unit): Unit

syncBundles

In parallel, work with built OSGi bundles and services of instances matching default filtering.

fun syncBundles(action: InstanceSync.(File) -> Unit): Unit

syncFiles

In parallel, work with built packages and services of specified instances.

fun syncFiles(instances: Iterable<Instance>, packages: Iterable<File>, action: InstanceSync.(File) -> Unit): Unit

syncInstance

Work with instance services of specified instance.

fun <T> syncInstance(instance: Instance, action: InstanceSync.() -> T): T

syncInstances

In parallel, work with services of all instances matching default filtering.

fun syncInstances(action: InstanceSync.() -> Unit): Unit

In parallel, work with services of all specified instances.

fun syncInstances(instances: Iterable<Instance>, action: InstanceSync.() -> Unit): Unit

syncPackages

In parallel, work with built packages and services of instances matching default filtering.

fun syncPackages(action: InstanceSync.(File) -> Unit): Unit

validatePackage

Validate any CRX packages.

fun validatePackage(vararg packages: File, options: PackageValidator.() -> Unit = {}): Unit
fun validatePackage(packages: Iterable<File>, options: PackageValidator.() -> Unit = {}): Unit

vlt

Execute any Vault command.

fun vlt(command: String): VaultSummary

Execute any Vault command with customized options like content directory.

fun <T> vlt(options: VaultClient.() -> T): T

Companion Object Properties

NAME

const val NAME: String

Companion Object Functions

of

fun of(project: Project): AemExtension