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 Jun 26, 2014
·
4 revisions
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.
This goal can be adapted to your needs.
deadcode4j-maven-plugin:find-only
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.
This goal supports the same configuration as find.
deadcode4j-maven-plugin:help
Lists the available goals & parameters.
deadcode4j-maven-plugin:find-without-packaging
This goal is deprecated. It is replaced by de.is24.mavenplugins:deadcode4j-maven-plugin:find-only which has a shorter name.