// be declared BEFORE so that container access rules don't fail
// ----------------------------------------------------------------------
IdeDependency[] depsToWrite = config.getDepsOrdered();
for ( int j = 0; j < depsToWrite.length; j++ )
{
IdeDependency dep = depsToWrite[j];
if ( dep.isJavaApi() )
{
String depId = getDependencyId( dep );
if ( !addedDependencies.contains( depId ) )
{
addDependency( writer, dep );
addedDependencies.add( depId );
}
}
}
// ----------------------------------------------------------------------
// The dependencies
// ----------------------------------------------------------------------
for ( int j = 0; j < depsToWrite.length; j++ )
{
IdeDependency dep = depsToWrite[j];
if ( dep.isAddedToClasspath() )
{
String depId = getDependencyId( dep );
/* avoid duplicates in the classpath for artifacts with different types (like ejbs or test-jars) */
if ( !addedDependencies.contains( depId ) )
{