Package org.codehaus.plexus.components.io.functions

Examples of org.codehaus.plexus.components.io.functions.InputStreamTransformer


            final PlexusIoFileResource
                res = new PlexusIoFileResource( source, ArchiverAttributeUtils.getFileAttributes( source ));
            PlexusIoResource restoUse = res;
            try
            {
                final InputStreamTransformer fileSetTransformers =
                    ReaderFormatter.getFileSetTransformers( configSource, fileItem.isFiltered(), fileItem.getLineEnding() );

                if (fileSetTransformers != null){
                    restoUse = new Deferred( res ){
                        @Override
                        protected InputStream getInputStream()
                            throws IOException
                        {
                            return fileSetTransformers.transform(res, res.getContents());
                        }

                        @Override
                        public String getName()
                        { return res.getName();
View Full Code Here


            checkMultiArtifactOutputConfig( dependencySet );
        }

        logger.debug( "Adding " + dependencyArtifacts.size() + " dependency artifacts." );

        InputStreamTransformer fileSetTransformers =
            dependencySet.isUnpack() && dependencySet.getUnpackOptions() != null
                ? ReaderFormatter.getFileSetTransformers( configSource, dependencySet.getUnpackOptions().isFiltered(),
                                                          dependencySet.getUnpackOptions().getLineEnding() )
                : null;
View Full Code Here

        File fileSetDir = getFileSetDirectory( fileSet, basedir, archiveBaseDir );

        if ( fileSetDir.exists() )
        {
            InputStreamTransformer fileSetTransformers = ReaderFormatter.getFileSetTransformers( configSource, fileSet.isFiltered(),
                                                                                                 fileSet.getLineEnding() );
            if (fileSetTransformers == null)
            {
                logger.debug( "NOT reformatting any files in " + fileSetDir );
            }
View Full Code Here

        String lineEnding = LineEndingsUtils.getLineEndingCharacters( lineEndingHint );

        if ( ( lineEnding != null ) || isFiltered )
        {
            return new InputStreamTransformer()
            {
                public InputStream transform( PlexusIoResource plexusIoResource, InputStream inputStream )
                    throws IOException
                {
                    if ( isFiltered )
View Full Code Here

    @Test
    public void lineDosFeed()
        throws IOException, AssemblyFormattingException
    {
        final PojoConfigSource cfg = getPojoConfigSource();
        InputStreamTransformer fileSetTransformers = getFileSetTransformers( cfg, true, "dos" );
        InputStream fud = fileSetTransformers.transform( dummyResource(), payload( "This is a\ntest." ) );
        assertEquals( "This is a\r\ntest.", readResultStream( fud ) );
    }
View Full Code Here

    @Test
    public void lineUnixFeedWithInterpolation()
        throws IOException, AssemblyFormattingException
    {
        final PojoConfigSource cfg = getPojoConfigSource();
        InputStreamTransformer fileSetTransformers = getFileSetTransformers( cfg, true, "unix" );
        InputStream fud = fileSetTransformers.transform( dummyResource(), payload( "This is a test for project: ${artifactId} @artifactId@.") );
        assertEquals( "This is a test for project: anArtifact anArtifact.", readResultStream( fud ) );
    }
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.components.io.functions.InputStreamTransformer

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.