code: private Set<Artifact> checkDependencies( Set<Artifact> dependencies, List<String> thePatterns )
          throws EnforcerRuleException
      {
          Set<Artifact> foundMatches = null;
  
          if ( thePatterns != null && thePatterns.size() > 0 )
          {
  
              for ( String pattern : thePatterns )
              {
  
                  String[] subStrings = pattern.split( ":" );
                  subStrings = StringUtils.stripAll( subStrings );
  
                  for ( Artifact artifact : dependencies )
                  {
                      if ( compareDependency( subStrings, artifact ) )
                      {
                          // only create if needed
                          if ( foundMatches == null )
                          {
                              foundMatches = new HashSet<Artifact>();
                          }
                          foundMatches.add( artifact );
                      }
                  }
              }
          }
          return foundMatches;
      }
docs: Checks the set of dependencies against the list of patterns.
  
  @param thePatterns the patterns
  @param dependencies the dependencies
  @return a set containing artifacts matching one of the patterns or <code>null</code>
  @throws EnforcerRuleException the enforcer rule exception