Sat, 30 Mar 2024, /Debraj Manna/:
As suggested by Stanimir if I remove the test-jar type and also the
includes like below then mvn package --projects=:agent -T 2 --also-make
works
[...]
But if I add back the below inclusion it again starts throwing the
NoClassDefFoundError
[...]
At least for me, it is already hard to follow. Without accessible full
example setup I can only suggest you follow Gary's and the official
documentation advice to factor the necessary classes into their own
module, declaring their dependencies explicitly:
*
https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html#the-preferred-way
*The preferred way*
In order to let Maven resolve all |test|-scoped transitive dependencies
you should create a separate project.
* Move the sources files from |src/test/java| you want to share from the
original project to the |src/main/java| of this project...
--
Stanimir
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org