@@ -0,0 +1,2478 @@
+/*******************************************************************************%0A * Copyright (c) 2001, 2004 IBM Corporation and others.%0A * All rights reserved. This program and the accompanying materials%0A * are made available under the terms of the Eclipse Public License v1.0%0A * which accompanies this distribution, and is available at%0A * http://www.eclipse.org/legal/epl-v10.html%0A * %0A * Contributors:%0A *     IBM Corporation - initial API and implementation%0A *******************************************************************************/%0A%0Apackage org.eclipse.birt.build;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.FileOutputStream;%0Aimport java.io.FileReader;%0Aimport java.io.BufferedReader;%0A%0A%0Aimport org.apache.tools.ant.BuildException;%0A%0A%0A/**%0A * %0A * @author Farrah%0A * %0A * Generate error/failure summary according into unitTestReport.properties%0A * Properties format  pluginId.failure/error=%3Ccount%3E%0A * eg:%0A * org.eclipse.birt.tests.data.engine.AllTests.failure=1%0A * org.eclipse.birt.tests.data.engine.AllTests.error=0%0A */%0Apublic class ManifestTemplateGenerator%7B%0A%09%0A%0A%09public ManifestTemplateGenerator()%7B%0A%09%09%0A%09%7D%0A%0A%0A%09public static void main (String%5B%5D args)%7B%0A%09%09%09%09%0A%09%09File manifestHead = new File( args%5B0%5D);%0A%09%09File manifestBody = new File( args%5B1%5D);%0A%09%09File mainfestRslt = new File( args%5B2%5D);%0A%09%09%0A%09%09/* Read MANIFEST template header*/%0A%09%09try%7B%0A%09%09%09FileInputStream f = new FileInputStream(manifestHead);%0A%09%09%09int len = f.available();%0A%09%09%09byte %5B%5D b = new byte%5Blen+1%5D;%0A%09%09%09int j = f.read(b, 0, len);%0A%09%09%09f.close();%0A%09%09%09%0A%09%09%09String ff = new String(b,0,len);%0A%09%09%09/*System.out.println(ff);*/%0A%09%09%09%0A%09%09%09StringBuffer strb = new StringBuffer(ff);%0A%09%09%09System.out.println(strb.toString());%0A%09%09%09/* Read MANIFEST body and create new manifest.mf */%0A%09%09%09FileReader freader=new FileReader(manifestBody);%0A%09%09%09BufferedReader breader=new BufferedReader(freader);%0A%09%09%09%0A%09%09%09String myString;%0A%09%09%09while((myString=breader.readLine())!=null)%0A%09%09%09%7B%0A%09%09%09%09if(myString.startsWith(%22#%22)) continue;%0A%09%09%09%09if(myString.startsWith(%22 .%22)) continue;%0A%09%09%09%09%0A%09%09%09    strb.append(myString);%0A%09%09%09    strb.append(%22%5Cn%22); %0A%09%09%09%7D %0A%09%09%09int lastDelimer = strb.lastIndexOf(%22;%22);%0A%09%09%09String result = strb.substring(0, lastDelimer);%0A%09%09%09result.concat(%22%5Cn%22);%0A%09%09%09%0A%09%09%09FileOutputStream Result = new FileOutputStream (mainfestRslt);%0A%09%09%09byte %5B%5D writeByte = new byte%5Bstrb.length()+1%5D;%0A%09%09%09writeByte = strb.toString().getBytes();%0A%09%09%09Result.write(writeByte);%0A%09%09%09%0A%09%09%7Dcatch(Exception e)%7B%0A%09%09%09throw new BuildException(%22ManifestHead not found!%22);%0A%09%09%7D%0A%09%0A%0A%09%7D%0A%0A%0A%7D%0A

add utility ManifestTemplateGenerator for auto fragment org.eclipse.birt.api in 2.1.3 build.