This sample show us how to read properties from a MANIFEST.MF file using the ManifestPropertyFinder.
Este ejemplo nos muestra cómo leer propiedades desde un archivo MANIFEST.MF utilizando el ManifestPropertyFinder.
Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.2 Created-By: SCF Builder Created-On: 2012-08-13 [19:47:27] Commons-Version: 1.0
package ar.com.scf.sample05; import java.io.File; import ar.com.scf.IPropertyFinder; import ar.com.scf.impl.ManifestPropertyFinder; import ar.com.scf.impl.PropertyReplacer; public class Sample { public static void main(String[] args) { IPropertyFinder finder = new ManifestPropertyFinder(new File("MANIFEST.MF")); PropertyReplacer replacer = new PropertyReplacer(finder); System.out.println(replacer.expand("Builder: ${Ant-Version}")); } }
Builder: Apache Ant 1.8.2