Document Tree
Document Properties
Kbid
25R850
Last Modified
02-Feb-2023
Added to KB
07-Jul-2014
Public Access
Everyone
Status
Online
Doc Type
References
Product
  • Gradle Tools
  • ICM 7.10
Reference - Gradle Assembly Tools

Table of Contents


Introduction

This document describes the Gradle DSL extension of the Intershop assembly plugins. The target group of this document are developers who want to extend the provided plugins by introducing own or changing existing functionality. Before starting, you should have knowledge of the following documents:

The plugins, extensions, tasks and types described in this document are available in the

  • com.intershop.build.gradle:assembly
  • com.intershop.build.gradle:ish-assembly  

components. If you want to make them available in your build script, add the following lines to your build.gradle file :

buildscript {
    dependencies {
        classpath 'com.intershop.build.gradle:assembly'
        classpath 'com.intershop.build.gradle:ish-assembly'
        classpath 'com.intershop.build.gradle:plugin-tests'
    }
}

Deep Links and Gradle Versions

This document describes Intershop's Assembly Tools in different versions. Information that applies only to a certain version of the tools is clearly marked as such.

Also the document contains deep links into the Gradle's documentation. For technical reasons they always point to Gradle version 1.8. For Assembly Tools version >= 2.0, please refer to the Gradle Build Language Referenc and Javadoc for Gradle version 2.0 instead. Mostly it is enough to substitute the version number in the URL, e.g., change:

http://www.gradle.org/docs/1.8/dsl/org.gradle.api.Task.html

into

http://www.gradle.org/docs/2.0/dsl/org.gradle.api.Task.html

Glossary


PhraseMeaning
Version Control System (VCS)

Also known as source control, source code management systems (SCM), or revision control systems (RCS). VCS is a mechanism for keeping multiple versions of your files, so that when you modify a file you can still access the previous revisions.

Artifact Repository

Place, where build and package software components are located. Provide a common interface to a dependency management system.

Code AnalysisProcess to analyze source code to calculate metrics, find bugs, etc.
Continuous Delivery PipelineSometimes called Deployment Pipeline, describes the stages, which code artifacts runs through source to production system.
System ComponentA software package of different code artifacts and files, that have to be deployed together.
System Component SetIs a container for system components, that needs to be build and branched together.
AssemblyAn assembly references one or more system components residing in the same or a configured artifact repository in order to deploy or deliver them together.
Build ProcessCompiles and packages files and code artifacts from a source project to deployable artifacts.
Publish ProcessThe process which transfers the deployable artifacts to a configured artifact repository.
Assembly ProcessThis process combines several system components to an assembly.
Deployment ProcessThis process extracts files and code artifacts from an artifact repository and applies the configuration.
Project Gradle DistributionThis is a customized Gradle distribution with the preconfigured artifact repositories and Gradle plugins.
Gradle PluginA Gradle plugin packages up reusable pieces of build logic, which can be used across many different projects and builds.
Project Gradle PluginThis is a Gradle plugin which contains special corporate respectively project settings.
Corporate PluginThe term is used as a synonym for Project Gradle Plugin.
Gradle Extension ObjectJava Bean compliant class holding configurations for Gradle plugins.
Gradle WrapperThe Gradle Wrapper is the preferred way of starting a Gradle build. The wrapper is a batch script on Windows, and a shell script for other operating systems. When you start a Gradle build via the wrapper, Gradle will be automatically downloaded and used to run the build. See for more information The Gradle Wrapper in the Gradle documentation (2.11, 2.7, 2.3, 2.0, 1.8)
Intershop ClusterA number of hosts of different types serving an Intershop 7.
Cluster NodeOne separately deployable part of an Intershop cluster. A host can run multiple nodes of one Intershop cluster.

References

Plugins

Gradle plugins are reusable pieces of build logic that can be used across many different projects. This section describes the plugins which have been added by Intershop.

Plugin com.intershop.build.gradle.plugins.AssemblyPlugin    

Augments Gradle's 'ivy-publish' plugin so the generated Ivy file matches the constraints of the concept assembly:

  • All dependencies are intransitive
  • All dependencies have concrete revisions
  • Dependencies are sorted by configurable criteria
  • Contains additional attributes for deployment (copyright-information, compatibility declarations for Gradle/JDK)

If any of the files <project directory>/deploy.gradle or <project directory>/deploy-settings.gradle exists they are added as an artifact.

Attaches the AssemblyExtension as property assembly to the project.

Plugin com.intershop.build.gradle.plugins.ComponentSetPlugin(component-set)

The plugin allows to define a component set. It creates a simple assembly with all sub projects as dependencies when applied to your project. Additionally, it creates a consolidated test report of all sub projects when running the test task. Upon applying the plugin, the AssemblyPlugin is also applied to the project.

Added Tasks

Task TypeTask NameDescription
UseSetAsFilter useSetAsFilterRegisters the component set version published by this build as version filter in the gradle.properties file in the Gradle User Home.
ProvideSourceCartridges provideSourceCartridgesRegisters all components in the set as source cartridges in the gradle.properties file in the Gradle User Home.

Plugin com.intershop.build.assembly.hosttype.HostTypeAssemblyPlugin  

Allows to define host-types and environments and their contained components.

The HostTypeAssemblyPlugin   adds the properties hostTypes, environments, initTypes and cartridges to the AssemblyExtension (see properties list). It also creates the concrete Gradle Configuration objects for those subset types and for adding the subsets to the assembly's Ivy file. It also creates and registers the associated ConfigurationFactory and InheritedSubsetProvider objects used when defining assembly inheritance options (see AssemblyInheritance) for those subsets. Upon applying the plugin, the AssemblyPlugin is also applied to the project.

For Gradle tools version >= 1.1:

The HostTypeAssemblyPlugin will configure the AssemblyExtension to sort all dependencies in the ivy.xml file of the assembly in the following way:

  • Cartridges appear first and are sorted by their appearance in the property order of the Cartridges extension.
  • All other dependencies appear after that and are sorted alphanumerically.

The order of the ivy.xml file will be used during deployment to define the order of cartridges in <IS_SHARE>/system/cartridges/cartridgelist.properties.

If a file cartridge-order.txt exists in the project directory the contents of this file will be used to fill the property order, otherwise the property will be empty by default and must be filled otherwise.

Plugin com.intershop.build.assembly.IshAssemblyPlugin(ish-assembly)

Applies the IshAssemblyBuildPlugin to the project.

Plugin com.intershop.build.assembly.IshAssemblyBuildPlugin

Provides tasks for deployment and database handling during the assembly process.

As sensible defaults the IshAssemblyBuildPlugin creates the default environments production, development, test, the default init type init and the host type for the shared host share. Also it adds standard deployment plugins as assembly dependency.

Attaches the IshAssemblyBuildExtension as property assemblyBuild to the project.

Upon applying this plugin, the AssemblyPlugin and HostTypeAssemblyPlugin are also applied to the project.

For Gradle tools version 1.0:

When applying this plugin, the order of dependencies of the final assembly will be calculated using a cartridge-order.txt file which specifies the order. See Cookbook - Gradle Assembly Tools for details on how the file has to be structured.

For cartridge ordering in Gradle tools version >= 1.1, see HostTypeAssemblyPlugin.

Added Tasks

Task TypeTask NameDescriptionTask Dependencies
GenerateSettingsGradle generateSettingsGradleGenerates a settings.gradle file used for the deployment from the template file and environment specific properties. Task is configured at the IshAssemblyBuildExtension.
GenerateRepositoryGradle generateBuildRepositoryGradleGenerates a build-repository.gradle file which contains information about the repository used while deploying . Task is c onfigured at the IshAssemblyBuildExtension.
DeployServer deployServer

Deploys a server from the assembly where the task is called. Task is c onfigured at the IshAssemblyBuildExtension.

Arguments:

skipDeployment- skips the deployment if set (useful if called together with other tasks).

depends on:

generateSettingsGradle

generateBuildRepositoryGradle

(publish task)

finalized by:

deployEnvironmentProperties

DeployServer deployCartridges

Deploys all source cartridges into the server. Task is c onfigured at the IshAssemblyBuildExtension.

Arguments:

cartridges - List of space-separated cartridge names. Will deploy those cartridges instead of the set of source cartridges if specified.

skipDeployment - skips the deployment if set (useful if called together with other tasks).

depends on:

generateSettingsGradle

generateBuildRepositoryGradle

(publish task)

Copy deployEnvironmentPropertiesDeploys the environment properties file (i.e., development.properties, production.properties, etc) in the IS_SHARE/system/config/cluster directory of the deployed server.
RunNestedGradle undeployServerRemoves all deployed files from the server directory. Task is c onfigured at the IshAssemblyBuildExtension.
CleanDBSchemaTask cleanDatabase

Drops all database tables, views and procedures. Task is c onfigured at the IshAssemblyBuildExtension.

Arguments:

skipDbInit - skips the database cleanup if set (useful if called together with other tasks).

depends on:

deployServer

DBInitTask dbinit

Starts a DBInit for the configured init cartridges. Task is configured at the IshAssemblyBuildExtension.



depends on:

deployServer

cleanDatabase

importBaseDump for Gradle tools version 1.0-1.1

importDbinitBaseDump for Gradle tools version >= 2.0

must run after:

configurePlainEncryption

DBMigrateTask dbmigrate

Starts a DBMigrate. Task is configured at the IshAssemblyBuildExtension.


Only for Gradle tools version >= 2.0.

depends on:

deployServer

cleanDatabase

importDBMigrateBaseDump

ImportDatabaseDumpTask importBaseDump

Imports the base database dump to the deployed server's configured database. The base dump is usually the one inherited from another assembly, but may also be configured differently. Task is configured at the IshAssemblyBuildExtension.

Removed and replaced by importDbinitBaseDump and importDbmigrateBaseDump tasks in Gradle tools version 2.0.

depends on:

deployServer

cleanDatabase

ImportDatabaseDumpTask importDbinitBaseDump

Imports the base database dump for a dbinit to the deployed server's configured database. The base dump is usually the one inherited from another assembly, but may also be configured differently. The dump is configured at the IshAssemblyBuildExtension.

Only for Gradle tools version >= 2.0.

depends on:

deployServer

cleanDatabase

ImportDatabaseDumpTask importDbmigrateBaseDump

Imports the database dump to import before dbmigrate. The dump is configured at the IshAssemblyBuildExtension.

Only for Gradle tools version >= 2.0.

depends on:

deployServer

cleanDatabase

ExportDatabaseDumpTask  exportDumpExports the content of the deployed server's database into a local dump file. Task is configured at the IshAssemblyBuildExtension. Is automatically called upon publishing if the flag IshAssemblyBuildExtension.releaseWithDump is set.

depends on:

deployServer

configurePlainEncryption

dbinit if releaseWithDump is 'dbinit'

dbmigrate if releaseWithDump is 'dbmigrate'

ConfigurePlainEncryption configurePlainEncryptionDisables the encryption of database content in IS_SHARE/system/config/cluster/encryption.properties. This is necessary to be able to use the database dump on other systems than the one where it was created.

must run after:

deployServer

UpdateDumpVersionFilter updateDumpVersionUpdates the version filter specifying the dump version used when importing a release dump (dump.<project-group>.<project-name> in <gradle-user-home>/gradle.properties file) to the latest release version.
ImportDatabaseDumpTask   importDumpImports the latest release dump (specified by the dump's version filter, see task updateDumpVersion) to the deployed server's database.

depends on:

deployBrandingInstallations

updateDumpVersion (if version filter not set)

Task deployBrandingInstallationsUnpacks the branding files delivered together with the release dump to the deployed server. Also see IshAssemblyBrandingPlugin.

depends on:

updateDumpVersion (if version filter not set)


Plugin com.intershop.build.assembly.IshAssemblyBrandingPlugin(ish-assembly-branding)

The plugin adds installed branding packages created during DBInit as artifacts to the assembly. It adds a new task for packaging the branding files which will automatically be called upon publishing the project. Upon applying the plugin, the IshAssemblyBuildPlugin is also applied to the project.

Added Tasks

Task TypeTask NameDescription
Zip packBrandingBundles the branding artifacts which have been created during DBInit together in a ZIP file. Is automatically published together with the project if released with a database dump.


Extension Objects

This section describes the extension objects which have been added by Intershop to configure the different plugins.

Extension Object com.intershop.build.gradle.plugins.AssemblyExtension

Extension which contains the configuration of an assembly. Is created by the AssemblyPlugin and contains methods to define assembly inheritance and additional attributes. The extension is registered at the Gradle project.


Example extension usage
assembly {
    inheritFrom('com.intershop.assembly:intershop7') {
        includeArtifacts type:['deploy-settings-gradle', 'deploy-gradle']       
    }
   
    extraAttributes = [
        'productName': 'Intershop 7',
        'copyrightOwner': 'Intershop Communications',
        'copyrightFrom': '2005'
    ]
}

Properties

TypeProperty NameDescriptionDefault value
List<AssemblyDependency> dependencies

Sorted list of dependencies from each configuration in this assembly. Read-only.

Empty list
Set<Configuration> configurationsSet of dependency configurations of the resulting assembly.Empty set
Map<String,String>extraAttributesAdditional attributes that are added to the <info> header of the assembly's Ivy file.

n/a

Properties Added by the HostTypeAssemblyPlugin

TypeProperty NameDescriptionDefault value
NamedDomainObjectContainer < HostType >hostTypes

Collection of host types of this assembly. Also includes inherited host types.

Empty container
NamedDomainObjectContainer < CartridgeType >environments

Collection of environments of this assembly. Also includes inherited environments.

Empty container
NamedDomainObjectContainer < CartridgeType >initTypes

Collection of init types of this assembly. Also includes inherited init types.

Empty container
Cartridges cartridges

Extension object for including cartridges in or excluding cartridges from certain cartridge type objects (i.e., specific environments or init types).

n/a

Dynamic Properties Added by the HostTypeAssemblyPlugin

TypeProperty NameDescription
HostType

<Name of the host type>

Each host type which has been created in this assembly or which has been inherited from another assembly.

Environment <Name of the environment>

Each environment which has been created in this assembly or which has been inherited from another assembly.

InitType <Name of the init type>

Each init type which has been created in this assembly or which has been inherited from another assembly.

Methods

Return TypeMethod NameDescription
voidforce(Object... moduleVersionSelectorNotations)

Forces the version of one or more dependencies in all subsets and configurations, overriding the version inherited from other assemblies. (No warning or error will occur if the specified module is not included in the assembly.)

Parameters:

moduleVersionSelectorNotations- Module names of the form "<org>:<name>:<version>" to be enforced. See also ResolutionStrategy.force.

voidrequireGradle(Map<String, Object> params)

Sets a Gradle version which this assembly requires (optionally). If not matching, a warning will be displayed during deployment.

Parameters:

params- Map of named parameters

      • Named parameter version of type Pattern
void requireJDK(Map<String, Object> params)

Sets a JDK version and vendor which this assembly requires (optional). If not matching, a warning is displayed during deployment.

Parameters:

params- Map of named parameters

      • Named parameter version of type Pattern.
      • Named parameter vendor of type Pattern .
voidsortPerConfiguration(Closure configureClosure = null)

Defines dependency sorting options per configuration (sets). Allows to specify different sorting options for different sets of configurations.

Parameters:

configureClosure- Configures a CompoundSortingExtension which sets the sorting options.

voidsortByDependencies(Closure configureClosure = null)

Defines dependency sorting by using the dependency graph.

Parameters:

configureClosure- Configures a DependencyGraphSortingExtension which sets the sorting options. A manual order in which certain components relate to each other may be specified here.

voidsortByExternalList(File listSource)

Defines dependency sorting by using an external file which specifies the order of dependencies.

Parameters:

listSource- Specifies the file which is used to read the dependency order from. See Cookbook - Gradle Assembly Tools for details on how the file is structured.

voidinheritFrom(Object assembly, Closure<?> closure = null)

Defines inheritance rules to inherit configurations, dependencies and artifacts from the given assembly.

Parameters:

assembly- Fully qualified dependency notation name of the assembly module which is to be inherited from.

closure- Configuration for the AssemblyInheritance object which defines inheritance options.

voidregisterInheritedSubsetProvider( InheritedSubsetProvider provider)

Registers a new provider to retrieve inherited subsets. These providers are used to get configuration-like objects from an inherited assembly (e.g., InheritedHostType, InheritedEnvironment, etc). As each InheritedSubsetProvider is also a ConfigurationFactory, calling this method also calls registerConfigurationFactory(ConfigurationFactoryfactory) for the given provider.

Parameters:

provider- Provider to register.

voidregisterConfigurationFactory( ConfigurationFactory factory) Registers a new configuration factory. A configuration factory is used to create actual configuration objects from configuration-like objects ( e.g., InheritedHostType, InheritedEnvironment, etc).

Parameters:

factory- Factory to register.

For Gradle tools version >= 1.1:

Return TypeMethod NameDescription
voidsortByList(List<String> order)

Defines dependency sorting by using a list of (unqualified) component names.

Parameters:

order- List of component (unqualified) component names.

List<String>

listFromAssembly(Object assemblyDependency)

Returns the unqualified names of the components contained in the given assembly in the order that they appear in the ivy.xml file.

Parameters:

assemblyDependency Assembly whose ivy.xml file should be used. Specify any dependency notation accepted by a DependencyHandler.

List<String>listFromFile(File orderFile)

Reads a list of component names from a given file. The file format is expected as follows:

  • Each component name is presented on a single line
  • Leading and trailing white-space is trimmed (i.e. is not part of the name)
  • Lines starting with a hash mark (#) are comments
  • Empty lines (or lines containing only whitespace) are ignored

Parameters:

orderFile- File to read the order from.

Type com.intershop.build.assembly.hosttype.Cartridges

Extension which is used to add cartridges to or remove them from certain cartridge types (i.e., environments or init types).

Example extension usage
assembly {
	cartridges {
	    include(
	        'com.intershop:tools',
	        'com.intershop:pf_cartridge',
	        // ...
	        in:[development, test, production]
	    )
	 
	    exclude module:'pf_core_test', from:environments.'test'
	}
}

Properties

For Gradle tools version >= 1.1:

TypeProperty NameDescriptionDefault Value
List<String>orderList of unqualified cartridge names by which the cartridges in the assemblies ivy.xml file (and through the deployment in the cartridgelist.properties file) are sorted. Each cartridge included in the assembly must appear exactly once in this list, or an exception will be thrown during publishing.If the file cartridge-order.txt exists in the project directory, listFromFile(file('cartridge-order.txt')), otherwise an empty list.

Methods

Return TypeMethod NameDescription
voidinclude(Map<String, Object> paramMap, Object... paramArray)

Adds the given cartridges to the given cartridge type(s).

Parameters:

paramMap- Map of named parameters

paramArray- List of fully qualified cartridge names (i.e., <group>:<cartridgeName>) which are to be included.

voidexclude(Map<String, Object> params)

Removes the given cartridges from the given cartridge type(s). Also see ModuleDependency.exclude().

Parameters:

paramMap- Map of named parameters

      • Named parameter from of type CartridgeType or Collection <CartridgeType> specifying the cartridge type(s) which cartridges should be removed from.
      • Optional named parameter module of type String specifying the name of the dependency which should be removed.
      • Optional named parameter group of type String specifying the group of the dependency (or dependencies) which should be removed.

Type com.intershop.build.assembly.IshAssemblyBuildExtension

Extension object which contains Intershop specific assembly properties. The default values for those properties are set in the IshAssemblyBuildPlugin.

Example for Gradle tools version 1.0-1.1:

Example extension usage
assemblyBuild {
    database {
        inherit('com.intershop.assembly:intershop7')
        initCartridges = ['ucm_demo']
    }
}

Example for Gradle tools version >= 2.0:

Example extension usage
assemblyBuild {
    dbinit{
		importFrom('com.intershop.assembly:intershop7')
        initCartridges = ['ucm_demo']
    }
	dbmigrate { 
        importFrom('com.intershop.assembly:primetech:7.4.6.1.+')        
    }
}

Properties

TypeProperty NameDescriptionDefault value
FileserverDirectory

Directory where the server is deployed into.

Project property serverDirectory or, if not set, <build-directory>/server.
FileenvironmentProperties

File which contains environment properties used when deploying the server from an assembly.

Project property buildEnvironmentProperties or, if not set, <project directory>/environment.properties file.
FilejavadocDirectory

Directory where the JavaDoc files will be deployed into.

Project property javadocDirectory or, if not set, <build-directory>/javadoc.
StringbootstrapVersionVersion number of the deployment-bootstrap plugin used in the generated settings.gradle file for the deployment. Module version of the deployment-bootstrap dependency of the assembly.
StringpublicationName

Name of the publication used when publishing the project. This is not the publication used when the assembly is published into the local or release repository, but rather the one used for deploying the server before generating the database dump file.

buildAssembly
StringpublicationRevision

Revision number of the build publication (see publicationName).

build
StringrepositoryName

Name of the (local) repository used for deploying the server from the assembly.

build
StringrepoUrl

URL to the repository used for deploying the server from the assembly.

<build-directory>/build-repo
StringrepoPattern

Pattern describing the structure of the repository used for deploying the server from the assembly.

[organisation]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
StringassemblyAssembly module version identifier used in the generated settings.gradle file for the deployment.   Read-only. <project-group>:<project-name>:<publicationRevision>
String environment Type of environment which will be deployed (by default either production, development or test). Read-only.Property with name environment in environment.properties file (see property environmentProperties) or, if not set, production.
List<String>sourceCartridges

List of cartridges residing in source folders. Files of those cartridges will later on be loaded directly from the source directory in the server.

Single project property sourceCartridges or multiple project properties starting with sourceCartridges.*, each with space-separated list of cartridge names. Empty list if not set.
List<String>sourceDirectories

Source directories used for looking up source cartridges. Also see property sourceCartridges.

Project property sourceDirectories containing a list of path names separated by the system specific path separator character.
booleanreleaseWithDump

Defines if the project should be published together with a database dump. If set to true, then a DBInit followed by a database export is automatically triggered before publishing. Additionally, the generated branding files are packaged and also be published with the release.

Since Gradle tools version 2.0:

Set the project property releaseWithDump to 'dbmigrate' to run a DBMigrate followed by a database export before publishing.

Project property releaseWithDump or false if not set.
DatabaseBuildConfiguration database

Defines how the database dump is generated/dbinit is executed.

Deprecated since Gradle tools version 2.0. Use dbinit and/or dbmigrate properties instead.

n/a
DbinitConfiguration dbinit

Defines how dbinit is executed. Only for Gradle tools version >= 2.0.

n/a
DbmigrateConfiguration dbmigrate

Defines how dbmigrate is executed. Only for Gradle tools version >= 2.0.

n/a

Methods

Return TypeMethod NameDescription
voiddatabase(Closure configure)

Configures the database extension property.

Deprecated since Gradle tools version 2.0. Use dbinit and/or dbmigrate method instead.

Parameters:

configure- Closure to configure the database property.

voiddbinit(Closure configure)

Configures the dbinit extension property. Only for Gradle tools version >= 2.0.

Parameters:

configure- Closure to configure the dbinit property.

voiddbmigrate(Closure configure)

Configures the dbmigrate extension property. Only for Gradle tools version >= 2.0.

Parameters:

configure- Closure to configure the dbmigrate property.

Type com.intershop.build.assembly.DatabaseBuildConfiguration

(Deprecated since version 2.0, see DbinitConfiguration and DbmigrateConfiguration instead)

Extension object which contains database specific assembly properties. The default values for those properties will be set in the IshAssemblyBuildPlugin.

Properties

TypeProperty NameDescriptionDefault value
File importFile

Dump file which will be imported when inheriting from another assembly's dump file and performing only a partial deployment. Returns null when performing a full DBInit. Also see task importBaseDump at the IshAssemblyBuildPlugin.

The inherited assembly's dump file or null if not specified. Also see method inherit(String, Closure).
File exportFile

Dump file which will be generated and published after performing the DBInit.

<build-directory>/dump/database-dump.dmp
Collection<String> initCartridges

Set of cartridges for which a partial DBInit will be performed when inheriting another assembly's dump file. Returns null when performing a full DBInit.

n/a

Methods

Return TypeMethod NameDescription
voidinherit(String from, Closure artifactFilter = { it.type == 'dump' })

Specifies an assembly from which to inherited the database dump. Used for performing a partial DBInit only.

Parameters:

from- Fully qualified dependency notation name of the assembly module which to inherit the database dump from.

artifactFilter- Filter closure for determining the correct artifact to inherit.

Type com.intershop.build.assembly.DbinitConfiguration

(For Gradle tools version >= 2.0)

Configures how to run DBInit. The default values for those properties will be set in the IshAssemblyBuildPlugin.

Properties

TypeProperty NameDescriptionDefault value
File importFile

Dump file which will be imported when inheriting from another assembly's dump file and performing only a partial deployment. Returns null when performing a full DBInit. Also see task importDbinitBaseDump at the  IshAssemblyBuildPlugin.

null
Collection<String> initCartridges

Set of cartridges for which a partial DBInit will be performed when inheriting another assembly's dump file. Returns null when performing a full DBInit.

n/a

Methods

Return TypeMethod NameDescription
voidimportFrom(String from, Closure artifactFilter = { it.type == 'dump' })

Specifies an assembly from which to inherited the database dump. Used for performing a partial DBInit only.

Parameters:

from- Fully qualified dependency notation name of the assembly module which to inherit the database dump from.

artifactFilter- Filter closure for determining the correct artifact to inherit.

Type com.intershop.build.assembly.DbmigrateConfiguration

(For Gradle tools version >= 2.0)

Configures how to run DBMigrate. 

Properties

TypeProperty NameDescriptionDefault value
File importFile

Dump file which will be imported before running dbmigrate. Also see task importDbmigrateBaseDump at the  IshAssemblyBuildPlugin.

null

Methods

Return TypeMethod NameDescription
voidimportFrom(String from, Closure artifactFilter = { it.type == 'dump' })

Specifies an assembly from which to inherited the database dump. Used for performing a partial DBInit only.

Parameters:

from- Fully qualified dependency notation name of the assembly module which to inherit the database dump from. Add a specific version in your build.gradle file. The VersioningPlugin will not overwrite this version, i.e. version/filter properties have no effect on resolving this dump.

artifactFilter- Filter closure for determining the correct artifact to inherit.

Tasks

This section describes the custom task types available in the Intershop assembly plugins.

Task com.intershop.build.gradle.plugins.UseSetAsFilter

Task for registering the published project version number as version filter in the gradle.properties file.

Properties

TypeProperty NameDescriptionDefault value
FilepropertiesFile

Properties file where the version number is stored.

n/a

Task com.intershop.build.gradle.plugins.ProvideSourceCartridges

Task for updating the 'sourceCartridges' property of the project with the list of source cartridges (i.e., the list of sub projects) in the gradle.properties file.

Properties

TypeProperty NameDescriptionDefault value
FilepropertiesFile

Properties file where the list of source cartridges is stored.

n/a

Task com.intershop.build.assembly.task.AbstractServerTask

Abstract super type for tasks which run the deployed server.

Properties

TypeProperty NameDescriptionDefault value
booleanisWindows

Return true if the system OS name starts with "Windows"; else false. Static.

n/a

booleanisLinux

Return false if the system OS name starts with "Windows"; else true. Static.

n/a

FileserverDirectoryDirectory where the server has been deployed into.n/a

Methods

Return TypeMethod NameDescription
Collection<String>getCommandWithEnvironment(Collection<String> command)

Creates an executable system environment specific command which includes the environment script of the server.

Parameters:

command - Command to execute.

Collection<String>getAntCommand(def parameters = [])

Creates an executable system environment specific Ant command which includes the environment script of the server.

Parameters:

parameters - List of parameters for executing the command.

Task com.intershop.build.assembly.task.CleanDBSchemaTask

Task for cleaning the database schema of the database configured at the deployed server. It executes the dbschema-clean Ant task in IS_HOME/tools/misc.

This class extends the super type AbstractServerTask.

Task com.intershop.build.assembly.task.ConfigurePlainEncryption

Task for setting the PLAIN encryption properties in a given properties file. This is used to remove encryption when generating a database dump which is to be used on multiple independent systems.

Properties

TypeProperty NameDescriptionDefault value
FilepropertiesFile

Properties file where the encryption properties should be stored.

n/a

Task com.intershop.build.assembly.task.DBInitTask

Task for executing a DBInit at the deployed server. A set of cartridges can be specified to only execute a partial DBInit for this set of cartridges. Before executing the DBInit, existing DBInit log files are removed.

This class extends the super type AbstractServerTask.

Properties

TypeProperty NameDescriptionDefault value
Collection<String>initCartridgesSet of init cartridges to execute a partial DBInit for. If not specified, a full DBInit is performed (optional).n/a

Methods

Return TypeMethod NameDescription
voidcleanLogDirectory()

Removes existing DBInit and SQL log files.

Object getCommand()

Returns the command used to execute the DBInit.

Task com.intershop.build.assembly.task.DBMigrateTask

(Only for Gradle tools version >= 2.0)

Task for executing a DBMigrate at the deployed server. Before executing the DBMigrate, existing DBMigrate log files are removed.

This class extends the super type AbstractServerTask.

Methods

Return TypeMethod NameDescription
voidcleanLogDirectory()

Removes existing DBMigrate and SQL log files.

Object getCommand()

Returns the command used to execute the DBMigrate.

Task com.intershop.build.assembly.task.DeployServer

Task for deploying the server from a given assembly. It runs a nested Gradle instance inside the deployed server with the passed settings.gradle file.

This class extends the super type RunNestedGradle.

Properties

TypeProperty NameDescriptionDefault value
FiletargetDirectoryDirectory in which to execute the deployment.n/a
File settingsGradleFile The settings.gradle file used for the deployment.n/a

Task com.intershop.build.assembly.task.ExportDatabaseDumpTask

Task for exporting the database content into a given dump file. It executes the export Ant task in IS_HOME/tools/misc.

This class extends the super type AbstractServerTask.

Properties

TypeProperty NameDescriptionDefault value
FiledumpFileFile to which the database content is exported.n/a

Task com.intershop.build.assembly.task.GenerateRepositoryGradle

Task for generating the repository Gradle file which contains information about the repository which will be used for the deployment.

Properties

TypeProperty NameDescriptionDefault value
FilerepositoryGradleFileResulting file with information about the deployment repository.n/a
StringrepoUrlURL to the repository used for deploying the server.n/a
StringrepoPatternPattern describing the structure of the repository used for deploying the server.n/a
StringrepositoryNameName of the repository used for deploying the server.n/a

Task com.intershop.build.assembly.task.GenerateSettingsGradle

Task for generating the settings.gradle file used during deployment from an assembly. The file will be generated from an (internal) template by replacing the placeholders with task properties resp. properties of the environment.properties file.

Properties

TypeProperty NameDescriptionDefault value
FilesettingsGradleFileResulting settings.gradle file generated from properties.n/a
FileenvironmentPropertiesFileFile which contains environment specific properties used during deployment. These properties replace the placeholders in the template file.

n/a

File javadocDirectoryDirectory to which the JavaDoc files are deployed.n/a
StringassemblyIdModule version identifier of the assembly used for the deployment.n/a
StringdeploymentBootstrapVersionVersion number of the deployment-bootstrap plugin used for the deployment. n/a
List<String>sourceCartridgesList of cartridges which are read directly from the source folders of the server. The are copied in the cartridges.source property in the IS_SHARE/system/cartridges/cartridgelist.properties file during deployment (optional).n/a
List<String> sourceDirectoriesList of source directories used for source cartridge lookup. They are copied into the IS_SOURCE property in the IS_HOME/intershop.properties file during deployment (optional).n/a

Task com.intershop.build.assembly.task.ImportDatabaseDumpTask

Task for importing the given dump file into the deployed server's database. It executes the import Ant task in IS_HOME/tools/misc.

This class extends the super type AbstractServerTask.

Properties

TypeProperty NameDescriptionDefault value
FiledumpFileDump file which will be imported into the database.n/a

Task com.intershop.build.assembly.task.UpdateDumpVersionFilter

Task for updating the version filter that contains the release version number of the current project's assembly database dump to the latest release.

Properties

TypeProperty NameDescriptionDefault value
FilepropertiesFile

Properties file where the version filter property will be stored.

n/a

StringdumpPropertyNameProperty name which is used for storing the version number.n/a

Task com.intershop.common.nested.RunNestedGradle

Task for executing a nested Gradle instance inside another directory.

Properties

TypeProperty NameDescriptionDefault value
FileprojectDirDirectory in which to start the nested Gradle instance.n/a
FilegradleHomeDirGradle's home directory.n/a
FilegradleUserHomeDirGradle's user home directory.n/a
List<String>tasksList of tasks to execute in the nested instance.n/a
List<String>argumentsList of additional arguments which will be passed to the nested Gradle instance.Empty list
List<String>effectiveArgumentsList of effective arguments, including init scripts and Gradle logging and start parameters. Read-only.

n/a

Collection<File>initScriptsSet of init scripts used in the deployment.n/a

Methods

Return TypeMethod NameDescription
voidcleanLogDirectory()

Removes existing DBInit and SQL log files.

Types

This section describes other types which are specified in this reference and which do not belong to any other category.

Type org.gradle.api.Project

See org.gradle.api.Project.

Properties

Properties Added by the AssemblyPlugin

TypeProperty NameDescriptionDefault value
AssemblyExtension assembly

Extension for defining assembly specific properties.

n/a

Properties Added by the IshAssemblyBuildPlugin

TypeProperty NameDescriptionDefault value
IshAssemblyBuildExtension assemblyBuild

Extension for defining Intershop specific assembly properties.

n/a

Type com.intershop.build.assembly.inheritance.AssemblyInheritanceSpec

Interface used to describe what is inherited from an assembly, i.e., which artifacts and which dependencies by an arbitrary number of include and exclude statements.

The suffix Spec is following Gradle's CopySpec for copying files.

Methods

Return TypeMethod NameDescription
voidincludeDependencies(Object... dependencies)

Includes the given dependencies of the inherited assembly in this assembly (context).

Parameters:

dependencies- List of unqualified dependency names, i.e. without organization.

voidincludeDependencies(Map<String, Object> params, Object... dependencies)

Includes the given dependencies of the inherited assembly in this assembly (context). An optional named parameter from may be specified to include dependencies only from a certain set of configurations.

Parameters:

params- Map of named parameters

      • Optional named parameter from of type InheritedSubset or Collection <InheritedSubset> which if specified includes the given dependencies in this configuration subset only.

dependencies - List of unqualified dependency names, i.e., without organization.

voidincludeDependencies(Closure<?> closure)

Includes the given dependencies of the inherited assembly in this assembly. The closure defines rules when to include a dependency.

Parameters:

closure- Closure to evaluate for dependency inclusion. It is called with every combination of ModuleVersionIdentifier and InheritedSubset from the base assembly and must return true if this combination should be included in the inheriting assembly; else false.

voidexcludeDependencies(Object... dependencies)

Excludes the given dependencies of the inherited assembly from this assembly (context).

Parameters:

dependencies - List of unqualified dependency names, i.e., without organization.

voidexcludeDependencies(Map<String, Object> params, Object... dependencies)

Excludes the given dependencies of the inherited assembly from this assembly (context). An optional named parameter from may be specified to exclude dependencies only from a certain set of configurations.

Parameters:

params- Map of named parameters

      • Optional named parameter from of type InheritedSubset or Collection <InheritedSubset> which if specified excludes the given dependencies from this configuration subset only.

dependencies- List of unqualified dependency names, i.e., without organization.

voidexcludeDependencies(Closure<?> closure)

Excludes the given dependencies of the inherited assembly from this assembly. The closure defines rules for when to exclude a dependency.

Parameters:

closure- Closure to evaluate for dependency exclusion. Will be called with every combination of ModuleVersionIdentifier and InheritedSubset from the base assembly and must return true if this combination should be excluded from the inheriting assembly; else false.

voidincludeArtifacts(Map<String, Object> params)

Includes the artifacts of the inherited assembly with the given parameters in this assembly.

Parameters:

params- Map of named parameters

      • Optional named parameter name of type String or Collection<String> - If set, includes artifacts with the given name(s) only.
      • Optional named parameter type of type String or Collection<String> - If set, includes artifacts with the given type(s) only.
      • Optional named parameter ext of type String or Collection<String> - If set, includes artifacts with the given extension(s) only.
      • Optional named parameter classifier of type String or Collection<String> - If set, includes artifacts with the given classifier(s) only.
      • Optional named parameter from of type String or Collection<String> - If set, includse the dependency in the given set(s) only.

voidincludeArtifacts(Closure closure)

Includes the given artifacts of the inherited assembly in this assembly. The closure defines rules for when to include an artifact.

Parameters:

closure- Closure to evaluate for artifact inclusion. It is called with every combination of ResolvedArtifact and InheritedSubset from the base assembly and must return true if this combination should be included in the inheriting assembly; else false.

void excludeArtifacts(Map<String, Object> params)

Excludes the artifacts of the inherited assembly with the given parameters from this assembly.

Parameters:

params- Map of named parameters

      • Optional named parameter name of type String or Collection<String>- If set, excludes artifacts with the given name(s) only.
      • Optional named parameter type of type String or Collection<String>- If set, excludes artifacts with the given type(s) only.
      • Optional named parameter ext of type String or Collection<String>- If set, excludes artifacts with the given extension(s) only.
      • Optional named parameter classifier of type String or Collection<String>- If set, excludes artifacts with the given classifier(s) only.
      • Optional named parameter from of type String or Collection<String>- If set, excludes the dependency in the given set(s) only.

void excludeArtifacts(Closure closure)

Excludes the given artifacts of the inherited assembly from this assembly. The closure defines rules for when to exclude an artifact.

Parameters:

closure- Closure to evaluate for artifact exclusion. Will be called with every combination of ResolvedArtifact and InheritedSubset from the base assembly and must return true if this combination should be excluded from the inheriting assembly; else false.

Type com.intershop.build.assembly.inheritance.AssemblyInheritance

This class defines the assembly inheritance process. When inheriting from another assembly, all dependencies and artifacts of the root assembly are inherited by default. Defining an exclude statement excludes specific dependencies resp. artifacts from the assembly. In contrast, when specifying an include statement explicitly, all dependencies resp. artifacts will no longer be inherited automatically, but only the ones defined in the include statement. However, this only affects the given context. Specific contexts can be constrained by using the within(InheritanceContext, Closure) method.

After inheriting, dependencies and artifacts can be manipulated by using the eachDependency(Closure) and eachArtifact(Closure) methods.

This class implements the super type AssemblyInheritanceSpec.

Example extension usage
assembly {
    inheritFrom('com.intershop.assembly:intershop7') {
        // no other artifacts will be included
        includeArtifacts type:['deploy-settings-gradle', 'deploy-gradle']
        
        // inherited environment 'development' will only include 
        // 'cartridge1', but other environments will still include every
        // inherited dependency 
        within(development) {
            includeDependencies 'cartridge1'
        }
        
        // 'cartridge2' will be excluded from every configuration
        excludeDependencies 'cartridge2'
        
        // use another version of inherited dependencies
        eachDependency { dependency ->
            dependency.setVersion("2")
        }
    }
}

Properties

TypeProperty NameDescriptionDefault value
Objectfrom

Fully qualified dependency notation name of the assembly module which is to be inherited from.

n/a

Dynamic Properties Added by the AssemblyExtension

TypeProperty IdentifierDescription
InheritedSubset Name of the inherited subset

Inherited subsets of the assembly which is to be inherited from. Are provided by the InheritedSubsetProvider.

InheritanceContext Name of the inheritance contextInheritance contexts of the assembly which is to be inherited from. Are provided by the InheritedSubsetProvider.

Methods

Return TypeMethod NameDescription
voideachDependency(Closure closure)

Perform certain operations on each inherited dependency.

Parameters:

closure- Closure to change dependency details. It is called with every InheritedDependency object after the set of inherited dependencies has been calculated.

void eachArtifact(Closure closure)

Perform certain operations on each inherited artifact.

Parameters:

closure- Closure to change artifact details. It is called with every InheritedArtifact object after the set of inherited artifacts has been calculated.

voidwithin( InheritanceContextcontext, Closure closure)

Defines a new context in which additional include and exclude statements can be specified. These statements does not affect other contexts or the root inheritance context.

Parameters:

context- Context which is to be constrained with additional include and exclude statements.

closure - Configuration for the ContextInheritanceSpec object where the include and exclude statements are defined.

Type com.intershop.build.assembly.inheritance.ContextInheritanceSpec

This class implements the super type AssemblyInheritanceSpec.

Properties

TypeProperty NameDescriptionDefault value
InheritanceContext context

Context in which the include and exclude statements has to be valid.

n/a

Type com.intershop.build.assembly.inheritance.InheritanceContext

Inheritance context which can be specified in an statement. An inheritance context can be used to restrict specific inheritance include and exclude statements to certain configuration subsets or subset types.

This interface extends the super type Named.

Methods

Return TypeMethod NameDescription
booleancontains(InheritedSubset object)

Checks whether this context contains the given inherited subset. Returns true if the subset is part of this context; else false.

Parameters:

object - Inherited subset to check.

Type com.intershop.build.assembly.inheritance.InheritedArtifact

Wrapper class for ResolvedArtifact objects. Objects of this class are provided in the AssemblyInheritance.eachArtifact(Closure) statements to be able to change artifact attributes and configurations after inheriting.

Properties

TypeProperty NameDescriptionDefault value
StringnameName of the inherited artifact.Name of the inherited ResolvedArtifact object.
StringtypeType of the inherited artifact.Type of the inherited ResolvedArtifact object.
StringextensionExtension of the inherited artifact.Extension of the inherited ResolvedArtifact object.
StringclassifierClassifier of the inherited artifact.Classifier of the inherited ResolvedArtifact object.
FilefileFile representation of the inherited artifact. Read-only.File representation of the inherited ResolvedArtifact object.
ResolvedModuleVersionmoduleVersionModule this inherited artifact belongs to. Read-only.Module the inherited ResolvedArtifact object belongs to.
CollectionconfigurationsSet of configurations and configuration subsets in which this artifact is to be included.Empty list.

Type com.intershop.build.assembly.inheritance.InheritedDependency

Wrapper class for ModuleVersionIdentifier objects. Objects of this class will be provided in the AssemblyInheritance.eachDependency(Closure) statements to be able to change dependency attributes and configurations after inheriting.

Properties

TypeProperty NameDescriptionDefault value
StringnameName of the inherited dependency.Name of the inherited ModuleVersionIdentifier object.
StringgroupGroup of the inherited dependency.Group of the inherited ModuleVersionIdentifier object.
StringversionVersion of the inherited dependency.Version of the inherited ModuleVersionIdentifier object.
ModuleIdentifiermoduleIdentifier containing the group and the name of the inherited dependency. Read-only. Identifier containing the group and the name of the inherited ModuleVersionIdentifier object.
CollectionconfigurationsSet of configurations and configuration subsets in which this dependency is to be included.Empty list.

Type com.intershop.build.assembly.inheritance.InheritedSubset

Interface for inherited configuration-like subsets (e.g., inherited host types, environments, etc). Each subset will be mapped to a specific Configuration in the resulting assembly.

This interface extends the super type InheritanceContext, i.e., all inherited subsets can also be used as contexts in the AssemblyInheritance.within( InheritanceContext context, Closure closure) method.

Properties

TypeProperty NameDescriptionDefault value
StringconfigurationName

Name of the Configuration this subset will be mapped to in the final Ivy file.

n/a

Type com.intershop.build.assembly.inheritance.InheritedSubsetProvider

Provider interface for inherited subsets. Whenever a new subset type is introduced in the base assembly, a new provider of this class needs to be registered at AssemblyExtension.registerInheritedSubsetProvider(InheritedSubsetProvider) to be able to use the inherited subsets in inheritance include and exclude statements.

Also provides additional InheritanceContext objects which can be used in the AssemblyInheritance.within( InheritanceContext context, Closure closure) method. In the default providers, the type of the respective subset is added for context lookups (e.g., environments, hostTypes, etc).

This interface extends the super type ConfigurationFactory.

Methods

Return TypeMethod NameDescription
voidprovideSubsets(Object assemblyDependency, Collection< InheritedSubset> inheritedSubsets)

Adds or removes configuration-like objects (e.g., host types) from the given inherited assembly to or from the given collection of inherited configuration-like objects. Is called by AssemblyExtension.inheritFrom(Object, groovy.lang.Closure) to find configuration-like entities.

Parameters:

assemblyDependency - Gradle dependency notation for the assembly to inherit from.

inheritedSubsets- Collection of inheritable subsets (e.g., configurations, host-types, environments, etc).

voidhideSubsets(Collection< InheritedSubset> inheritedSubsets)

Cleans up the given list of inherited subsets by removing subsets (mostly configurations) used as physical containers for conceptually higher level subsets (e.g., host-types, environments) from the given collection.

Parameters:

inheritedSubsets- Collection of inherited subsets to clean up.

voidprovideContexts(Collection< InheritanceContext> inheritanceContexts)

Adds additional contexts that can be used for scoping include and excludes of artifacts or dependencies to the given collection. Subsets provided by this provider are used as contexts automatically.

Parameters:

inheritanceContexts- Collection of inheritance context which additional contexts provided by this provider should be added to

Type com.intershop.build.assembly.inheritance.ConfigurationFactory

Factory for creating a concrete Configuration object from a given configuration-like object (e.g., HostType, Environment, specific InheritedSubsets etc). For each type of configuration-like objects (including inherited types), a factory must be registered at AssemblyExtension.registerConfigurationFactory(ConfigurationFactory) to be able to create a configuration object when inheriting from another assembly.

Methods

Return TypeMethod NameDescription
ConfigurationcreateTargetConfiguration(Object configuration)

Creates a configuration from the given configuration-like object at the project. Returns null if it does not "know" how to create it.

Parameters:

configuration - Object from which a configuration can be created.

Type com.intershop.build.gradle.plugins.AssemblyDependency

Class for modeling dependencies which are part of the final assembly.

Properties

TypeProperty NameDescriptionDefault value
ModuleVersionIdentifier id

ModuleVersionIdentifier of the dependency. When changing this, the version field will also be updated to the version of the ModuleVersionIdentifier.

n/a
StringversionVersion number of this dependency. May differ from the version in the ModuleVersionIdentifier in case another version should be used in the assembly.

n/a

Set< Configuration>configurationsConfigurations this dependency belongs to.

n/a

Type com.intershop.build.gradle.plugins.CompoundSortingExtension

Configurable object for defining different dependency sorting options for different configuration sets. Is configured by method sortPerConfiguration(Closure) in the AssemblyExtension.

Example extension usage
assembly.sortPerConfiguration {                                
    sort(configurationSet1).byModuleId()
    sort(configurationSet2).byDependencies()
    sort(configurationSet3).byExternalList(file('cartridge-order.txt'))
}

Methods

Return TypeMethod NameDescription
Entrysort(List< Configuration> configurations)

Creates a new sorting entry for the given configurations. See Entry for specifying sorting methods for the given configurations.

Parameters:

configurations- Configurations to sort separately.

Entrysort(Configuration configurations)

Creates a new sorting entry for the given configuration. See Entry for specifying sorting methods for the given configurations.

Parameters:

configuration - Configuration to sort separately.

EntrysortRemaining()

Creates an artifical sorting entry for the remaining (unsorted) configurations. See Entry for specifying sorting methods for the given configurations.

Type com.intershop.build.gradle.plugins.CompoundSortingExtension.Entry

Entry for storing information about which configuration set should be sorted by which sorting type. See CompoundSortingExtension for how an object of this class can be created.

Methods

Return TypeMethod NameDescription
voidbyDependencies(Closure configureClosure = null)

Sorts the dependencies of configurations of this sorting entry by the dependency graph.

Parameters:

configureClosure - Configures a DependencyGraphSortingExtension which sets the sorting options. A manual order in which certain components relate to each other may be specified here.

voidbyExternalList(File listSource)

Sorts the dependencies of configurations of this sorting entry by an external list defining the dependency order.

Parameters:

listSource - Specifies the file which is used to read the dependency order from. See Cookbook - Gradle Assembly Tools for details on how the file is structured.

voidbyModuleId()

Sorts the dependencies canonically by the ModuleVersionIdentifier. The dependencies are ordered in the following way:

  1. Groups are compared lexicographically first.
  2. If groups are matching, names are compared lexicographically.
  3. If names are also matching, the version numbers are compared lexicographically.

Type com.intershop.build.gradle.plugins.DependencyGraphSortingExtension

Configurable object for defining options for sorting by the dependency graph. It is configured by method sortByDependencies(Closure) in the AssemblyExtension resp. by method sortByDependencies(Closure) and using a CompoundSortingExtension.

Example extension usage
// alternative #1
assembly.sortByDependencies {
    order ('com.example:component-b').after 'com.example:component-a'
}

// alternative #2
assembly.sortPerConfiguration {
    sort(configurationSet).byDependencies() {
        order ('com.example:component-b').before 'com.example:component-c'
    }
}

Methods

Return TypeMethod NameDescription
DependencyOrderorder(Object dependencyNotation)

Defines additional order criteria. By default the dependencies are ordered by the dependency graph, but by using this method, a fixed order between certain dependencies can be defined. Returns a DependencyOrder object where additional order rules for the given dependency can be defined.

Parameters:

dependencyNotation-   Fully qualified name of the dependency to be order separately

Type com.intershop.build.gradle.plugins.DependencyOrder

Class used to specify additional sorting rules for a given dependency when sorting by the dependency graph. Also see DependencyGraphSortingExtension.

Methods

Return TypeMethod NameDescription
voidafter(Object dependencyNotation)

Sorts the configured dependency after the dependency given as parameter.

Parameters:

dependencyNotation - Fully qualified name of the dependency which will be placed before the configured dependency of this ordering rule in the resulting order.

voidbefore(Object dependencyNotation)

Sorts the configured dependency before the dependency given as parameter.

Parameters:

dependencyNotation - Fully qualified name of the dependency which will be placed after the configured dependency of this ordering rule in the resulting order.

voidindependentOf(Object dependencyNotation)

Marks the configured dependency and the dependency given as parameter as independent of each other, i.e., the resulting order will not matter.

Parameters:

dependencyNotation - Fully qualified name of the dependency which should be marked as independent in relation to the configured dependency.

Type com.intershop.build.assembly.hosttype.CartridgeType

Super class for configuration subsets which cartridges can be added to, e.g., Environments and InitTypes.

Properties

TypeProperty NameDescriptionDefault value
Stringname

Name of the cartridge type.

n/a
ConfigurationcartridgesConfiguration

Concrete configuration object of the cartridge type. It is created by the HostTypeAssemblyPlugin for environments and init types.

n/a

Type com.intershop.build.assembly.hosttype.Environment

CartridgeType for environments. Environments are different stages in the life-cycle of an assembly, like development, test and production. At time of deployment exactly one environment is selected. Environments are provided as extension of the project's assembly extension by the HostTypeAssemblyPlugin.

Type com.intershop.build.assembly.hosttype.InitType

CartridgeType for init types. Init types are types of configurations that contain system components that should be deployed as cartridges, but only be loaded by the DBInit tool and not by the application server. Init types are provided as extension of the project's assembly extension by the HostTypeAssemblyPlugin.

Type com.intershop.build.assembly.hosttype.HostType

Class for representing host types. Host types are types of nodes in a cluster deployment. At time of deployment exactly one host type is selected. In a single-machine-installation an implicit host type named all may be selected which deploys all known host types. Host types are provided as extension of the project's assembly extension by the HostTypeAssemblyPlugin. The host type extension works similar to the cartridges extension but also allows to add non-cartridge components to the given host type.

Example extension usage
hostTypes {
    webserver {
        include (
        'com.intershop:3rd_jdk',
        'com.intershop:3rd_apache',
        // ...
        )
 
		exclude module:'3rd_tomcat'
    }
}

Properties

TypeProperty NameDescriptionDefault value
Stringname

Name of the host type.

n/a
booleanincludeCartridges

During deployment, if set to true, cartridges of the to-be-deployed environment as well as all init type cartridges will be deployed as well. If set to false, only the components of the host type will be deployed.

false
booleanincludeShare

System components may contain artifacts which are to be deployed to the IS_SHARE directory of the shared host. If this flag is set to true, these artifacts will be deployed with the host type during deployment time.

false
booleanincludeLocal

System components may contain artifacts which are to be deployed to the local IS_HOME directory of non-shared hosts. If this flag is set to true , these artifacts will be deployed with the host type during deployment time.

false
booleanincludeJavadocIf this flag is set to true, JavaDoc will be deployed additionally for all components.false
Configurationconfiguration

Actual configuration object of the host type. It is created by the HostTypeAssemblyPlugin.

n/a

Methods

Return TypeMethod NameDescription
voidinclude(Object... paramArray)

Adds the given components to this host type.

Parameters:

paramArray - List of fully qualified component names (i.e., <group>:<cartridgeName>) which are to be included.

voidexclude(Map<String, Object> excludeParams)

Removes the given components from this host type. Also see ModuleDependency.exclude().

Parameters:

excludeParams - Map of named parameters

      • Optional named parameter module of type String specifying the name of the dependency which should be excluded.
      • Optional named parameter group of type String specifying the group of the dependency (or dependencies) which should be excluded.

Type com.intershop.build.assembly.DatabaseBuildConfiguration

(Deprecated since version 2.0, see DbinitConfiguration and DbmigrateConfiguration instead)

Extension object which contains database specific assembly properties. The default values for those properties will be set in the IshAssemblyBuildPlugin.

Properties

TypeProperty NameDescriptionDefault value
File importFile

Dump file which will be imported when inheriting from another assembly's dump file and performing only a partial deployment. Returns null when performing a full DBInit. Also see task importBaseDump at the   IshAssemblyBuildPlugin.

The inherited assembly's dump file or null if not specified. Also see method inherit(String, Closure).
File exportFile

Dump file which will be generated and published after performing the DBInit.

<build-directory>/dump/database-dump.dmp
Collection<String> initCartridges

Set of cartridges for which a partial DBInit will be performed when inheriting another assembly's dump file. Returns null when performing a full DBInit.

n/a

Methods

Return TypeMethod NameDescription
voidinherit(String from, Closure artifactFilter = { it.type == 'dump' })

Specifies an assembly from which to inherited the database dump. Used for performing a partial DBInit only.

Parameters:

from- Fully qualified dependency notation name of the assembly module which to inherit the database dump from.

artifactFilter- Filter closure for determining the correct artifact to inherit.

Disclaimer
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.