mirror of https://github.com/apache/maven.git
[MNG-3400] Implement clone properly following Effective Java' book considerations
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@627935 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
53e9189566
commit
0ca8675e19
|
@ -28,9 +28,17 @@ public class StartForkedExecutionMojo
|
||||||
getLog().info( "Starting forked execution [fork id: " + forkId + "]" );
|
getLog().info( "Starting forked execution [fork id: " + forkId + "]" );
|
||||||
|
|
||||||
if ( project != null )
|
if ( project != null )
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
session.addForkedProject( (MavenProject) project.clone() );
|
session.addForkedProject( (MavenProject) project.clone() );
|
||||||
}
|
}
|
||||||
|
catch ( CloneNotSupportedException e )
|
||||||
|
{
|
||||||
|
throw new IllegalStateException( "MavenProject instance of class " + project.getClass().getName() +
|
||||||
|
" does not support clone " );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue