Package org.codehaus.plexus.interpolation

Examples of org.codehaus.plexus.interpolation.StringSearchInterpolator.interpolate()


                    StringSearchInterpolator interpolator = new StringSearchInterpolator( "${", "}" );
                    // interpolation as plexus did it before
                    interpolator.addValueSource( new PropertiesBasedValueSource( System.getProperties() ) );

                    String interpolatedProps = interpolator.interpolate( properties );

                    logger.debug( "Loading configuration into commons-configuration, xml {}", interpolatedProps );
                    builder.load( new StringReader( interpolatedProps ) );
                    configuration = builder.getConfiguration( false );
                    configuration.setExpressionEngine( expressionEngine );
View Full Code Here


            values.setProperty("groupId", project.getGroupId());
            values.setProperty("version", latest.toString());
            interpolator.addValueSource(new PrefixedPropertiesValueSource(possiblePrefixes, values, true));
            RecursionInterceptor recursionInterceptor = new PrefixAwareRecursionInterceptor(possiblePrefixes);
            try {
                startTag = interpolator.interpolate(tagNameFormat, recursionInterceptor);
            } catch (InterpolationException e) {
                throw new MojoExecutionException("Could not interpolate specified tag name format: " + tagNameFormat,
                        e);
            }
        }
View Full Code Here

            values.setProperty("groupId", project.getGroupId());
            values.setProperty("version", project.getVersion());
            interpolator.addValueSource(new PrefixedPropertiesValueSource(possiblePrefixes, values, true));
            RecursionInterceptor recursionInterceptor = new PrefixAwareRecursionInterceptor(possiblePrefixes);
            try {
                endTag = interpolator.interpolate(tagNameFormat, recursionInterceptor);
            } catch (InterpolationException e) {
                throw new MojoExecutionException("Could not interpolate specified tag name format: " + tagNameFormat,
                        e);
            }
        }
View Full Code Here

            interpolator.addValueSource( new PrefixedObjectValueSource( pomPrefixes, model, false ) );
            interpolator.addValueSource( new MapBasedValueSource( model.getProperties() ) );
            interpolator.addValueSource( new ObjectBasedValueSource( model ) );
            try
            {
                value = interpolator.interpolate( value, new PrefixAwareRecursionInterceptor( pomPrefixes ) );
            }
            catch ( InterpolationException e )
            {
                throw new ReleaseExecutionException(
                                                     "Failed to interpolate " + value + " for project " + model.getId(),
View Full Code Here

                            + e.getMessage(), e );
        }

        try
        {
            value = interpolator.interpolate( value );
        }
        catch ( final InterpolationException e )
        {
            throw new AssemblyFormattingException( "Failed to interpolate output directory. Reason: " + e.getMessage(),
                                                   e );
View Full Code Here

                            + e.getMessage(), e );
        }

        try
        {
            value = interpolator.interpolate( value );
        }
        catch ( final InterpolationException e )
        {
            throw new AssemblyFormattingException( "Failed to interpolate output filename mapping. Reason: "
                            + e.getMessage(), e );
View Full Code Here

            values.setProperty("groupId", project.getGroupId());
            values.setProperty("version", previousVersion);
            interpolator.addValueSource(new PrefixedPropertiesValueSource(possiblePrefixes, values, true));
            RecursionInterceptor recursionInterceptor = new PrefixAwareRecursionInterceptor(possiblePrefixes);
            try {
                startTag = interpolator.interpolate(tagNameFormat, recursionInterceptor);
            } catch (InterpolationException e) {
                throw new MojoExecutionException("Could not interpolate specified tag name format: " + tagNameFormat,
                        e);
            }
        }
View Full Code Here

            values.setProperty("groupId", project.getGroupId());
            values.setProperty("version", project.getVersion());
            interpolator.addValueSource(new PrefixedPropertiesValueSource(possiblePrefixes, values, true));
            RecursionInterceptor recursionInterceptor = new PrefixAwareRecursionInterceptor(possiblePrefixes);
            try {
                endTag = interpolator.interpolate(tagNameFormat, recursionInterceptor);
            } catch (InterpolationException e) {
                throw new MojoExecutionException("Could not interpolate specified tag name format: " + tagNameFormat,
                        e);
            }
        }
View Full Code Here

    interpolator.addValueSource(new MapBasedValueSource(properties));
    interpolator.addValueSource(new MapBasedValueSource(System.getProperties()));
    interpolator.addValueSource(new EnvarBasedValueSource());

    for (Entry<String, String> entry : properties.entrySet()) {
      properties.put(entry.getKey(), interpolator.interpolate(entry.getValue()));
    }
  }

  public Map<String, String> build() throws Exception {
    if (properties.isEmpty()) {
View Full Code Here

                            + e.getMessage(), e );
        }

        try
        {
            value = interpolator.interpolate( value );
        }
        catch ( final InterpolationException e )
        {
            throw new AssemblyFormattingException( "Failed to interpolate output directory. Reason: " + e.getMessage(),
                                                   e );
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.