Define a new Maven plugin with the goal described like this:
- @execute phase="deploy"
- @goal deploy-custom
When running 'mvn deploy-custom', deploy phase execution fails with 'Class 'org.apache.maven.artifact.repository.ArtifactRepository' cannot be instantiated'.
It seems the problem raises from the fact that releaseArtifactRepository/snapshotArtifactRepository don't get copied in the cloned executionProject while lifecycle fork.