Uploaded image for project: 'Maven Enforcer Plugin'
  1. Maven Enforcer Plugin
  2. MENFORCER-264

Properties can no longer be used in banned dependencies (regression)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 1.4.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux

      Description

      After updating maven-enforcer-plugin from 1.3 to 1.4 a config like this

                        <configuration>
                           <rules>
                              <bannedDependencies>
                                 <includes>
                                    <include>org.hibernate:hibernate-core:${hibernate.version}</include>
                                 </includes>
                              </bannedDependencies>
                           </rules>
                        </configuration>
      

      fails with

      Caused by: java.util.regex.PatternSyntaxException: Illegal repetition near index 0
      ${hibernate\.version]
      ^
              at java.util.regex.Pattern.error(Pattern.java:1955)
              at java.util.regex.Pattern.closure(Pattern.java:3157)
              at java.util.regex.Pattern.sequence(Pattern.java:2134)
              at java.util.regex.Pattern.expr(Pattern.java:1996)
              at java.util.regex.Pattern.compile(Pattern.java:1696)
              at java.util.regex.Pattern.<init>(Pattern.java:1351)
              at java.util.regex.Pattern.compile(Pattern.java:1028)
              at java.util.regex.Pattern.matches(Pattern.java:1133)
              at org.apache.maven.plugins.enforcer.utils.ArtifactMatcher$Pattern.matches(ArtifactMatcher.java:148)
              at org.apache.maven.plugins.enforcer.utils.ArtifactMatcher$Pattern.match(ArtifactMatcher.java:113)
              at org.apache.maven.plugins.enforcer.BannedDependencies.compareDependency(BannedDependencies.java:149)
              at org.apache.maven.plugins.enforcer.BannedDependencies.checkDependencies(BannedDependencies.java:117)
              at org.apache.maven.plugins.enforcer.BannedDependencies.checkDependencies(BannedDependencies.java:82)
              at org.apache.maven.plugins.enforcer.AbstractBanDependencies.execute(AbstractBanDependencies.java:94)
              at org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:150)
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      

        Attachments

          Activity

            People

            • Assignee:
              rfscholte Robert Scholte
              Reporter:
              deki Dennis Kieselhorst
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: