Package org.apache.commons.jelly.expression

Examples of org.apache.commons.jelly.expression.Expression.evaluateAsString()


                        int idx = actual.getIndex(name);
                        if(idx>=0actual.removeAttribute(idx);
                    }

                    Expression expression = e.getValue().exp;
                    actual.addAttribute("",name,name,"CDATA",expression.evaluateAsString(context));
                }

                try {
                    output.startElement(tagName,actual);
                    getTagBody().run(context,output);
View Full Code Here


        if ( defaultGoalName != null )
        {
            // By evaluating expression now it has the same scope as the POM.
            Expression e = JellyUtils.decomposeExpression( defaultGoalName, baseContext );
            defaultGoalName = e.evaluateAsString( baseContext );
            baseContext.setVariable( MavenConstants.DEFAULT_GOAL, defaultGoalName );

            if ( goals != null && goals.size() == 0 )
            {
                log.debug( "Using default goal: " + defaultGoalName );
View Full Code Here

        try
        {
            expression = CompositeExpression.parse( text, mavenExpressionFactory );

            String expressionText = expression.evaluateAsString( context );

            if ( CompositeExpression.parse( expressionText, mavenExpressionFactory ) instanceof CompositeExpression )
            {
                expression = decomposeExpression( expressionText, context );
            }
View Full Code Here

        {
            // We must look in the <extend/> element for expressions that may be present as
            //
            // <extend>../project.xml</extend>
            Expression e = JellyUtils.decomposeExpression( pomToExtend, context );
            pomToExtend = e.evaluateAsString( context );
            pomToExtend = MavenUtils.makeAbsolutePath( projectDescriptor.getParentFile(), pomToExtend );
            project.setExtend( pomToExtend );

            File parentPom = new File( pomToExtend );
            parentPom = parentPom.getCanonicalFile();
View Full Code Here

    private static Project getInterpolatedPOM( Project project, JellyContext context )
        throws Exception
    {
        String projectString = project.getProjectAsString();
        Expression e = JellyUtils.decomposeExpression( projectString, context );
        String newProjectString = e.evaluateAsString( context );
        project = new Project( new StringReader( newProjectString ) );
        return project;
    }

    /**
 
View Full Code Here

        try
        {
            expression = CompositeExpression.parse( text, mavenExpressionFactory );

            String expressionText = expression.evaluateAsString( context );

            if ( CompositeExpression.parse( expressionText, mavenExpressionFactory ) instanceof CompositeExpression )
            {
                expression = decomposeExpression( expressionText, context );
            }
View Full Code Here

        {
            // We must look in the <extend/> element for expressions that may be present as
            //
            // <extend>../project.xml</extend>
            Expression e = JellyUtils.decomposeExpression( pomToExtend, context );
            pomToExtend = e.evaluateAsString( context );
            pomToExtend = MavenUtils.makeAbsolutePath( projectDescriptor.getParentFile(), pomToExtend );
            project.setExtend( pomToExtend );

            File parentPom = new File( pomToExtend );
            parentPom = parentPom.getCanonicalFile();
View Full Code Here

     */
    private static Project getInterpolatedPOM( Project project, JellyContext context ) throws Exception
    {
        String projectString = project.getProjectAsString();
        Expression e = JellyUtils.decomposeExpression( projectString, context );
        String newProjectString = e.evaluateAsString( context );
        // We can use a Reader and not an URL/path here to read
        // the POM because this is a memory model without XML entities.
        project = new Project( new StringReader( newProjectString ) );
        return project;
    }
View Full Code Here

        if ( defaultGoalName != null )
        {
            // By evaluating expression now it has the same scope as the POM.
            Expression e = JellyUtils.decomposeExpression( defaultGoalName, baseContext );
            defaultGoalName = e.evaluateAsString( baseContext );
            baseContext.setVariable( MavenConstants.DEFAULT_GOAL, defaultGoalName );

            if ( ( goals != null ) && ( goals.size() == 0 ) )
            {
                LOGGER.debug( "Using default goal: " + defaultGoalName );
View Full Code Here

                        int idx = actual.getIndex(name);
                        if(idx>=0actual.removeAttribute(idx);
                    }

                    Expression expression = e.getValue().exp;
                    actual.addAttribute("",name,name,"CDATA",expression.evaluateAsString(context));
                }

                try {
                    output.startElement(tagName,actual);
                    getTagBody().run(context,output);
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.