This message was deleted.
# develocity
s
This message was deleted.
t
Or maybe even better, ignore
dependency:tree
we basically have some automated job which is running about 10 jobs per minute of dependency:tree that is polluting and filling up our scans. It’s run by another team so I’d like to resolve it on our end without asking them to do anything.
OK I think I figured out this is Spring Expression Language syntax
I struggled to figure this out. For now, I just set builds to be on demand and then added the
-Dscan=true
to all of our automation which works but is a slightly bigger instrument than I was looking for.
b
Sorry for the delay! You could go the other way with this too.
Copy code
<publish>#{env['DEP_SCAN'] == null ? 'ALWAYS' : 'ON_DEMAND'}</publish>
And configure your automated job to run something like:
Copy code
DEP_SCAN=true mvn dependency:tree
What are you doing with the results of
dependency:tree
? (I'm just curious, it's not relevant to the conversation 😄 )
t
it’s a security job collecting the versions for analysis afaik
is there a way to access properties instead of env? I couldn’t quite figure that one out
b
HA! actually, you can just to this: https://docs.gradle.com/enterprise/maven-extension/#publishing_every_build_run
Copy code
<publish>ALWAYS</publish>
and
Copy code
mvn dependency:tree -Dscan=false
I'll see about getting that copied into the section of the docs you mentioned originally 😄
t
Yes,
mvn dependency:tree -Dscan=false
would be ideal. However, it’s another internal team and I’d like to control their destiny. Asking them to make a change is likely going to result in a future change where it is lost. That’s why I wanted to do it this way.
we were always publishing but when we started seeing 10k scans published per day it seemed a bit much…
b
Do your CI jobs all run
dependency:tree
in addition other executions of Maven?
t
my team (primary users of GE) never run
dependency:tree
from our CI machines
👍 1