Package org.apache.tools.ant

Examples of org.apache.tools.ant.PropertyHelper.replaceProperties()


        try
        {
            while ((line = in.readLine()) != null)
            {
                line = line.trim();
                line = ph.replaceProperties("", line, getProject().getProperties());
                if (line.startsWith("//") || line.startsWith("--"))
                {
                    continue;
                }
                if (line.length() > 4
View Full Code Here


            throw( new BuildException( "you have to specify an XMLDB collection URI" ) );
        }

        if( text != null ) {
            final PropertyHelper helper = PropertyHelper.getPropertyHelper( getProject() );
            query = helper.replaceProperties( null, text, null );
        }

        if( ( queryFile == null ) && ( query == null ) && ( queryUri == null ) ) {
            throw( new BuildException( "you have to specify a query either as attribute, text, URI or in a file" ) );
        }
View Full Code Here

            throw( new BuildException( "you have to specify an XMLDB collection URI" ) );
        }

        if( text != null ) {
            final PropertyHelper helper = PropertyHelper.getPropertyHelper( getProject() );
            query = helper.replaceProperties( null, text, null );
        }

        if( query == null ) {
            throw( new BuildException( "you have to specify a query" ) );
        }
View Full Code Here

            throw( new BuildException( "you have to specify an XMLDB collection URI" ) );
        }

        if( text != null ) {
            final PropertyHelper helper = PropertyHelper.getPropertyHelper( getProject() );
            query = helper.replaceProperties( null, text, null );
        }

        if( query == null ) {
            throw( new BuildException( "you have to specify a query" ) );
        }
View Full Code Here

     */
    private URL getGlobalEasyAntIvySettings(Project project) throws MalformedURLException {
        PropertyHelper helper = PropertyHelper.getPropertyHelper(project);
        URL path = null;
        if (configuration.getEasyantIvySettingsFile() != null) {
            File f = new File(helper.replaceProperties(configuration.getEasyantIvySettingsFile()));
            path = f.toURI().toURL();
        }
        if (configuration.getEasyantIvySettingsUrl() != null) {
            path = new URL(helper.replaceProperties(configuration.getEasyantIvySettingsUrl()));
        }
View Full Code Here

        if (configuration.getEasyantIvySettingsFile() != null) {
            File f = new File(helper.replaceProperties(configuration.getEasyantIvySettingsFile()));
            path = f.toURI().toURL();
        }
        if (configuration.getEasyantIvySettingsUrl() != null) {
            path = new URL(helper.replaceProperties(configuration.getEasyantIvySettingsUrl()));
        }
        // path can be specified through a property
        if (path == null && project.getProperty(EasyAntMagicNames.GLOBAL_EASYANT_IVYSETTINGS) != null) {
            path = new URL(project.getProperty(EasyAntMagicNames.GLOBAL_EASYANT_IVYSETTINGS));
        }
View Full Code Here

            path = new URL(project.getProperty(EasyAntMagicNames.GLOBAL_EASYANT_IVYSETTINGS));
        }
        // if no property is set check the default location
        if (path == null) {
            File defaultGlboalEasyAntIvySettings = new File(
                    helper.replaceProperties(EasyAntConstants.DEFAULT_GLOBAL_EASYANT_IVYSETTINGS));
            if (!defaultGlboalEasyAntIvySettings.exists()) {
                return null;
            }
            path = defaultGlboalEasyAntIvySettings.toURI().toURL();
        }
View Full Code Here

            super();
  }

  private static String replaceProperties(Project project, String value, Hashtable keys) throws BuildException {
    PropertyHelper ph = PropertyHelper.getPropertyHelper(project);
    return ph.replaceProperties(null, value, keys);
  }

  public void setIf(String string) {
    ifCondition = string == null ? "" : string;
  }
View Full Code Here

    return super.getDirectoryScanner(p);
  }

  private static String replaceProperties(Project project, String value, Hashtable keys) throws BuildException {
    PropertyHelper ph = PropertyHelper.getPropertyHelper(project);
    return ph.replaceProperties(null, value, keys);
  }

  private boolean testIfCondition() {
    if ("".equals(ifCondition)) {
      return true;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.