private static final String BUNDLE_2 = "org.apache.ivy.test2";
public void testWriteWithSource() throws Exception {
List<BundleInfo> bundles = new ArrayList<BundleInfo>();
BundleInfo bundle = new BundleInfo(BUNDLE_1, BUNDLE_VERSION);
bundle.addArtifact(new BundleArtifact(false, new URI("file:///test.jar"), null));
bundle.addArtifact(new BundleArtifact(true, new URI("file:///test-sources.jar"), null));
bundles.add(bundle);
bundle = new BundleInfo(BUNDLE_2, BUNDLE_VERSION);
bundle.addArtifact(new BundleArtifact(false, new URI("file:///test2.jar"), null));
bundles.add(bundle);
new File("build/test-files").mkdirs();
File obrFile = new File("build/test-files/obr-sources.xml");
FileOutputStream out = new FileOutputStream(obrFile);