Package org.apache.maven.plugin.assembly

Examples of org.apache.maven.plugin.assembly.AssemblerConfigurationSource


        final MockAndControlForAssemblyArchiver macMgr = new MockAndControlForAssemblyArchiver( mm );

        final MockControl csControl = MockControl.createControl( AssemblerConfigurationSource.class );
        mm.add( csControl );

        final AssemblerConfigurationSource configSource = (AssemblerConfigurationSource) csControl.getMock();

        mm.replayAll();

        final DefaultAssemblyArchiver archiver = createSubject( macMgr, null, null );
        archiver.createArchive( new Assembly(), "full-name", "zip", configSource );
View Full Code Here


        phaseControl.setMatcher( MockControl.ALWAYS_MATCHER );

        final MockControl csControl = MockControl.createControl( AssemblerConfigurationSource.class );
        mm.add( csControl );

        final AssemblerConfigurationSource configSource = (AssemblerConfigurationSource) csControl.getMock();

        final File tempDir = fileManager.createTempDir();
        FileUtils.deleteDirectory( tempDir );

        configSource.getTemporaryRootDirectory();
        csControl.setReturnValue( tempDir, MockControl.ZERO_OR_MORE );

        configSource.isDryRun();
        csControl.setReturnValue( false, MockControl.ZERO_OR_MORE );

        configSource.isIgnoreDirFormatExtensions();
        csControl.setReturnValue( false, MockControl.ZERO_OR_MORE );

        final File outDir = fileManager.createTempDir();

        macMgr.archiver.setDestFile( new File( outDir, "full-name.zip" ) );

        try
        {
            macMgr.archiver.createArchive();
        }
        catch ( final ArchiverException e )
        {
            fail( "Should never happen" );
        }
        catch ( final IOException e )
        {
            fail( "Should never happen" );
        }

        configSource.getOutputDirectory();
        csControl.setReturnValue( outDir );

        configSource.getFinalName();
        csControl.setReturnValue( "finalName" );

        configSource.getArchiverConfig();
        csControl.setReturnValue( null, MockControl.ZERO_OR_MORE );

        configSource.getWorkingDirectory();
        csControl.setReturnValue( new File( "." ), MockControl.ZERO_OR_MORE );

        configSource.isUpdateOnly();
        csControl.setReturnValue( false, MockControl.ZERO_OR_MORE );

        configSource.isIgnorePermissions();
        csControl.setReturnValue( true, MockControl.ZERO_OR_MORE );

        final Assembly assembly = new Assembly();
        assembly.setId( "id" );
View Full Code Here

        final TestArchiverWithConfig archiver = new TestArchiverWithConfig();

        macArchiverManager.expectGetArchiver( "dummy", archiver );

        final MockControl configCtl = MockControl.createControl( AssemblerConfigurationSource.class );
        final AssemblerConfigurationSource configSource = (AssemblerConfigurationSource) configCtl.getMock();

        final String simpleConfig = "value";

        configSource.getArchiverConfig();
        configCtl.setReturnValue( "<configuration><simpleConfig>" + simpleConfig + "</simpleConfig></configuration>",
                                  MockControl.ZERO_OR_MORE );

        final MavenProject project = new MavenProject( new Model() );

        configSource.getProject();
        configCtl.setReturnValue( project, MockControl.ZERO_OR_MORE );

        configSource.getMavenSession();
        configCtl.setReturnValue( null, MockControl.ZERO_OR_MORE );

        configSource.isDryRun();
        configCtl.setReturnValue( false, MockControl.ZERO_OR_MORE );

        configSource.getWorkingDirectory();
        configCtl.setReturnValue( new File( "." ), MockControl.ZERO_OR_MORE );

        configSource.isUpdateOnly();
        configCtl.setReturnValue( false, MockControl.ZERO_OR_MORE );

        final MockControl lrCtl = MockControl.createControl( ArtifactRepository.class );
        final ArtifactRepository lr = (ArtifactRepository) lrCtl.getMock();
        mm.add( lrCtl );

        lr.getBasedir();
        lrCtl.setReturnValue( "/path/to/local/repo", MockControl.ZERO_OR_MORE );

        configSource.getLocalRepository();
        configCtl.setReturnValue( lr, MockControl.ZERO_OR_MORE );

        configSource.isIgnorePermissions();
        configCtl.setReturnValue( true, MockControl.ZERO_OR_MORE );

        mm.add( configCtl );

        mm.replayAll();
View Full Code Here

        final MockAndControlForAssemblyArchiver macArchiverManager = new MockAndControlForAssemblyArchiver( mm );

        macArchiverManager.expectGetArchiver( "tar", ttArchiver );

        final MockControl configCtl = MockControl.createControl( AssemblerConfigurationSource.class );
        final AssemblerConfigurationSource configSource = (AssemblerConfigurationSource) configCtl.getMock();

        configSource.getTarLongFileMode();
        configCtl.setReturnValue( TarLongFileMode.FAIL, MockControl.ZERO_OR_MORE );

        configSource.isDryRun();
        configCtl.setReturnValue( false, MockControl.ZERO_OR_MORE );

        configSource.getArchiverConfig();
        configCtl.setReturnValue( null, MockControl.ZERO_OR_MORE );

        configSource.getProject();
        configCtl.setReturnValue( new MavenProject( new Model() ), MockControl.ZERO_OR_MORE );

        configSource.getJarArchiveConfiguration();
        configCtl.setReturnValue( null, MockControl.ZERO_OR_MORE );

        configSource.getWorkingDirectory();
        configCtl.setReturnValue( new File( "." ), MockControl.ZERO_OR_MORE );

        configSource.isUpdateOnly();
        configCtl.setReturnValue( false, MockControl.ZERO_OR_MORE );

        configSource.isIgnorePermissions();
        configCtl.setReturnValue( true, MockControl.ZERO_OR_MORE );

        mm.add( configCtl );

        mm.replayAll();
View Full Code Here

        final MockAndControlForAssemblyArchiver macArchiverManager = new MockAndControlForAssemblyArchiver( mm );

        macArchiverManager.expectGetArchiver( "war", twArchiver );

        final MockControl configCtl = MockControl.createControl( AssemblerConfigurationSource.class );
        final AssemblerConfigurationSource configSource = (AssemblerConfigurationSource) configCtl.getMock();

        configSource.isDryRun();
        configCtl.setReturnValue( false, MockControl.ZERO_OR_MORE );

        configSource.getArchiverConfig();
        configCtl.setReturnValue( null, MockControl.ZERO_OR_MORE );

        configSource.getProject();
        configCtl.setReturnValue( new MavenProject( new Model() ), MockControl.ZERO_OR_MORE );

        configSource.getJarArchiveConfiguration();
        configCtl.setReturnValue( null, MockControl.ZERO_OR_MORE );

        configSource.getWorkingDirectory();
        configCtl.setReturnValue( new File( "." ), MockControl.ZERO_OR_MORE );

        configSource.isUpdateOnly();
        configCtl.setReturnValue( false, MockControl.ZERO_OR_MORE );

        configSource.isIgnorePermissions();
        configCtl.setReturnValue( true, MockControl.ZERO_OR_MORE );

        mm.add( configCtl );

        mm.replayAll();
View Full Code Here

        final MockAndControlForAssemblyArchiver macArchiverManager = new MockAndControlForAssemblyArchiver( mm );

        macArchiverManager.expectGetArchiver( "zip", archiver );

        final MockControl configCtl = MockControl.createControl( AssemblerConfigurationSource.class );
        final AssemblerConfigurationSource configSource = (AssemblerConfigurationSource) configCtl.getMock();

        configSource.isDryRun();
        configCtl.setReturnValue( false, MockControl.ZERO_OR_MORE );

        configSource.getArchiverConfig();
        configCtl.setReturnValue( null, MockControl.ZERO_OR_MORE );

        configSource.getWorkingDirectory();
        configCtl.setReturnValue( new File( "." ), MockControl.ZERO_OR_MORE );

        configSource.isUpdateOnly();
        configCtl.setReturnValue( false, MockControl.ZERO_OR_MORE );

        configSource.isIgnorePermissions();
        configCtl.setReturnValue( true, MockControl.ZERO_OR_MORE );

        mm.add( configCtl );

        mm.replayAll();
View Full Code Here

        session.getUserProperties();
        sessionControl.setReturnValue( new Properties(), MockControl.ZERO_OR_MORE );

        final MockControl csControl = MockControl.createControl( AssemblerConfigurationSource.class );
        final AssemblerConfigurationSource cs = (AssemblerConfigurationSource) csControl.getMock();

        mm.add( csControl );

        final MockControl lrCtl = MockControl.createControl( ArtifactRepository.class );
        final ArtifactRepository lr = (ArtifactRepository) lrCtl.getMock();
        mm.add( lrCtl );

        lr.getBasedir();
        lrCtl.setReturnValue( "/path/to/local/repo", MockControl.ZERO_OR_MORE );

        cs.getLocalRepository();
        csControl.setReturnValue( lr, MockControl.ZERO_OR_MORE );

        cs.getMavenSession();
        csControl.setReturnValue( session, MockControl.ZERO_OR_MORE );

        mm.replayAll();

        final Assembly result = interpolator.interpolate( assembly, new MavenProject( model ), cs );
View Full Code Here

        sessionCtl.setReturnValue( new Properties(), MockControl.ZERO_OR_MORE );

        final MockControl csCtl = MockControl.createControl( AssemblerConfigurationSource.class );
        mockManager.add( csCtl );

        final AssemblerConfigurationSource cs = (AssemblerConfigurationSource) csCtl.getMock();
        cs.getMavenSession();
        csCtl.setReturnValue( session, MockControl.ZERO_OR_MORE );

        mockManager.replayAll();

        final String result =
View Full Code Here

        sessionCtl.setReturnValue( new Properties(), MockControl.ZERO_OR_MORE );

        final MockControl csCtl = MockControl.createControl( AssemblerConfigurationSource.class );
        mockManager.add( csCtl );

        final AssemblerConfigurationSource cs = (AssemblerConfigurationSource) csCtl.getMock();
        cs.getMavenSession();
        csCtl.setReturnValue( session, MockControl.ZERO_OR_MORE );

        mockManager.replayAll();

        final String result =
View Full Code Here

        sessionCtl.setReturnValue( new Properties(), MockControl.ZERO_OR_MORE );

        final MockControl csCtl = MockControl.createControl( AssemblerConfigurationSource.class );
        mockManager.add( csCtl );

        final AssemblerConfigurationSource cs = (AssemblerConfigurationSource) csCtl.getMock();
        cs.getMavenSession();
        csCtl.setReturnValue( session, MockControl.ZERO_OR_MORE );

        String result;

        mockManager.replayAll();
View Full Code Here

TOP

Related Classes of org.apache.maven.plugin.assembly.AssemblerConfigurationSource

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.