Maven's POM reference states the following:
provided - this is much like compile, but indicates you expect the JDK or a container to provide it at runtime. It is only available on the compilation and test classpath, and is not transitive.
...
system - this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository.
I have now converted a project with a lot of 'system' dependencies to 'provided'. However, it appears that system dependencies are transitive, which makes them very un-similar to provided, and is now causing many missing dependencies in my build. My question is twofold:
Transitive dependencies will always be part of the assembly. There is no scope to state your intentioned behaviour.
The question is: Why has a project that is intended to be included in other projects (as you stated with the intention to have transitive dependencies) an assembly? Typically a project that has an WAR-assembly will not be included as dependency in other projects (WAR-dependencies do not provide their transitive dependencies at all because they are only intended for WAR overlays).
If this is a maven assembly this is simple. The Maven Assembly plugin has "excludes" to filter the files that have to be copied.
If this would be a WAR-Project you could exclude some JARs from the WAR with these excludes:
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<packagingExcludes>WEB-INF/lib/*-[toExclude1]-*.jar,WEB-INF/lib/[toExclude2]*.jar</packagingExcludes>
</configuration>
</plugin>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With