Package org.apache.tools.ant

Examples of org.apache.tools.ant.PropertyHelper$PropertyEvaluator


        if( uri == null ) {
            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


        if( uri == null ) {
            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

         * on it with {@code if} and {@code unless} properties.
         *
         * @return {@code true} if the task passes the {@code if} and {@code unless} parameters
         */
        public boolean shouldUse() {
            PropertyHelper ph = PropertyHelper.getPropertyHelper(project);
            return ph.testIfCondition(ifCond) && ph.testUnlessCondition(unlessCond);
        }
View Full Code Here

        // Add a reference to this task/type
        antProject.addReference( antId, this );

        // Register the property intercepter or delegate
        PropertyHelper phelper = PropertyHelper.getPropertyHelper( antProject );
        try
        {
            // Ant 1.8.0 delegate
            POMPropertyEvaluator.register( this, phelper );
        }
        catch ( LinkageError e )
        {
            // fallback to 1.6 - 1.7.1 intercepter chaining
            helper.setNext( phelper.getNext() );
            helper.setProject( antProject );
            phelper.setNext( helper );
        }
    }
View Full Code Here

     * Refresh the known properties.
     * </p>
     */
    private void  refreshProperties()
    {
        PropertyHelper  helper = PropertyHelper.getPropertyHelper( getProject() );
       
        _propertiesSnapshot = helper.getProperties();

        // Set the verbose debugging flag, it is used by static methods.
        VERBOSE_DEBUG_ENABLED = Boolean.valueOf((String)
                    _propertiesSnapshot.get(PROPERTY_SETTER_VERBOSE_DEBUG_FLAG)
                ).booleanValue();
View Full Code Here

     * @param project
     * @return the configured global easyant-ivysettings.file
     * @throws MalformedURLException
     */
    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()));
        }
        // 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));
        }
        // 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

  public WOFileSet() {
            super();
  }

  private static String replaceProperties(Project project, String value, Hashtable keys) throws BuildException {
    PropertyHelper ph = PropertyHelper.getPropertyHelper(project);
    return ph.replaceProperties(null, value, keys);
  }
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);
  }
View Full Code Here

      public void restore(Project targetProject)
      {
         // Restore the original user and non-user properties to this Project object
         try
         {
            PropertyHelper helper = (PropertyHelper) targetProject.getReference(MagicNames.REFID_PROPERTY_HELPER);
            Class propertyHelperClass = helper.getClass();

            //check if Properties Maps are null
            if (m_properties != null)
            {
               Field propertiesField = propertyHelperClass.getDeclaredField("properties");
View Full Code Here

     */
    private void createReport(String database, String format, String title, String output, String historyOut, boolean summary) {
        final Project antProject = new Project();
        antProject.init();

        PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper( antProject );

        propertyHelper.setNext( new AntPropertyHelper( project, getLog() ) );

        antProject.setUserProperty("ant.file", reportDescriptor.getAbsolutePath());
        antProject.setCoreLoader(getClass().getClassLoader());

        addMavenProperties(antProject);
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.PropertyHelper$PropertyEvaluator

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.