<tasks> replaced by <target>
thyanmol opened this issue · comments
In the newer version, the "tasks" tag in pom.xml has been replaced by "target". But replacing tasks by target directly is not working. Has anyone obfuscated their springboot project in Java 17 using yguard and maven ?
If you replace the <tasks>
element in examples/processing/pom.xml
with a <target>
element, you need to adjust the version of the maven-antrun-plugin
as well.
E.g. changing tasks
to target
and changing the maven-antrun-plugin
version from 1.8
to 3.1.0
works without problems for me.
Thanks for the reply. I tried that but I am getting this error :
Cannot invoke "com.yworks.yshrink.model.ClassDescriptor.getNode()" because "cd" is null
There is nothing on Google about this type of error to resolve it.
That error is not related to using maven-antrun-plugin
with <tasks>
or <target>
.
If you are shrinking your jar with yGuard's <shrink>
element, then remove <shrink>
from your yGuard configuration. <shrink>
only works for Java up to version 8.
If you are not shrinking your jar, please post your yGuard task configuration.
I didn't know that shrink element only works upto Java 8. Removing that solved the error. Thank you very much.