Mulitple artifacts with ivy-publishing, the artifact name is always the project name. What is wrong in my plugin?

I want add mulitple artifacts with ivy-publishing, but the name of the jar is not taken from the jar task. What is wrong?

I added new ArchivePublishArtifact(jarTask) with dependencies to an Usage class. The jar file is created with the correct name, but the field “name” of IvyArtifact is empty.