MavenProject project = new MavenProject();
ArtifactHandler artifactHandler = (ArtifactHandler) lookup( ArtifactHandler.ROLE );
Artifact artifact = new DefaultArtifact( "org.apache.myfaces.core", "myfaces-impl",
VersionRange.createFromVersion( "2.0.1-SNAPSHOT" ), "compile", "jar",
null, artifactHandler );
mockArtifactResolver.resolve( artifact, null, null ); // setFile and setResolved
project.setArtifact( artifact );
Field projectField = ShadeMojo.class.getDeclaredField( "project" );
projectField.setAccessible( true );
projectField.set( mojo, project );