commit | d6550f2cbe4bba235d38c35195edbe53f4a18c60 | [log] [tgz] |
---|---|---|
author | Konrad Windszus <kwin@apache.org> | Fri Jun 03 18:59:58 2022 +0200 |
committer | Konrad Windszus <kwin@apache.org> | Fri Jun 03 18:59:58 2022 +0200 |
tree | 6fcdaa839a8a69c41b85b9b07b595ef0a24301aa | |
parent | ecb3f62e055200092194fe9f27a68ea6b81227a5 [diff] |
SLING-11369 remove any traces of "transitive" as both transitive and direct provided dependencies are checked
This module is part of the Apache Sling project.
It provides additional Maven Enforcer rules.
Checks that the runtime classpath (e.g. used by Maven Plugins via the Plugin Classloader or by the Appassembler Maven Plugin's assemble
goal) contains all provided dependencies both direct and transitive ones.
As those are not transitively inherited they need to be declared explicitly in the pom.xml of the using Maven project.
excludes
- a list of dependencies to skip. Their transitive dependencies are not evaluated either. The format is groupId[:artifactId][:version][:type][:scope][:classifier]
where artifactId
, version
, type
, scope
and classifier
are optional. Wild cards (*
for arbitrarily many characters or ?
for an arbitrary single character) may be used to replace an entire or just parts of a section. Examples:org.apache.maven
(everything with the given group)org.apache.maven:myArtifact
org.apache.maven:*:1.2
(exclude version 1.2 and above, equivalent to [1.2,) )org.apache.maven:*:[1.2]
(explicit exclude of version 1.2)<project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>3.0.0</version> <dependencies> <dependency> <groupId>org.apache.sling</groupId> <artifactId>maven-enforcer-rules</artifactId> <version>LATEST</version> </dependency> </dependencies> <executions> <execution> <id>enforce-complete-runtime-classpath</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireProvidedDependenciesInRuntimeClasspath implementation="org.apache.sling.maven.enforcer.RequireProvidedDependenciesInRuntimeClasspath"> <excludes> <exclude>javax.servlet:javax.servlet-api</exclude> </excludes> </requireProvidedDependenciesInRuntimeClasspath> </rules> <fail>true</fail> </configuration> </execution> </executions> </plugin> </plugins> </build> [...] </project>