Package org.codehaus.plexus.util

Examples of org.codehaus.plexus.util.InterpolationFilterReader


        InputStream is = getClass().getResourceAsStream( "/" + getPluginDescriptorLocation() );

        XmlStreamReader reader = new XmlStreamReader( is );

        InterpolationFilterReader interpolationFilterReader =
            new InterpolationFilterReader( new BufferedReader( reader ), container.getContext().getContextData() );

        PluginDescriptor pluginDescriptor = new PluginDescriptorBuilder().build( interpolationFilterReader );

        Artifact artifact =
            lookup( RepositorySystem.class ).createArtifact( pluginDescriptor.getGroupId(),
View Full Code Here


        InputStream is = getClass().getResourceAsStream( "/" + getPluginDescriptorLocation() );

        XmlStreamReader reader = ReaderFactory.newXmlReader( is );

        InterpolationFilterReader interpolationFilterReader =
            new InterpolationFilterReader( new BufferedReader( reader ), container.getContext().getContextData() );

        PluginDescriptor pluginDescriptor = new PluginDescriptorBuilder().build( interpolationFilterReader );

        Artifact artifact =
            lookup( RepositorySystem.class ).createArtifact( pluginDescriptor.getGroupId(),
View Full Code Here

            Reader reader = null;
            if ( filtering )
            {
                // support _${token}
                reader = new InterpolationFilterReader( fileReader, filterProperties, "_${", "}" );
                // support ${token}
                reader = new InterpolationFilterReader( reader, filterProperties, "${", "}" );
                // support @token@
                reader = new InterpolationFilterReader( reader, filterProperties, "@", "@" );

                boolean isPropertiesFile = false;
                if ( to.isFile() && to.getName().endsWith( ".properties" ) )
                {
                    isPropertiesFile = true;
                }
                reader = new InterpolationFilterReader( reader, new ReflectionProperties( mymojo.getProject(),
                    isPropertiesFile ), "${", "}" );
            }
            else
            {
                reader = fileReader;
View Full Code Here

            Reader reader = null;
            if ( filtering )
            {
                // support _${token}
                reader = new InterpolationFilterReader( fileReader, filterProperties, "_${", "}" );
                // support ${token}
                reader = new InterpolationFilterReader( reader, filterProperties, "${", "}" );
                // support @token@
                reader = new InterpolationFilterReader( reader, filterProperties, "@", "@" );

                boolean isPropertiesFile = false;
                if ( to.isFile() && to.getName().endsWith( ".properties" ) )
                {
                    isPropertiesFile = true;
                }
                reader = new InterpolationFilterReader( reader, new ReflectionProperties( mymojo.getProject(),
                    isPropertiesFile ), "${", "}" );
            }
            else
            {
                reader = fileReader;
View Full Code Here

    if (dest.getParentFile() != null && !dest.getParentFile().exists()) {
      dest.getParentFile().mkdirs();
    }

    FileReader fileReader = new FileReader(from);
    InterpolationFilterReader filterReader = new InterpolationFilterReader(fileReader, (Map) variables);

    FileWriter fos = new FileWriter(dest);

    int readChar = -1;
    while ((readChar = filterReader.read()) != -1) {
      fos.write(readChar);
    }

    // close everything
    fileReader.close();
View Full Code Here

        FileUtils.copyFile(sourceFile, destFile);
      }
      else {
        try (FileReader reader = new FileReader(sourceFile);
             FileWriter writer = new FileWriter(destFile)) {
          InterpolationFilterReader filterReader = new InterpolationFilterReader(reader, (Map) variables);
          IOUtils.copy(filterReader, writer);
        }
      }
    }
View Full Code Here

      throws IOException
  {
    HashMap<String, Object> interpolationMap = new HashMap<String, Object>();
    interpolationMap.put("port", Integer.toString(getLdapServer().getPort()));

    try (Reader reader = new InterpolationFilterReader(new InputStreamReader(inputStream), interpolationMap);
         OutputStream out = new FileOutputStream(outputFile)) {
      IOUtils.copy(reader, out);
    }
  }
View Full Code Here

    getConfHomeDir().mkdirs();
    Map<String, Object> interpolationMap = new HashMap<String, Object>();
    interpolationMap.put("default-ldap-port", "12345");

    try (InterpolationFilterReader reader = new InterpolationFilterReader(new InputStreamReader(
        ClassLoader.getSystemResourceAsStream(resourcePath)), interpolationMap);
         OutputStream out = new FileOutputStream(new File(getConfHomeDir(), "ldap.xml"));) {
      IOUtils.copy(reader, out);
    }
View Full Code Here

    copyResource(this.getSecurityConfigXmlFilePath(), getSecurityConfiguration());
    copyResource(this.getSecurityXmlFilePath(), getNexusSecurityConfiguration());

    try (InterpolationFilterReader reader =
             new InterpolationFilterReader(new InputStreamReader(
                 getClass().getResourceAsStream(this.getLdapConfigXmlFilePath())), interpolationMap)) {
      IOUtils.copy(reader, new FileOutputStream(new File(getConfHomeDir(), "ldap.xml")));
    }
  }
View Full Code Here

                conn.connect();

                reader = ReaderFactory.newXmlReader( conn.getInputStream() );

                InterpolationFilterReader interpolationFilterReader =
                    new InterpolationFilterReader( reader, new ContextMapAdapter( context ) );

                ComponentSetDescriptor componentSetDescriptor =
                    createComponentDescriptors( interpolationFilterReader, url.toString() );

                if ( componentSetDescriptor.getComponents() != null )
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.util.InterpolationFilterReader

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.