CPD Results
The following document contains the results of PMD's CPD
4.1.
Duplications
| File |
Line |
| org/codehaus/mojo/jpox/AbstractJpoxSchemaMojo.java |
189
|
| org/codehaus/mojo/jpox/JpoxEnhancerMojo.java |
72
|
Commandline cl = new Commandline();
cl.setExecutable( "java" );
StringBuffer cpBuffer = new StringBuffer();
for ( Iterator it = getUniqueClasspathElements().iterator(); it.hasNext(); )
{
cpBuffer.append( (String) it.next() );
if ( it.hasNext() )
{
cpBuffer.append( File.pathSeparator );
}
}
for ( Iterator it = pluginArtifacts.iterator(); it.hasNext(); )
{
Artifact artifact = (Artifact) it.next();
try
{
cpBuffer.append( File.pathSeparator ).append( artifact.getFile().getCanonicalPath() );
}
catch ( IOException e )
{
throw new MojoExecutionException( "Error while creating the canonical path for '" + artifact.getFile()
+ "'.", e );
}
}
cl.createArgument().setValue( "-cp" );
cl.createArgument().setValue( cpBuffer.toString() );
|
| File |
Line |
| org/codehaus/mojo/jpox/AbstractJpoxSchemaMojo.java |
235
|
| org/codehaus/mojo/jpox/JpoxEnhancerMojo.java |
109
|
cl.createArgument().setValue( TOOL_NAME_JPOX_ENHANCER );
cl.createArgument().setValue( "-v" );
for ( Iterator it = files.iterator(); it.hasNext(); )
{
File file = (File) it.next();
cl.createArgument().setValue( file.getAbsolutePath() );
}
CommandLineUtils.StringStreamConsumer stdout = new CommandLineUtils.StringStreamConsumer();
CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();
getLog().debug( "Executing command line:" );
getLog().debug( cl.toString() );
int exitCode = CommandLineUtils.executeCommandLine( cl, stdout, stderr );
getLog().debug( "Exit code: " + exitCode );
getLog().debug( "--------------------" );
getLog().debug( " Standard output from the JPox enhancer tool:" );
|