You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sebastiankirsch edited this page Feb 11, 2016
·
1 revision
deadcode4j provides the following goals:
deadcode4j-maven-plugin:find
Simply run mvn de.is24.mavenplugins:deadcode4j-maven-plugin:find -Dmaven.test.skip=true in the project you want to analyze.
deadcode4j will trigger the package phase to be executed for a project (and for all modules listed in a reactor project) before analyzing the output directories.
The output will look something like this:
The -Dmaven.test.skip=true part skips compiling & executing tests, as they are not relevant for the analysis. Likewise, you may add -Dinvoker.skip=true if you're using the invoker plugin.
If not configured otherwise, deadcode4j will request your permission to send some usage statistics. Use Maven's -B parameter to prevent user interaction.
Using Maven's -o parameter will skip sending usage statistics and checking for updates - even if configured otherwise.
As an alternative, you can run mvn de.is24.mavenplugins:deadcode4j-maven-plugin:find-only which performs the same analysis, but without triggering the package phase. This is intended for repeated analysis (e.g. after updating the configuration) or if your project is already packaged.