Package org.xwiki.tool.enforcer
Class BannedDependencyType
- java.lang.Object
-
- org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
-
- org.xwiki.tool.enforcer.AbstractPomCheck
-
- org.xwiki.tool.enforcer.BannedDependencyType
-
- All Implemented Interfaces:
org.apache.maven.enforcer.rule.api.EnforcerRuleBase
@Named("bannedDependencyType") public class BannedDependencyType extends AbstractPomCheck
Performs checks on the type specified for dependencies in pom.xml files. For example in XWiki Standard we want to prevent extension with packagejar
andwebjar
to depend onxar
extensions but only if the module does not ends with -test-docker or -test-tests. To achieve this you would use:<rules> <validateDependencyVersion implementation="org.xwiki.tool.enforcer.BannedDependencyType"> <projectPackaging>jar</projectPackaging> <dependencyType>xar</dependencyType> </validateDependencyVersion> <validateDependencyVersion implementation="org.xwiki.tool.enforcer.BannedDependencyType"> <projectPackaging>webjar</projectPackaging> <dependencyType>xar</dependencyType> </validateDependencyVersion> </rules>
- Since:
- 14.6RC1, 14.4.3, 13.10.8
- Version:
- $Id: 60f4c464476a9ed81b7d8f0f0167fe0bbff699a9 $
-
-
Constructor Summary
Constructors Constructor Description BannedDependencyType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
org.apache.maven.enforcer.rule.api.EnforcerLogger
getLog()
void
setLog(org.apache.maven.enforcer.rule.api.EnforcerLogger arg0)
-
Methods inherited from class org.xwiki.tool.enforcer.AbstractPomCheck
getModel, getResolvedModel
-
-
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.enforcer.rule.api.EnforcerRuleException
- Specified by:
execute
in classorg.apache.maven.enforcer.rule.api.AbstractEnforcerRule
- Throws:
org.apache.maven.enforcer.rule.api.EnforcerRuleException
-
setLog
public void setLog(org.apache.maven.enforcer.rule.api.EnforcerLogger arg0)
- Specified by:
setLog
in interfaceorg.apache.maven.enforcer.rule.api.EnforcerRuleBase
-
getLog
public org.apache.maven.enforcer.rule.api.EnforcerLogger getLog()
-
-