Class AllPackageBuilder
java.lang.Object
io.wcm.devops.conga.plugins.aem.maven.allpackage.AllPackageBuilder
Builds "all" package based on given set of content packages.
General concept:
- Iterates through all content packages that are generated or collected by CONGA and contained in the model.json
- Enforces the order defined in CONGA by automatically adding dependencies to all packages reflecting the file order in model.json
- Because the dependency chain may be different for each runmode (author/publish), each package is added once for each runmode. Internally this separate dependency change for author and publish is optimized to have each package included only once for author+publish, unless it has a different chain of dependencies for both runmodes, in which case it is included separately for each run mode.
- To avoid conflicts with duplicate packages with different dependency chains the names of packages that are included in different versions for author/publish are changed and a runmode suffix (.author or .publish) is added, and it is put in a corresponding install folder.
- To avoid problems with nested sub packages, the sub packages are extracted from the packages and treated in the same way as other packages.
-
Constructor Summary
ConstructorsConstructorDescriptionAllPackageBuilder(File targetFile, String groupName, String packageName) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(List<InstallableFile> files, Set<String> cloudManagerTarget) Add content packages and OSGi bundles to be contained in "all" content package.Automatically generate dependencies between content packages based on file order in CONGA configuration.booleanBuild "all" content package.Build output timestamplogger(org.apache.maven.plugin.logging.Log value) Maven loggerHow to validate package types to be included in "all" package.How to handle versions of packages and sub-packages inside "all" package.Configure run mode optimization.Package version
-
Constructor Details
-
AllPackageBuilder
Constructor.- Parameters:
targetFile- Target filegroupName- Group namepackageName- Package name
-
-
Method Details
-
autoDependenciesMode
Automatically generate dependencies between content packages based on file order in CONGA configuration.- Parameters:
value- mode- Returns:
- this
-
runModeOptimization
Configure run mode optimization.- Parameters:
value- mode- Returns:
- this
-
packageTypeValidation
How to validate package types to be included in "all" package.- Parameters:
value- validation- Returns:
- this
-
packageVersionMode
How to handle versions of packages and sub-packages inside "all" package.- Parameters:
value- mode- Returns:
- this
-
logger
Maven logger- Parameters:
value- Maven logger- Returns:
- this
-
version
Package version- Parameters:
value- Package version- Returns:
- this
-
buildOutputTimestamp
Build output timestamp- Parameters:
value- timestamp- Returns:
- this
-
add
Add content packages and OSGi bundles to be contained in "all" content package.- Parameters:
files- Content packages (invalid will be filtered out) and OSGi bundlescloudManagerTarget- Target environments/run modes the packages should be attached to- Throws:
IllegalArgumentException- If and invalid package type is detected
-
build
Build "all" content package.- Parameters:
properties- Specifies additional properties to be set in the properties.xml file.- Returns:
- true if "all" package was generated, false if no valid package was found.
- Throws:
IOException- I/O exception
-
getGroupName
- Returns:
- Group name
-
getPackageName
- Returns:
- Package name
-
getTargetFile
- Returns:
- Target file
-