You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dariusz Kordonski (JIRA)" <ji...@apache.org> on 2016/07/13 02:21:20 UTC

[jira] [Commented] (MENFORCER-211) wildcard ignore in requireReleaseDeps

    [ https://issues.apache.org/jira/browse/MENFORCER-211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15374190#comment-15374190 ] 

Dariusz Kordonski commented on MENFORCER-211:
---------------------------------------------

I can confirm that wildcards mixed with strings don't seem to work. Pure wildcards as reported in this issue work for us however. E.g. both excludes below will work (exact match, pure wildcard):

{code}
<excludes>
   <exclude>com.atlassian.plugins:atlassian-plugins-core</exclude>
 </excludes>
{code}

{code}
<excludes>
   <exclude>com.atlassian.plugins:*</exclude>
 </excludes>
{code}

But the following will not be detected (mixed string and wildcards), despite being documented as a valid exclusion pattern:

{code}
<excludes>
   <exclude>com.atlassian.plugins:atlassian-plugins-*</exclude>
 </excludes>
{code}

We are using version 1.4.0

> wildcard ignore in requireReleaseDeps
> -------------------------------------
>
>                 Key: MENFORCER-211
>                 URL: https://issues.apache.org/jira/browse/MENFORCER-211
>             Project: Maven Enforcer Plugin
>          Issue Type: Improvement
>    Affects Versions: 1.3.1
>            Reporter: Arne Brix
>            Priority: Minor
>             Fix For: waiting-for-feedback
>
>
> the bannedDependencies rule allows one to specify artifact lists using wildcards:
> {code:xml}
> org.apache.*:maven-*:*
> {code}
> we are using the requireReleaseDeps rule for our release builds.
> We would like to exclude dependencies with scope test because they don't contribute to the final artifact.
> We tried the syntax documented for bannedDependencies, but it didn't work:
> {code:xml}
>               <configuration>
>                 <rules>
>                   <requireReleaseDeps>
>                     <message>No Snapshots Allowed!</message>
>                     <onlyWhenRelease>true</onlyWhenRelease>
>                     <excludes>
>                       <exclude>*:*:*:*:test</exclude>
>                     </excludes>
>                   </requireReleaseDeps>
>                 </rules>
>                 <fail>true</fail>
>               </configuration>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)