maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte" <rfscho...@apache.org>
Subject Re: Some help needed with maven-enforcer-plugin
Date Tue, 05 Nov 2013 16:20:55 GMT
This is indeed the expected configuration, so you might have hit a bug.

Robert

Op Tue, 05 Nov 2013 17:07:12 +0100 schreef Markward Schubert  
<markward.schubert@gmail.com>:

> Hi All!
>
> I am struggling with the enforcer-plugin's requireSameVersions rule.
> Introducing the bannedDependencies rule was successful, but somehow I  
> seem
> to not get the right configuration for requireSameVersion.
>
> Here is my config:
>
> <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-enforcer-plugin</artifactId>
>                 <version>1.3.1</version>
>                 <executions>
>                     <execution>
>                         <id>enforce-banned-dependencies</id>
>                         <goals>
>                             <goal>enforce</goal>
>                         </goals>
>                         <configuration>
>                             <rules>
>                                 <bannedDependencies>
>
> <searchTransitive>true</searchTransitive>
>                                     <excludes>
>                                         <exclude>commons-logging</exclude>
>                                     </excludes>
>                                 </bannedDependencies>
>                             </rules>
>                             <fail>true</fail>
>                         </configuration>
>                     </execution>
>                     <execution>
>                         <id>enforce-same-versions</id>
>                         <goals>
>                             <goal>enforce</goal>
>                         </goals>
>                         <configuration>
>                             <rules>
>                                 <requireSameVersions>
>                                     <dependencies>
>                                         <dependency>org.slf4j:*</dependency>
>                                     </dependencies>
>                                 </requireSameVersions>
>                             </rules>
>                             <fail>true</fail>
>                         </configuration>
>                     </execution>
>                 </executions>
>                 <configuration>
>                     <ignoreCache>true</ignoreCache>
>                 </configuration>
>             </plugin>
>
> As a matter of fact we have
>
> org.slf4j:slf4j-api:1.7.5
>
> as well as
>
> org.slf4j:com.springsource.slf4j.api:1.6.1
>
> in our dependency tree. But still the build is SUCCESSFUL.
> Did I get anything wrong here? Some misconfiguration.
>
> I would expect that the rule as configured would enforce all
> org.slf4j-group dependencies to have the same version.
>
> Thanks for your help!
>
> Markward

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message