Package org.codehaus.plexus.interpolation

Examples of org.codehaus.plexus.interpolation.PrefixAwareRecursionInterceptor


            Properties values = new Properties();
            values.setProperty("artifactId", project.getArtifactId());
            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);
            }
        }
        if (!SNAPSHOT_PATTERN.matcher(project.getVersion()).find()) {
            String tagNameFormat = getTagNameFormat(project);
            getLog().debug("End Tag name format = " + tagNameFormat);
            Interpolator interpolator = new StringSearchInterpolator("@{", "}");
            List<String> possiblePrefixes = java.util.Arrays.asList("project", "pom");
            Properties values = new Properties();
            values.setProperty("artifactId", project.getArtifactId());
            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


    public void initialize()
        throws InitializationException
    {
        interpolator = createInterpolator();
        recursionInterceptor = new PrefixAwareRecursionInterceptor( PROJECT_PREFIXES );
    }
View Full Code Here

    private RecursionInterceptor recursionInterceptor;

    public AbstractStringBasedModelInterpolator()
    {
        interpolator = createInterpolator();
        recursionInterceptor = new PrefixAwareRecursionInterceptor( PROJECT_PREFIXES );
    }
View Full Code Here

    private RecursionInterceptor recursionInterceptor;

    public AbstractStringBasedModelInterpolator()
    {
        interpolator = createInterpolator();
        recursionInterceptor = new PrefixAwareRecursionInterceptor( PROJECT_PREFIXES );
    }
View Full Code Here

    private RecursionInterceptor recursionInterceptor;

    public AbstractStringBasedModelInterpolator()
    {
        interpolator = createInterpolator();
        recursionInterceptor = new PrefixAwareRecursionInterceptor( PROJECT_PREFIXES );
    }
View Full Code Here

    public void initialize()
        throws InitializationException
    {
        interpolator = createInterpolator();
        recursionInterceptor = new PrefixAwareRecursionInterceptor( PROJECT_PREFIXES );
    }
View Full Code Here

    private RecursionInterceptor recursionInterceptor;

    public AbstractStringBasedModelInterpolator()
    {
        interpolator = createInterpolator();
        recursionInterceptor = new PrefixAwareRecursionInterceptor( PROJECT_PREFIXES );
    }
View Full Code Here

        final Interpolator interpolator = buildInterpolator( project, configSource );

        // TODO: Will this adequately detect cycles between prefixed property references and prefixed project
        // references??
        final RecursionInterceptor interceptor =
            new PrefixAwareRecursionInterceptor( InterpolationConstants.PROJECT_PREFIXES, true );

        try
        {
            objectInterpolator.interpolate( assembly, interpolator, interceptor );
        }
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

            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

TOP

Related Classes of org.codehaus.plexus.interpolation.PrefixAwareRecursionInterceptor

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.