+ def lib = new Library(fileReference(itPath))
+ // check for source jar
+ def sourcePath = file("${j11sourcesDir}/"+it.name.replaceAll(".jar\$","-sources.jar"))
+ if (sourcePath.exists()) {
+ def refFactory = eclipse.classpath.getFileReferenceFactory();
+ def sourceRef = refFactory.fromFile(sourcePath)
+ lib.setSourcePath(sourceRef)
+ }
+ cp.entries += lib