Scan of local .m2 folder
See original GitHub issueI use OWASP Dependency Checker to scan code in pipelines. I do it after building of it.
I found that some project use local maven repository e.g.:
/jenkins/workspace/MyProject/.m2/
Should I scan this folder or better to exclude it? I think the second option is better cause .m2 could contains plugins, test libraries etc
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Where is Maven local repository? - Mkyong.com
By default, Maven local repository is defaulted to ${user.home}/.m2/repository folder : ... localRepository [INFO] Scanning for projects.
Read more >How to get the Maven local repo location? - Stack Overflow
Usually it's in: C:\Users\USER_NAME\.m2\repository . However the mvn help:effective-settings command will surely show the local path in response xml.
Read more >Solved: Bamboo Java specs - local .m2 repository
Solved: Hey, I'm trying to create some shared libraries for Bamboo Specs, I install this package in the bamboo server using mvn install...
Read more >Handling .m2 repositories - Fortify User Discussions
I am running my scan various ways: Jenkins using the maven plugin; Local machine using maven plugin at top level pom file and...
Read more >Force IntelliJ to read local maven repository when it loses ...
IntelliJ frequently "forgets" or fails to detect new/updated artifacts in my local Maven repository. Is there a way to force it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The .m2 folder should be skipped in this scenario.
In cases of supporting a ton of different projects - have you considered something like:
Of course the above is psuedo-code and would need the correct publish mechanism added. For gradle see the documentation on init-scripts - I haven’t done this myself yet, but basically you could more correctly cover gradle and maven builds out of the box with just a little scripting to detect the build system used.