Class AllPackageBuilder
- java.lang.Object
-
- io.wcm.devops.conga.plugins.aem.maven.allpackage.AllPackageBuilder
-
public final class AllPackageBuilder extends Object
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
Constructors Constructor Description AllPackageBuilder(File targetFile, String groupName, String packageName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(List<InstallableFile> files, Set<String> cloudManagerTarget)
Add content packages and OSGi bundles to be contained in "all" content package.AllPackageBuilder
autoDependenciesMode(AutoDependenciesMode value)
boolean
build(Map<String,String> properties)
Build "all" content package.AllPackageBuilder
buildOutputTimestamp(BuildOutputTimestamp value)
String
getGroupName()
String
getPackageName()
File
getTargetFile()
AllPackageBuilder
logger(org.apache.maven.plugin.logging.Log value)
AllPackageBuilder
packageTypeValidation(PackageTypeValidation value)
AllPackageBuilder
packageVersionMode(PackageVersionMode value)
AllPackageBuilder
runModeOptimization(RunModeOptimization value)
AllPackageBuilder
version(String value)
-
-
-
Method Detail
-
autoDependenciesMode
public AllPackageBuilder autoDependenciesMode(AutoDependenciesMode value)
- Parameters:
value
- Automatically generate dependencies between content packages based on file order in CONGA configuration.- Returns:
- this
-
runModeOptimization
public AllPackageBuilder runModeOptimization(RunModeOptimization value)
- Parameters:
value
- Configure run mode optimization.- Returns:
- this
-
packageTypeValidation
public AllPackageBuilder packageTypeValidation(PackageTypeValidation value)
- Parameters:
value
- How to validate package types to be included in "all" package.- Returns:
- this
-
packageVersionMode
public AllPackageBuilder packageVersionMode(PackageVersionMode value)
- Parameters:
value
- How to handle versions of packages and sub-packages inside "all" package.- Returns:
- this
-
logger
public AllPackageBuilder logger(org.apache.maven.plugin.logging.Log value)
- Parameters:
value
- Maven logger- Returns:
- this
-
version
public AllPackageBuilder version(String value)
- Parameters:
value
- Package version- Returns:
- this
-
buildOutputTimestamp
public AllPackageBuilder buildOutputTimestamp(BuildOutputTimestamp value)
- Parameters:
value
- Build output timestamp- Returns:
- this
-
add
public void add(List<InstallableFile> files, Set<String> cloudManagerTarget)
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
public boolean build(Map<String,String> properties) throws IOException
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
public String getGroupName()
-
getPackageName
public String getPackageName()
-
getTargetFile
public File getTargetFile()
-
-