Package com.instantiations.pde.build.util

Examples of com.instantiations.pde.build.util.BuildProperties


  private static ProductDownloader productCache = null;
 
  private static BuildProperties getBuildProp() throws IOException {
    if (prop != null)
      return prop;
    prop = new BuildProperties();
    prop.read();
    if (!prop.get("build.root").endsWith("test"))
      fail("To prevent inadvertantly deleting important files, build.root must end with 'test'");
    return prop;
  }
View Full Code Here


 
  private static BuildProperties getBuildProp() throws IOException {
    if (prop != null)
      return prop;
    prop = new BuildProperties();
    prop.read();
    if (!prop.get("build.root").endsWith("test"))
      fail("To prevent inadvertantly deleting important files, build.root must end with 'test'");
    return prop;
  }
View Full Code Here

{
  private BuildProperties prop;

  @Test
  public void testReadAllZips() throws Exception {
    prop = new BuildProperties();
    prop.read();
    File subproductsDir = new File(prop.get("actual.build.subproducts"));
    if (!subproductsDir.exists())
      fail("actual.build.subproducts property does not point to a valid directory:\n   "
        + subproductsDir.getCanonicalPath());
View Full Code Here

public class SiteXmlPreprocessorTest extends LineBasedPreprocessorTest
{
  @Test
  public void testProcessFile() throws Exception {
    BuildProperties prop = new BuildProperties();
    prop.set("preprocessor.ignore.variables", "none");
    SiteXmlPreprocessor processor = new SiteXmlPreprocessor(Version.V_3_4, prop);
    processor.setVersion("com.qualityeclipse.book", "x.y.z.aaa");
    processFiles(processor, new File("testdata/preprocessor/site"));
  }
View Full Code Here

    processFiles(processor, new File("testdata/preprocessor/site"));
  }

  @Test
  public void testProcessFile2() throws Exception {
    BuildProperties prop = new BuildProperties();
    prop.set("preprocessor.ignore.variables", "none");
    SiteXmlPreprocessor processor = new SiteXmlPreprocessor(Version.V_3_4, prop);
    processor.setVersion("com.qualityeclipse.book", "1.2.3.456");
    processor.setVersion("com.qualityeclipse.book2", "3.8.0.200809110900");
    processFiles(processor, new File("testdata/preprocessor/site2"));
  }
View Full Code Here

  private final PropertiesFilePreprocessor processor;

  public PropertiesFilePreprocessorFixture(String oemName, Version targetVersion) {
    this.oemName = oemName;
    this.targetVersion = targetVersion;
    BuildProperties prop = null;
    try {
      prop = new BuildProperties();
    }
    catch (IOException e) {
      e.printStackTrace();
    }
    prop.set("preprocessor.ignore.variables", "none");
    this.processor = new PropertiesFilePreprocessor(new OemVersion(oemName, targetVersion), prop);
  }
View Full Code Here

public class FeatureXmlPreprocessorTest extends LineBasedPreprocessorTest
{
  @Test
  public void testProcessFile() throws Exception {
    BuildProperties prop = new BuildProperties();
    prop.set("build.year", "2009");
    prop.set("preprocessor.ignore.variables", "none");
    processFiles(new FeatureXmlPreprocessor(Version.V_3_4, "x.y.z.aaa", prop), new File(
      "testdata/preprocessor/feature"), Version.V_3_4);
    processFiles(new FeatureXmlPreprocessor(Version.V_3_1, "x.y.z.aaa", prop), new File(
      "testdata/preprocessor/feature"), Version.V_3_1);
  }
View Full Code Here

public class ProductFilePreprocessorTest extends LineBasedPreprocessorTest
{
  @Test
  public void testProcessFile() throws Exception {
    BuildProperties prop = new BuildProperties();
    prop.set("preprocessor.ignore.variables", "none");
    processFiles(new ProductFilePreprocessor(new Version("3.4"), "x.y.z.aaa", prop), new File("testdata/preprocessor/product"));
  }
View Full Code Here

  }

  private void testPluginProjectPreprocessor(File originalDir, TreeSet<String> names, String oemName, List<String> versionStrings)
    throws IOException, PreprocessorError
  {
    BuildProperties prop = new BuildProperties();
    prop.set("key.1", "this is value #1");
    prop.set("key.2", "another value");
    prop.set("very.log.key", "v3");
    prop.set("preprocessor.ignore.variables", "none");
    TreeSet<Version> versions = new TreeSet<Version>();
    for (String string : versionStrings)
      versions.add(new Version(string));

    for (String projName : names) {
View Full Code Here

   * Create an instance of the class <code>{@link BuildProperties}</code>.
   *
   * @generatedBy CodePro at 12/9/08 2:37 PM
   */
  public static BuildProperties createBuildProperties() throws IOException {
    BuildProperties prop = new BuildProperties();
    String filename = BuildPropertiesFactory.class.getName().replace('.', '/') + "-test.properties"
      // "com/instantiations/build/BuildProptiesFactory-test.properties";
    InputStream stream = BuildProperties.class.getClassLoader().getResourceAsStream(filename);
    if (stream == null)
      throw new FileNotFoundException("Failed to find " + filename);
    prop.readStream(stream);
    return prop;
  }
View Full Code Here

TOP

Related Classes of com.instantiations.pde.build.util.BuildProperties

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.