That creates a second jar with the same coordinates but a 'test' classifier
that you can add as a test scoped dependency on myproject-application.
That's the approach I use here, too.
Bear in mind that this test scoped jar does not have any dependencies.
So, if your test code uses e.g. commons-lang then just including the
test scoped dependency in another project is not enough - you'll have to
include commson-lang there, too.