New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<excludedArtifacts> not working as expected #435
Comments
The only thing that I've gotten to remotely work is to follow the advice of https://stackoverflow.com/a/42345443/6262804 and set <downloadExtensionDependencies>false</downloadExtensionDependencies> I was able to get the full dependency list via mvn com.github.ferstl:depgraph-maven-plugin:4.0.2:for-artifact -Dartifact=$TARGET_GAV_COORDINATES -DgraphFormat=text -DclasspathScope=compile -DshowGroupIds=true -DshowVersions=true Then I explicitly add all of my dependencies as Obviously, this isn't ideal as with each time we upgrade our actual desired libraries, we'll have to go through multiple steps to keep all the transitive dependencies up to date, whereas Maven can do that kind of stuff for us. |
The issue is because https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/blob/main/src/main/java/com/lazerycode/jmeter/mojo/ConfigureJMeterMojo.java#L508 doesn't take the exclusions into consideration |
Looking at the source code, you can use ignoredArtifacts... not sure if this is documented:
|
It looks like the root of my problems is:
In other words, because "JMeter tests use test, provided, and compile-scoped dependencies", and the |
as we are currently facing the same => there is a possibility to solve that by combining a set of plugins and a small copy script and binding this to maven phases, e.g. a POM to copy Faker and the Maria driver lib
the copy script to use to call by the exec goal #!/bin/sh
target=$(jq -r '.configurations[0].jmeterDirectoryPath' target/config.json)
cp -av target/dependency/* "$target/lib" |
This might be related to #419, but I'm not 100% sure on that.
I've tried to supply
<testPlanLibraries>
with a number of<artifact>
entries.Unfortunately, it brings in ALL transitive dependencies from those artifacts, including those at
test
scopes.So to try and alleviate that, I attempted to exclude the
test
scoped transitive dependencies via<excludedArtifacts>
.It appears as if
<testPlanLibraries>
takes precedence over<excludedArtifacts>
, because NONE of the<exclusion>
entries that I supplied under<excludedArtifacts>
were actually excluded.The text was updated successfully, but these errors were encountered: