ASSERT-KTH/depclean

[FEATURE] Ability to check ONLY test dependencies

Mackzwellz opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
I haven't found a way to use this for a project that contains only test sources (since all sources are in src/test, all classes are put into \target\test-classes). (My use case is a test automation framework used in a multi-module environment).
Right now, I get the error <project_dir>\target\classes does not exist after [INFO] Starting DepClean dependency analysis.

Describe the solution you'd like
A feature flag/parameter similar to <ignoreTests> (e.g. <ignoreSources> or <checkTestsOnly>) that will either skip all checks for target\classes, but will check other source folders, OR will check only target\test-classes.

Describe alternatives you've considered
Configuring Maven build section like described here using <src.dir>src/test/java</src.dir> can be used as workaround.

Hi @Mackzwellz,

Thanks for submitting this issue.
DepClean has received some major improvements recently.
Please run the latest version of DepClean on your project?

In the command line run:

git clone https://github.com/castor-software/depclean.git
cd depclean
mvn clean install

Then run

cd PATH_TO_MAVEN_PROJECT
mvn compile   
mvn compiler:testCompile
mvn se.kth.castor:depclean-maven-plugin:2.0.3-SNAPSHOT:depclean

Does the issue persist?

Ran latest depclean (2.0.3) as you suggested, the issue no longer persists, thank you!