Here you can find the source of loadBuildProperties(File projectRootDir)
public static Properties loadBuildProperties(File projectRootDir)
//package com.java2s; /******************************************************************************* * Copyright (c) 2008, 2011 Sonatype Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/* ww w .j av a2 s . c om*/ * Sonatype Inc. - initial API and implementation *******************************************************************************/ import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.util.Properties; public class Main { public static Properties loadBuildProperties(File projectRootDir) { File file = new File(projectRootDir, "build.properties"); Properties buildProperties = new Properties(); if (file.canRead()) { InputStream is = null; try { try { is = new FileInputStream(file); buildProperties.load(is); } finally { if (is != null) is.close(); } } catch (Exception e) { // ignore } } return buildProperties; } }