Class EffectivePackagingRule

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    class EffectivePackagingRule
    extends PackagingRule
    Effective artifact packaging rule.

    In general packaging rules are in n-to-m relation with artifacts. One artifact can have one or more packaging rules and one packaging rule can match zero or more artifacts. This approach is well suited for configuring build process by humans.

    In contrast, effective packaging rules are in 1-to-1 relation with artifacts. Every artifact has exactly one effective packaging rule. This form is best for machine processing.

    Effective packaging rules are created from raw configuration rules by merging and/or splitting and expanding regular expression patterns.

    • Constructor Detail

      • EffectivePackagingRule

        public EffectivePackagingRule​(java.util.List<PackagingRule> artifactManagement,
                                      java.lang.String groupId,
                                      java.lang.String artifactId,
                                      java.lang.String extension,
                                      java.lang.String classifier,
                                      java.lang.String version)
        Create effective packaging rule for given artifact.
        Parameters:
        artifactManagement - list of raw packaging rules that are foundation of newly constructed effective rule
        groupId - groupId of artifact for which effective rule is to be created
        artifactId - artifactId of artifact for which effective rule is to be created
        extension - extension of artifact for which effective rule is to be created
        classifier - classifier of artifact for which effective rule is to be created
        version - version of artifact for which effective rule is to be created
    • Method Detail

      • isNullOrEmpty

        private static boolean isNullOrEmpty​(java.lang.String str)
      • expandBackreferences

        private static java.lang.String expandBackreferences​(java.util.List<java.util.regex.Matcher> matchers,
                                                             java.lang.String result)
      • expandBackreferences

        private static Artifact expandBackreferences​(java.util.List<java.util.regex.Matcher> matchers,
                                                     Artifact source)