public class AemExtension
Core of library, facade for implementing tasks.
@NotNull public static java.lang.String NAME
public static com.cognifide.gradle.aem.AemExtension.Companion Companion
public AemExtension(@NotNull
org.gradle.api.Project project)
Core of library, facade for implementing tasks.
@NotNull public com.cognifide.gradle.common.CommonExtension getCommon()
public org.gradle.api.logging.Logger getLogger()
@NotNull public com.cognifide.gradle.common.build.PropertyParser getProp()
@NotNull public com.cognifide.gradle.common.build.ObjectFactory getObj()
@NotNull public CommonOptions getCommonOptions()
@NotNull public AssetManager getAssetManager()
@NotNull public WebBrowser getWebBrowser()
public void common(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.CommonOptions,kotlin.Unit> options)
Defines common settings like environment name, line endings when generating files etc
@NotNull public PackageOptions getPackageOptions()
public void package(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.pkg.PackageOptions,kotlin.Unit> options)
Defines common settings for built packages and deployment related behavior.
public void pkg(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.pkg.PackageOptions,kotlin.Unit> options)
Defines common settings for built packages and deployment related behavior.
@NotNull public PackageFile package(@NotNull java.io.File file)
Read CRX package properties of specified ZIP file.
@NotNull public PackageFile pkg(@NotNull java.io.File file)
Read CRX package properties of specified ZIP file.
public void instance(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.InstanceManager,kotlin.Unit> options)
Defines instances to work with.
@NotNull public InstanceManager getInstanceManager()
@NotNull public LocalInstanceManager localInstance(@NotNull kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.LocalInstanceManager,kotlin.Unit> options)
Define common settings valid only for instances created at local file system.
@NotNull public LocalInstanceManager getLocalInstanceManager()
@NotNull public java.util.List<org.gradle.api.tasks.bundling.Jar> getBundlesBuilt()
Collection of all java packages from all projects applying bundle plugin.
Use with caution as of this property is eagerly configuring all tasks building bundles.
@NotNull public java.util.List<com.cognifide.gradle.aem.pkg.tasks.PackageCompose> getPackagesBuilt()
Collection of Vault definitions from all packages from all projects applying package plugin.
Use with caution as of this property is eagerly configuring all tasks building packages.
@Nullable public java.lang.String getJavaPackage()
Java package of built bundle (if project is applying bundle plugin).
@NotNull public java.util.List<java.lang.String> getJavaPackages()
Collection of all java packages from all projects applying bundle plugin.
@NotNull public java.util.List<com.cognifide.gradle.aem.common.instance.Instance> getInstances()
All instances matching default filtering.
public void instances(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.Instance,kotlin.Unit> consumer)
Work in parallel with instances matching default filtering.
public void instances(@NotNull
java.lang.String filter,
@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.Instance,kotlin.Unit> consumer)
Work in parallel with instances which name is matching specified wildcard filter.
@NotNull public Instance instance(@NotNull java.lang.String urlOrName)
Shorthand method for getting defined instance or creating temporary instance by URL.
@NotNull
public java.util.List<com.cognifide.gradle.aem.common.instance.Instance> instances(@NotNull
java.lang.Iterable<java.lang.String> urlsOrNames)
Shorthand method for getting defined instances or creating temporary instances by URLs.
@NotNull public Instance getAnyInstance()
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.
Purpose of this method is to easily get any instance to work with (no matter how it will be defined).
@Nullable public Instance getAvailableInstance()
Get available instance of any type (most often first defined).
@Nullable public Instance findInstance(@Nullable java.lang.String desiredName, @NotNull java.lang.String defaultName)
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.
@NotNull public Instance namedInstance(@Nullable java.lang.String desiredName, @NotNull java.lang.String defaultName)
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.
If instance not found, throws exception.
@NotNull
public java.util.List<com.cognifide.gradle.aem.common.instance.Instance> filterInstances(@NotNull
java.lang.String nameMatcher)
Find all instances which names are matching wildcard filter specified via command line parameter 'instance.name'.
@NotNull public java.util.List<com.cognifide.gradle.aem.common.instance.Instance> getAuthorInstances()
Get all author instances running on current environment.
@NotNull public Instance getAuthorInstance()
public void authorInstances(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.Instance,kotlin.Unit> consumer)
Work in parallel with all author instances running on current environment.
@NotNull public java.util.List<com.cognifide.gradle.aem.common.instance.Instance> getPublishInstances()
Get all publish instances running on current environment.
@NotNull public Instance getPublishInstance()
public void publishInstances(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.Instance,kotlin.Unit> consumer)
Work in parallel with all publish instances running on current environment.
@NotNull public java.util.List<com.cognifide.gradle.aem.common.instance.LocalInstance> getLocalInstances()
Get all local instances.
public void localInstances(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.LocalInstance,kotlin.Unit> consumer)
Work in parallel with all local instances.
@NotNull public java.util.List<com.cognifide.gradle.aem.common.instance.Instance> getRemoteInstances()
Get all remote instances.
public void remoteInstances(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.Instance,kotlin.Unit> consumer)
Work in parallel with all remote instances.
@NotNull public java.io.File getPackage()
Get CRX package defined to be built (could not yet exist).
@NotNull public java.io.File getPkg()
@NotNull public java.util.List<java.io.File> getPackages()
Get all CRX packages defined to be built.
@NotNull public java.io.File getBundle()
Get OSGi bundle defined to be built (could not yet exist).
@NotNull public java.util.List<java.io.File> getBundles()
Get all OSGi bundles defined to be built.
public void bundleEmbed(@NotNull
java.lang.Object dependencyNotation,
@NotNull
java.lang.Iterable<java.lang.String> pkgs,
boolean export)
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 BundleJar.embedPackage.
BundleJar.embedPackagepublic void bundleEmbed(@NotNull
java.lang.Object dependencyNotation,
@NotNull
java.lang.String[] pkgs,
boolean export)
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 BundleJar.embedPackage.
BundleJar.embedPackagepublic void sync(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.InstanceSync,kotlin.Unit> action)
In parallel, work with services of all instances matching default filtering.
public void syncInstances(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.InstanceSync,kotlin.Unit> action)
In parallel, work with services of all instances matching default filtering.
public <T> T sync(@NotNull
Instance instance,
@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.InstanceSync,? extends T> action)
Work with instance services of specified instance.
public <T> T syncInstance(@NotNull
Instance instance,
@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.InstanceSync,? extends T> action)
Work with instance services of specified instance.
public void sync(@NotNull
java.lang.Iterable<? extends com.cognifide.gradle.aem.common.instance.Instance> instances,
@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.InstanceSync,kotlin.Unit> action)
In parallel, work with services of all specified instances.
public void syncInstances(@NotNull
java.lang.Iterable<? extends com.cognifide.gradle.aem.common.instance.Instance> instances,
@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.InstanceSync,kotlin.Unit> action)
In parallel, work with services of all specified instances.
public void syncPackages(@NotNull
kotlin.jvm.functions.Function2<? super com.cognifide.gradle.aem.common.instance.InstanceSync,? super java.io.File,kotlin.Unit> action)
In parallel, work with built packages and services of instances matching default filtering.
public void syncBundles(@NotNull
kotlin.jvm.functions.Function2<? super com.cognifide.gradle.aem.common.instance.InstanceSync,? super java.io.File,kotlin.Unit> action)
In parallel, work with built OSGi bundles and services of instances matching default filtering.
public void syncFiles(@NotNull
java.lang.Iterable<? extends com.cognifide.gradle.aem.common.instance.Instance> instances,
@NotNull
java.lang.Iterable<? extends java.io.File> packages,
@NotNull
kotlin.jvm.functions.Function2<? super com.cognifide.gradle.aem.common.instance.InstanceSync,? super java.io.File,kotlin.Unit> action)
In parallel, work with built packages and services of specified instances.
@NotNull
public java.io.File composePackage(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.pkg.PackageDefinition,kotlin.Unit> definition)
Build minimal CRX package in-place / only via code. All details like Vault properties, archive destination directory, file name are customizable.
public void validatePackage(@NotNull
java.io.File[] packages,
@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.pkg.PackageValidator,kotlin.Unit> options)
Validate any CRX packages.
public void validatePackage(@NotNull
java.lang.Iterable<? extends java.io.File> packages,
@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.pkg.PackageValidator,kotlin.Unit> options)
Validate any CRX packages.
@NotNull public FilterFile getFilter()
Vault filter determined by convention and properties.
@NotNull public FilterFile filter(@NotNull java.io.File file)
Get Vault filter object for specified file.
@NotNull public FilterFile filter(@NotNull java.lang.String path)
Get Vault filter object for specified path.
@NotNull public VaultSummary vlt(@NotNull java.lang.String command)
Execute any Vault command.
public <T> T vlt(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.pkg.vault.VaultClient,? extends T> options)
Execute any Vault command with customized options like content directory.
public <T> T rcp(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.rcp.RcpClient,? extends T> options)
Execute any Vault JCR content remote copying with customized options like content directory.
public <T> T groovyEval(@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.instance.service.groovy.GroovyEvaluator,? extends T> options)
Execute Groovy script(s) using specified options.
@NotNull public GroovyEvalSummary groovyEval(@NotNull java.lang.String scriptPattern)
Execute Groovy script(s) matching file pattern on AEM instances.
@NotNull public org.gradle.api.Project getProject()