// build a list of UNIQUE source dirs (both src and resources) to be
// used in classpath and wtpmodules
EclipseSourceDir[] sourceDirs = buildDirectoryList( executedProject, eclipseProjectDir, buildOutputDirectory );
EclipseWriterConfig config = new EclipseWriterConfig();
config.setWorkspaceConfiguration( getWorkspaceConfiguration() );
config.setProjectNameTemplate( getProjectNameTemplate() );
String projectName = IdeUtils.getProjectName( config.getProjectNameTemplate(), project );
config.setEclipseProjectName( projectName );
config.setWtpapplicationxml( wtpapplicationxml );
config.setWtpVersion( wtpVersionFloat );
float ajdtVersionFloat;
try
{
ajdtVersionFloat = Float.parseFloat( ajdtVersion );
}
catch ( NumberFormatException e )
{
ajdtVersionFloat = 0.0f;
}
config.setAjdtVersion( ajdtVersionFloat );
Set convertedBuildCommands = new LinkedHashSet();
if ( buildcommands != null )
{
for ( Iterator it = buildcommands.iterator(); it.hasNext(); )
{
Object cmd = it.next();
if ( cmd instanceof BuildCommand )
{
convertedBuildCommands.add( cmd );
}
else
{
convertedBuildCommands.add( new BuildCommand( (String) cmd ) );
}
}
}
if ( ajdt )
{
buildAjdtWeaveDeps( deps );
buildAspectjDeps( deps );
}
config.setBuildCommands( new LinkedList( convertedBuildCommands ) );
config.setBuildOutputDirectory( buildOutputDirectory );
config.setClasspathContainers( classpathContainers );
config.setDeps( deps );
config.setEclipseProjectDirectory( eclipseProjectDir );
config.setLocalRepository( localRepository );
config.setOSGIManifestFile( manifest );
config.setPde( pde );
config.setProject( project );
config.setProjectBaseDir( projectBaseDir );
config.setProjectnatures( projectnatures );
config.setProjectFacets( additionalProjectFacets );
config.setSourceDirs( sourceDirs );
config.setPackaging( packaging );
config.setLinkedResources( linkedResources );
config.setClasspathContainersLast( classpathContainersLast );
config.setJeeVersion( jeeversion );
collectWarContextRootsFromReactorEarConfiguration( config );
return config;
}