System.out.println("OBR:"); System.out.println(buf.toString());
    private void generateOBR(File file) throws IOException {    	StringBuffer buf = new StringBuffer();    	String description = null;    	String sourceUrl;    	String docUrl;    	    	String md5 = MD5.getHashString(file);    	Vector dependencies = new Vector();		    	if (thirdparty) {    		// defaults for thirdparty    		description = new String("thirdparty-jar " + bname);    		sourceUrl = new String("unknown");    		docUrl = new String("unknown");    		    	} else {    		    		    		BufferedReader breader = new BufferedReader(new FileReader(new File("project.xml")));    		    		String line = breader.readLine();    		    		// parse project.xml    		while (line != null) {    			if (line.indexOf("shortDescription") > -1) {    				    				    				description = XMLHelpers.getTagContent(breader, line, "shortDescription");    			}    			    			if (line.indexOf("dependency") > -1) {    				String dependency = XMLHelpers.getTagContent(breader, line, "dependency");    				  				    				dependencies.add(XMLHelpers.getTagContent(dependency, "groupId"));    				dependencies.add(XMLHelpers.getTagContent(dependency, "artifactId"));    				    				String version = XMLHelpers.getTagContent(dependency, "version");    				if (version.equals("${pom.currentVersion}")) {    					version = bversion;     				}    				    				dependencies.add(version);    				    				    			}    			    			line = breader.readLine();    		}    		    		    		sourceUrl = new String("unknown");    		docUrl = new String("unknown");    		    	}    	// set up OBR file     	buf.append("<bundle>\n");    	buf.append(XMLHelpers.emitTag("bundle-name", bname, 1));    	buf.append(XMLHelpers.emitTag("bundle-group", bgroup, 1));    	buf.append(XMLHelpers.emitMultilineTag("bundle-description", description, 1));    	buf.append(XMLHelpers.emitTag("bundle-version", bversion, 1));    	  	    	    	    	buf.append(XMLHelpers.emitTag("update-location", "localhost://" + repolocal, 1));    	buf.append(XMLHelpers.emitMultilineTag("bundle-sourceurl", sourceUrl, 1));    	buf.append(XMLHelpers.emitMultilineTag("bundle-docurl", docUrl, 1));    	buf.append(XMLHelpers.emitTag("bundle-category", "General", 1));    	buf.append(XMLHelpers.emitTag("bundle-checksum", md5, 1));    	    	    	for (Iterator iter = importSet.iterator(); iter.hasNext(); ) {    		buf.append("\t<import-package package=\"" + iter.next() + "\"/>\n" );    	}    	for (Iterator iter = exportSet.iterator(); iter.hasNext(); ) {    		buf.append("\t<export-package package=\"" + iter.next() + "\"/>\n" );    	}    	if (!dependencies.isEmpty()) {    		buf.append("\t<dependencies>\n");    		for (Enumeration en = dependencies.elements(); en.hasMoreElements(); ) {    			buf.append("\t\t<bundle>\n");    			buf.append(XMLHelpers.emitTag("bundle-name", (String)en.nextElement(), 3));				buf.append(XMLHelpers.emitTag("bundle-group", (String)en.nextElement(), 3));				buf.append(XMLHelpers.emitTag("bundle-version", (String)en.nextElement(), 3));    			buf.append("\t\t</bundle>\n");    		}    		    		    		buf.append("\t</dependencies>\n");    	}    	buf.append("</bundle>");    	    	// Debug output:    	// System.out.println("OBR:");    	// System.out.println(buf.toString());    	    	File obrfile = new File(bundledir + File.separatorChar + bname + "-"                + bversion + ".obr");    	BufferedWriter bwriter = new BufferedWriter(new FileWriter(obrfile));    	bwriter.write(buf.toString());    	bwriter.flush();    	   	    	    }