Java Code Examples for java.util.Properties.put()

The following are Jave code examples for showing how to use put() of the java.util.Properties class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: incubator-netbeans   File: DBTestBase.java   Source Code and License Vote up 9 votes
protected final void shutdownDerby() throws Exception {
    assertTrue(isDerby());

    String url = dbUrl + ";shutdown=true";
    url = url.replace(";create=true", "");

    Properties p = new Properties();
    p.put("username", username);
    p.put("password", password);

    // This forces the shutdown
    try {
        getJDBCDriver().getDriver().connect(url, p);
    } catch (SQLException ex) {
        // Exception is expected
    }
}
 
Example 2
Project: enhanced-vnc-thumbnail-viewer   File: XMLElement.java   Source Code and License Vote up 7 votes
/**
 * Returns all attributes in a specific namespace as a Properties object.
 *
 * @param namespace the namespace URI of the attributes, which may be null.
 *
 * @return the non-null set.
 */
public Properties getAttributesInNamespace(String namespace) {
    Properties result = new Properties();
    Enumeration enum2 = this.attributes.elements();
    while (enum2.hasMoreElements()) {
        XMLAttribute attr = (XMLAttribute) enum2.nextElement();
        if (namespace == null) {
            if (attr.getNamespace() == null) {
                result.put(attr.getName(), attr.getValue());
            }
        } else {
            if (namespace.equals(attr.getNamespace())) {
                result.put(attr.getName(), attr.getValue());
            }
        }
    }
    return result;
}
 
Example 3
Project: OpenVertretung   File: MetadataTest.java   Source Code and License Vote up 7 votes
/**
 * Tests the implementation of Information Schema for description
 * of stored procedures available in a catalog.
 */
public void testGetProceduresUsingInfoSchema() throws Exception {
    if (versionMeetsMinimum(5, 0, 7)) {
        createProcedure("sp1", "()\n BEGIN\nSELECT 1;end\n");
        Properties props = new Properties();
        props.put("useInformationSchema", "true");
        Connection conn1 = null;
        try {
            conn1 = getConnectionWithProps(props);
            DatabaseMetaData metaData = conn1.getMetaData();
            this.rs = metaData.getProcedures(null, null, "sp1");
            this.rs.next();
            assertEquals("sp1", this.rs.getString("PROCEDURE_NAME"));
            assertEquals("1", this.rs.getString("PROCEDURE_TYPE"));
        } finally {
            if (conn1 != null) {
                conn1.close();
            }
        }
    }
}
 
Example 4
Project: apache-kafka-demos   File: PerformanceProducer.java   Source Code and License Vote up 7 votes
public static void main(String[] args) throws InterruptedException {

        Properties props = new Properties();
        props.put(BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
        props.put(ACKS_CONFIG, "all");
        props.put(RETRIES_CONFIG, 0);
        props.put(BATCH_SIZE_CONFIG, 32000);
        props.put(LINGER_MS_CONFIG, 100);
        props.put(BUFFER_MEMORY_CONFIG, 33554432);
        props.put(KEY_SERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.LongSerializer");
        props.put(VALUE_SERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.LongSerializer");

        Producer<Long, Long> producer = new KafkaProducer<>(props);

        long t1 = System.currentTimeMillis();

        long i = 0;
        for(; i < 1000000; i++) {

            producer.send(new ProducerRecord<>("produktion", i, i));
        }
        producer.send(new ProducerRecord<Long,Long>("produktion", (long) -1, (long)-1));
        System.out.println("fertig " + i  + " Nachrichten in " + (System.currentTimeMillis() - t1 + " ms"));

        producer.close();
    }
 
Example 5
Project: apache-kafka-demos   File: OffsetConsumer.java   Source Code and License Vote up 5 votes
public static void main(String[] args) throws InterruptedException {

        Properties props = new Properties();
        props.put(BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
        props.put(GROUP_ID_CONFIG, "a");
        props.put(ENABLE_AUTO_COMMIT_CONFIG, "true");
        props.put(AUTO_COMMIT_INTERVAL_MS_CONFIG, "1000");
        props.put(SESSION_TIMEOUT_MS_CONFIG, "30000");
        props.put(KEY_DESERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.StringDeserializer");
        props.put(VALUE_DESERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.StringDeserializer");

        KafkaConsumer<String, String> consumer = new KafkaConsumer<>(props);

        consumer.subscribe(Arrays.asList("produktion"), new OffsetBeginningRebalanceListener(consumer, "produktion"));

        while(true) {

            ConsumerRecords<String, String> records = consumer.poll(1000);
            if (records.count() == 0)
                continue;

            System.out.println(" Count: " + records.count());

            for (ConsumerRecord<String, String> record : records)
                System.out.printf("offset= %d, key= %s, value= %s\n", record.offset(), record.key(), record.value());

        }
    }
 
Example 6
Project: oscm   File: UserManagementServiceBeanIT.java   Source Code and License Vote up 5 votes
@Test
public void mergeSettings_OnlyPlatformProps() throws Exception {
    Properties platformSettings = new Properties();
    platformSettings.put("setting2", "value2");
    Set<POLdapSetting> result = umsBean.mergeSettings(props,
            new Properties());
    assertTrue(result.isEmpty());
}
 
Example 7
Project: marathonv5   File: MarathonSplashScreen.java   Source Code and License Vote up 5 votes
@Override public void start(Stage primaryStage) throws Exception {
    Properties licensee = new Properties();
    licensee.put("Organization", "Jalian Systems Pvt. Ltd");
    licensee.put("License Type", "Trial");
    licensee.put("Expires", "18/10/2018");

    VersionInfo versionInfo = new VersionInfo("4.1.2.0", "Marathon GUI Testing Tool (Java/Swing) (Opensource version)",
            "� Jalian Systems Private Ltd. and Other contributors",
            "Visit our website: http://www.marathontesting.com for details",
            "Marathon uses other OSS projects. See Credits for more information.");
    MarathonSplashScreen screen = new MarathonSplashScreen(versionInfo);
    screen.show(null);
}
 
Example 8
Project: ats-framework   File: EnvironmentCleanupClient.java   Source Code and License Vote up 5 votes
/**
 * Set database connection properties for the specified database listed in the configuration file (descriptor xml)
 *
 * @param databaseIndex - the number(index) of database element in the configuration file (descriptor xml)
 * @param dbHost database host
 * @param dbName database name
 * @param dbPort database port
 * @param userName user name
 * @param userPassword user password
 * @throws AgentException
 */
@PublicAtsApi
public void setDatabaseConnection( int databaseIndex, String dbHost, String dbName, int dbPort,
                                   String userName, String userPassword ) throws AgentException {

    Properties dbProperties = new Properties();
    dbProperties.put(EnvironmentConfigurator.DB_CONFIGURATION_INDEX, databaseIndex);
    if (!StringUtils.isNullOrEmpty(dbHost)) {
        dbProperties.put(EnvironmentConfigurator.DB_HOST, dbHost);
    }
    if (dbPort > 0) {
        dbProperties.put(EnvironmentConfigurator.DB_PORT, dbPort);
    }
    if (!StringUtils.isNullOrEmpty(dbName)) {
        dbProperties.put(EnvironmentConfigurator.DB_NAME, dbName);
    }
    if (!StringUtils.isNullOrEmpty(userName)) {
        dbProperties.put(EnvironmentConfigurator.DB_USER_NAME, userName);
    }
    if (!StringUtils.isNullOrEmpty(userPassword)) {
        dbProperties.put(EnvironmentConfigurator.DB_USER_PASSWORD, userPassword);
    }

    List<Properties> dbPropertiesList = new ArrayList<Properties>();
    dbPropertiesList.add(dbProperties);

    EnvironmentConfigurator envronmentConfigurator = new EnvironmentConfigurator(component,
                                                                                 dbPropertiesList);
    pushConfiguration(envronmentConfigurator);
}
 
Example 9
Project: spring-rest-sample   File: JpaConfig.java   Source Code and License Vote up 5 votes
private Properties jpaProperties() {
    Properties extraProperties = new Properties();
    extraProperties.put(ENV_HIBERNATE_FORMAT_SQL, env.getProperty(ENV_HIBERNATE_FORMAT_SQL));
    extraProperties.put(ENV_HIBERNATE_SHOW_SQL, env.getProperty(ENV_HIBERNATE_SHOW_SQL));
    extraProperties.put(ENV_HIBERNATE_HBM2DDL_AUTO, env.getProperty(ENV_HIBERNATE_HBM2DDL_AUTO));
    if (log.isDebugEnabled()) {
        log.debug(" hibernate.dialect @" + env.getProperty(ENV_HIBERNATE_DIALECT));
    }
    if (env.getProperty(ENV_HIBERNATE_DIALECT) != null) {
        extraProperties.put(ENV_HIBERNATE_DIALECT, env.getProperty(ENV_HIBERNATE_DIALECT));
    }
    return extraProperties;
}
 
Example 10
Project: monarch   File: LocatorDUnitTest.java   Source Code and License Vote up 5 votes
@Test
public void testStartTwoLocatorsWithMultiKeystoreSSL() throws Exception {
  disconnectAllFromDS();
  Host host = Host.getHost(0);
  VM loc1 = host.getVM(1);
  VM loc2 = host.getVM(2);

  int ports[] = AvailablePortHelper.getRandomAvailableTCPPorts(2);
  final int port1 = ports[0];
  this.port1 = port1;
  final int port2 = ports[1];
  this.port2 = port2; // for cleanup in tearDown2
  DistributedTestUtils.deleteLocatorStateFile(port1);
  DistributedTestUtils.deleteLocatorStateFile(port2);
  final String host0 = NetworkUtils.getServerHostName(host);
  final String locators = host0 + "[" + port1 + "]," + host0 + "[" + port2 + "]";
  final Properties properties = new Properties();
  properties.put(MCAST_PORT, "0");
  properties.put(LOCATORS, locators);
  properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
  properties.put(DISABLE_AUTO_RECONNECT, "true");
  properties.put(MEMBER_TIMEOUT, "2000");
  properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
  properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
  properties.put(SSL_CIPHERS, "any");
  properties.put(SSL_PROTOCOLS, "any");
  properties.put(SSL_KEYSTORE, getMultiKeyKeystore());
  properties.put(SSL_KEYSTORE_PASSWORD, "password");
  properties.put(SSL_KEYSTORE_TYPE, "JKS");
  properties.put(SSL_TRUSTSTORE, getMultiKeyTruststore());
  properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
  properties.put(SSL_LOCATOR_ALIAS, "locatorkey");
  properties.put(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.LOCATOR.getConstant());

  startVerifyAndStopLocator(loc1, loc2, port1, port2, properties);
}
 
Example 11
Project: monarch   File: LocatorDUnitTest.java   Source Code and License Vote up 5 votes
protected void startLocator(int port) {
  File logFile = new File("");
  try {
    Properties locProps = new Properties();
    locProps.setProperty(MCAST_PORT, "0");
    locProps.setProperty(MEMBER_TIMEOUT, "1000");
    locProps.put(ENABLE_CLUSTER_CONFIGURATION, "false");

    addDSProps(locProps);
    Locator.startLocatorAndDS(port, logFile, locProps);
  } catch (IOException ex) {
    org.apache.geode.test.dunit.Assert.fail("While starting locator on port " + port, ex);
  }
}
 
Example 12
Project: monarch   File: RegionFactoryJUnitTest.java   Source Code and License Vote up 5 votes
/**
 * Test method for 'org.apache.geode.cache.RegionFactory.RegionFactory(Properties)'
 */
@Test
public void testRegionFactoryProperties() throws Exception {
  final Properties gemfireProperties = createGemFireProperties();
  gemfireProperties.put(MCAST_TTL, "64");
  RegionFactory factory = new RegionFactory(gemfireProperties);
  r1 = factory.create(this.r1Name);
  assertBasicRegionFunctionality(r1, r1Name);
  assertEquals(gemfireProperties.get(MCAST_TTL),
      r1.getCache().getDistributedSystem().getProperties().get(MCAST_TTL));
}
 
Example 13
Project: wherehowsX   File: ConfigUtilTest.java   Source Code and License Vote up 5 votes
private File createTemporaryPropertiesFile(long whEtlExecId, Properties etlJobProperties) {
  final File tempDir = Files.createTempDir();
  tempDir.deleteOnExit();
  final String tempDirPath = tempDir.getAbsolutePath();

  etlJobProperties.put(Constant.WH_APP_FOLDER_KEY, tempDirPath);

  return new File(tempDirPath + "/exec", whEtlExecId + ".properties");
}
 
Example 14
Project: bootstrap   File: SequenceIdentifierGeneratorStrategyProvider.java   Source Code and License Vote up 5 votes
@Override
protected QualifiedName determineSequenceName(final Properties params, final Dialect dialect, final JdbcEnvironment jdbcEnv) {
	// Make sure sequence are lower case and corresponds to table name
	params.put(SEQUENCE_PARAM, StringHelper.unquote(params.getProperty("identity_tables"))
			+ ConfigurationHelper.getString(CONFIG_SEQUENCE_PER_ENTITY_SUFFIX, params, DEF_SEQUENCE_SUFFIX));
	return super.determineSequenceName(params, dialect, jdbcEnv);
}
 
Example 15
Project: Hydrograph   File: InputFileMixedSchemeEntityGenerator.java   Source Code and License Vote up 5 votes
private Properties getRunTimeProperties(List<Property> list) {
	Properties properties = new Properties();
	for (Property property : list) {
		properties.put(property.getName(), property.getValue());
	}
	return properties;
}
 
Example 16
Project: openjdk-jdk10   File: GetPropertyNames.java   Source Code and License Vote up 4 votes
public static void main(final String[] args) {
    // default result is null
    if (defaultProps.getPropertyNames() != null) {
        throw new RuntimeException("PropertyNames should be null");
    }
    // for null properties result is null
    final BufferedImage emptyProps = getBufferedImage(null);
    if (emptyProps.getPropertyNames() != null) {
        throw new RuntimeException("PropertyNames should be null");
    }
    // for empty properties result is null
    final BufferedImage nullProps = getBufferedImage(new Properties());
    if (nullProps.getPropertyNames() != null) {
        throw new RuntimeException("PropertyNames should be null");
    }
    // for non-string keys result is null
    final Properties properties = new Properties();
    properties.put(1, 1);
    properties.put(2, 2);
    properties.put(3, 3);
    final BufferedImage nonStringProps = getBufferedImage(properties);
    if (nonStringProps.getPropertyNames() != null) {
        throw new RuntimeException("PropertyNames should be null");
    }
    // for string keys result is not null
    properties.clear();
    properties.setProperty("1", "1");
    properties.setProperty("2", "2");
    validate(getBufferedImage(properties), 2);
    // for the mix of strings and objects result is not null
    properties.clear();
    properties.put(1, 1);
    properties.put(2, 2);
    properties.put(3, 3);
    properties.setProperty("key1", "value1");
    properties.setProperty("key2", "value2");
    final BufferedImage mixProps = getBufferedImage(properties);
    validate(mixProps, 2);
    if (!"value1".equals(mixProps.getProperty("key1"))
        || !"value2".equals(mixProps.getProperty("key2"))) {
        throw new RuntimeException("Wrong key-value pair");
    }
}
 
Example 17
Project: monarch   File: SSLConfigJUnitTest.java   Source Code and License Vote up 4 votes
@Test
public void testP2pSSLPropsOverriden_GatewayPropsOverridden() throws Exception {
  boolean sslenabled = true;
  String sslprotocols = "overrriden";
  String sslciphers = "overrriden";
  boolean requireAuth = true;

  boolean gatewayServerSslenabled = false;
  String gatewayServerSslprotocols = "SSLv7";
  String gatewayServerSslciphers = "RSA_WITH_GARBAGE";
  boolean gatewayServerSslRequireAuth = false;

  Properties gemFireProps = new Properties();
  gemFireProps.put(MCAST_PORT, "0");
  gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
  gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
  gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
  gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));

  gemFireProps.put(GATEWAY_SSL_ENABLED, String.valueOf(gatewayServerSslenabled));
  gemFireProps.put(GATEWAY_SSL_PROTOCOLS, gatewayServerSslprotocols);
  gemFireProps.put(GATEWAY_SSL_CIPHERS, gatewayServerSslciphers);
  gemFireProps.put(GATEWAY_SSL_REQUIRE_AUTHENTICATION,
      String.valueOf(gatewayServerSslRequireAuth));

  gemFireProps.putAll(getGfSecurityPropertiesForGateway(true));

  DistributionConfigImpl config = new DistributionConfigImpl(gemFireProps);
  isEqual(config.getClusterSSLEnabled(), sslenabled);
  isEqual(config.getClusterSSLProtocols(), sslprotocols);
  isEqual(config.getClusterSSLCiphers(), sslciphers);
  isEqual(config.getClusterSSLRequireAuthentication(), requireAuth);

  isEqual(config.getGatewaySSLEnabled(), gatewayServerSslenabled);
  isEqual(config.getGatewaySSLProtocols(), gatewayServerSslprotocols);
  isEqual(config.getGatewaySSLCiphers(), gatewayServerSslciphers);
  isEqual(config.getGatewaySSLRequireAuthentication(), gatewayServerSslRequireAuth);

  System.out.println(config.toLoggerString());

  isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
  isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE),
      config.getClusterSSLKeyStoreType());
  isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD),
      config.getClusterSSLKeyStorePassword());
  isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
  isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD),
      config.getClusterSSLTrustStorePassword());

  isEqual(GATEWAY_PROPS_SUBSET_MAP.get(GATEWAY_SSL_KEYSTORE), config.getGatewaySSLKeyStore());
  isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE),
      config.getGatewaySSLKeyStoreType());
  isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD),
      config.getGatewaySSLKeyStorePassword());
  isEqual(GATEWAY_PROPS_SUBSET_MAP.get(GATEWAY_SSL_TRUSTSTORE), config.getGatewaySSLTrustStore());
  isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD),
      config.getGatewaySSLTrustStorePassword());
}
 
Example 18
Project: incubator-netbeans   File: DatabaseUtils.java   Source Code and License Vote up 4 votes
public static Connection connect(final String url, String user, String password, long timeToWait)
        throws DatabaseException, TimeoutException {
    final Driver theDriver = getDriver();

    final Properties props = new Properties();
    props.put("user", user);

    if (password != null) {
        props.put("password", password);
    }

    ExecutorService executor = Executors.newSingleThreadExecutor();
    Future<Connection> future = executor.submit(new Callable<Connection>() {
        public Connection call() throws Exception {
            props.put("connectTimeout", MySQLOptions.getDefault().getConnectTimeout());

            try {
                return theDriver.connect(url, props);
            } catch (SQLException sqle) {
                if (DatabaseUtils.isCommunicationsException(sqle)) {
                    // On a communications failure (e.g. the server's not running)
                    // the message horribly includes the entire stack trace of the
                    // exception chain.  We don't want to display this to our users,
                    // so let's provide our own message...
                    //
                    // If other MySQL exceptions exhibit this behavior we'll have to
                    // address this in a more general way...
                    String msg = Utils.getMessage("ERR_MySQLCommunicationFailure");

                    DatabaseException dbe = new DatabaseException(msg);
                    dbe.initCause(sqle);
                    throw dbe;
                } else {
                    throw new DatabaseException(sqle);
                }
            }
        }
    });

    try {
        return future.get(timeToWait, TimeUnit.MILLISECONDS);
    } catch (InterruptedException ie) {
        Thread.currentThread().interrupt();
        throw new DatabaseException(ie);
    } catch (ExecutionException e) {
        if (e.getCause() instanceof DatabaseException) {
            throw new DatabaseException(e.getCause());
        } else {
            throw Utils.launderThrowable(e.getCause());
        }
    } catch (TimeoutException te) {
        future.cancel(true);
        throw new TimeoutException(NbBundle.getMessage(DatabaseUtils.class, "MSG_ConnectTimedOut"));
    }
}
 
Example 19
Project: enmasse-iot-demo   File: KafkaTemperature.java   Source Code and License Vote up 4 votes
public static void main(String[] args) {

        String bootstrapServers = System.getenv("KAFKA_BOOTSTRAP_SERVERS");
        LOG.info("KAFKA_BOOTSTRAP_SERVERS = {}", bootstrapServers);

        Properties props = new Properties();
        props.put(StreamsConfig.APPLICATION_ID_CONFIG, APP_NAME);
        props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);
        props.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass());
        props.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.String().getClass());
        props.put(StreamsConfig.CACHE_MAX_BYTES_BUFFERING_CONFIG, 0);
        props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");

        KStreamBuilder builder = new KStreamBuilder();

        KStream<String, String> source = builder.stream(sourceAddress);

        KStream<Windowed<String>, String> max = source
                /*.selectKey((key, value, newKey) -> {
                    return "temp";
                })*/
                .selectKey(new KeyValueMapper<String, String, String>() {
                    @Override
                    public String apply(String key, String value) {
                        return "temp";
                    }
                })
                .groupByKey()
                .reduce((a,b) -> {
                    if (Integer.parseInt(a) > Integer.parseInt(b))
                        return a;
                    else
                        return b;
                }, TimeWindows.of(TimeUnit.SECONDS.toMillis(5000)))
                .toStream();

        WindowedSerializer<String> windowedSerializer = new WindowedSerializer<>(Serdes.String().serializer());
        WindowedDeserializer<String> windowedDeserializer = new WindowedDeserializer<>(Serdes.String().deserializer());
        Serde<Windowed<String>> windowedSerde = Serdes.serdeFrom(windowedSerializer, windowedDeserializer);

        // need to override key serde to Windowed<String> type
        max.to(windowedSerde, Serdes.String(), destinationAddress);

        final KafkaStreams streams = new KafkaStreams(builder, props);

        final CountDownLatch latch = new CountDownLatch(1);

        // attach shutdown handler to catch control-c
        Runtime.getRuntime().addShutdownHook(new Thread("streams-temperature-shutdown-hook") {
            @Override
            public void run() {
                streams.close();
                latch.countDown();
            }
        });

        try {
            streams.start();
            latch.await();
        } catch (Throwable e) {
            System.exit(1);
        }
        System.exit(0);
    }
 
Example 20
Project: parabuild-ci   File: Variable.java   Source Code and License Vote up 4 votes
/**
 * resolve properties inside a properties hashtable
 *
 * @param props               properties object to resolve
 * @exception BuildException  Description of the Exception
 */
private void resolveAllProperties( Properties props ) throws BuildException {
   for ( Enumeration e = props.keys(); e.hasMoreElements(); ) {
      String name = ( String ) e.nextElement();
      String value = props.getProperty( name );

      boolean resolved = false;
      while ( !resolved ) {
         Vector fragments = new Vector();
         Vector propertyRefs = new Vector();
         ProjectHelper.parsePropertyString( value, fragments,
               propertyRefs );

         resolved = true;
         if ( propertyRefs.size() != 0 ) {
            StringBuffer sb = new StringBuffer();
            Enumeration i = fragments.elements();
            Enumeration j = propertyRefs.elements();
            while ( i.hasMoreElements() ) {
               String fragment = ( String ) i.nextElement();
               if ( fragment == null ) {
                  String propertyName = ( String ) j.nextElement();
                  if ( propertyName.equals( name ) ) {
                     throw new BuildException( "Property " + name
                           + " was circularly "
                           + "defined." );
                  }
                  fragment = getProject().getProperty( propertyName );
                  if ( fragment == null ) {
                     if ( props.containsKey( propertyName ) ) {
                        fragment = props.getProperty( propertyName );
                        resolved = false;
                     }
                     else {
                        fragment = "${" + propertyName + "}";
                     }
                  }
               }
               sb.append( fragment );
            }
            value = sb.toString();
            props.put( name, value );
         }
      }
   }
}