It seems to me that the phase in which you're generating the sources is too late. The verify
phase comes after the package
phase which means that your sources jar is getting generated, but it's well after the packaging of the assembly has occurred. Set the phase of the maven-sources-plugin
to package
and make sure the maven-assembly-plugin
is defined in the same phase but declared after it (as Maven invokes the plugins in consecutive order).
EDIT 1:
I figured it out. You haven't defined a dependency to the sources artifact. Add the following and it will work:
<dependency>
<groupId>my.group</groupId>
<artifactId>my-mvn-a</artifactId>
<version>1.0.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>