ASSERT-KTH/depclean

[BUG] Parameter <createPomDebloated> is not working.

ABHAY0O7 opened this issue · 6 comments

Describe the bug
When I am trying to run either mvn se.kth.castor:depclean-maven-plugin:2.0.1:depclean -DcreatePomDebloated=true or mvn se.kth.castor:depclean-maven-plugin:2.0.1:depclean -DcreatePomDebloated=true -DcreateResultJson=true then either of these is not producing a debloated-pom.xml in the root of the project (The later one is only producing a .json and .csv file but not .xml file) .

See the results of mvn se.kth.castor:depclean-maven-plugin:2.0.1:depclean -DcreatePomDebloated=true here
and result of mvn se.kth.castor:depclean-maven-plugin:2.0.1:depclean -DcreatePomDebloated=true -DcreateResultJson=true here

Expected behavior
A debloated-pom.xml file should be created in the root of the project.

I am unable to get what I am doing wrong? But if the problem is from my side only, then please guide me through this.

Thank you
Abhay

Hi @ABHAY0O7, thanks for reporting this.
It is caused by a typo in the property that defines the parameter, here https://github.com/castor-software/depclean/blob/master/depclean-maven-plugin/src/main/java/se/kth/depclean/DepCleanMojo.java#L102.

I noticed that you actually solved this in your PR #85.
Can you check if the debloated-pom.xml is generated when using the (current) version 2.0.2-SNAPSHOT?

Hi @cesarsotovaler

It is caused by a typo in the property that defines the parameter, here https://github.com/castor-software/depclean/blob/master/depclean-maven-plugin/src/main/java/se/kth/depclean/DepCleanMojo.java#L102.

You are right, the whole problem is just because of the typo.

Can you check if the debloated-pom.xml is generated when using the (current) version 2.0.2-SNAPSHOT?

Currently, since my PR is not merged, that's why the debloated pom is generating with this parameter -DcreatPomDebloated=true not this -DcreatePomDebloated=true.
But, now I can continue my work and when I finished that then you can review that and merge accordingly.
Also, that PR will solve this issue too so if you are OK with this then I will close this issue when PR ( #85 ) got merged.

Thank you

Hi @ABHAY0O7, that's excellent. Please provide some unit tests as part of #85, then I'll merge it!

Hi @cesarsotovalero,
I noticed that the command mvn se.kth.castor:depclean-maven-plugin:2.0.1:depclean -DcreatePomDebloated=true still not producing any debloated pom.
But this command is mvn se.kth.castor:depclean-maven-plugin:2.0.1:depclean -DcreatPomDebloated=true producing a debloated pom.

Can you please confirm that this issue is solved or not?

Thank you.

Hi @ABHAY0O7,

The parameter -DcreatePomDebloated=true is not working on version 2.0.1 of DepClean. However, it works on version 2.0.2-SNAPSHOT (the current version on master), thanks to your merged PR (#85). Therefore, this issue is solved, and you can close it.

Hi @cesarsotovalero
I got it, I was using the wrong command.
Correct one is mvn se.kth.castor:depclean-maven-plugin:2.0.2-SNAPSHOT:depclean -DcreatePomDebloated=true.
All LGTM, so I am closing this issue now.

Thank you