Package org.apache.maven.wagon

Examples of org.apache.maven.wagon.Wagon.connect()


            {
                wagon.connect( repository, getAuthenticationInfo( id ), proxyInfo );
            }
            else
            {
                wagon.connect( repository, getAuthenticationInfo( id ) );
            }

            File buildOutputFile = configurationService.getBuildOutputFile( build.getId(), build.getProject().getId() );

            wagon.put( buildOutputFile, BUILD_OUTPUT_FILE_NAME );
View Full Code Here


                                proxyInfo.setUserName(settingsProxy.getUsername());
                                proxyInfo.setPassword(settingsProxy.getPassword());
                            }

                            if (proxyInfo != null)
                                wagon.connect(repository, wagonManager.getAuthenticationInfo(repository.getId()),proxyInfo);
                            else
                                wagon.connect(repository, wagonManager.getAuthenticationInfo(repository.getId()));
                           
                            wagon.get(downloadUrl.getPath().substring(1), tempDownloadFile);
View Full Code Here

                            }

                            if (proxyInfo != null)
                                wagon.connect(repository, wagonManager.getAuthenticationInfo(repository.getId()),proxyInfo);
                            else
                                wagon.connect(repository, wagonManager.getAuthenticationInfo(repository.getId()));
                           
                            wagon.get(downloadUrl.getPath().substring(1), tempDownloadFile);

                            getLog().debug(
                                "caching temporary file for later");
View Full Code Here

    {
        Wagon wagon = new FileWagon();
        Resource resource = new Resource();
        resource.setContentLength( 100000 );
        Repository repository = new Repository();
        wagon.connect( repository );
    }

    protected long getExpectedLastModifiedOnGet( Repository repository, Resource resource )
    {
        return new File( repository.getBasedir(), resource.getName() ).lastModified();
View Full Code Here

    {
        String url = "file://" + getBasedir();
       
        Wagon wagon = new FileWagon();
        Repository repository = new Repository( "someID", url );
        wagon.connect( repository );
       
        assertTrue( wagon.resourceExists( "target" ) );
        assertTrue( wagon.resourceExists( "target/" ) );
        assertTrue( wagon.resourceExists( "pom.xml" ) );
       
View Full Code Here

            // This is the difference to our normal use case:
            // the directory specified in the repo string doesn't yet exist!

            testRepository.setUrl( testRepository.getUrl() + "/dirExists/not_yet_existing/also_not" );

            wagon.connect( testRepository, getAuthInfo() );

            wagon.putDirectory( sourceDir, "testDirectory" );

            destFile = FileTestUtils.createUniqueFile(getName(), getName());
View Full Code Here

            sourceFile.deleteOnExit();

            String resName = "gzip-res.txt";
            String sourceContent = writeTestFileGzip( sourceFile, resName );

            wagon.connect( testRepository );

            File destFile = FileTestUtils.createUniqueFile( getName(), getName() );

            destFile.deleteOnExit();
View Full Code Here

            new File( getDavRepository(), dirName + "/" + dirnames[i] ).mkdirs();
        }

        Wagon wagon = getWagon();

        wagon.connect( testRepository, getAuthInfo() );

        List<String> list = wagon.getFileList( dirName );

        assertNotNull( "file list should not be null.", list );
        assertEquals( "file list should contain 6 items", 6, list.size() );
View Full Code Here

        FileUtils.copyFileToDirectory( dummy, sub );

        String url = getTestRepositoryUrl() + "/" + dir;
        Repository repo = new Repository( "foo", url );
        Wagon wagon = getWagon();
        wagon.connect( repo, getAuthInfo() );
        List<String> files = wagon.getFileList( subDir );
        assertNotNull( files );
        assertEquals( 1, files.size() );
        assertTrue( files.contains( "dummy.txt" ) );
View Full Code Here

    {
        final Wagon wagon = (Wagon) MockControl.createControl( Wagon.class ).getMock();

        final Repository repo = new Repository();

        wagon.connect( repo );

        final long timestamp = System.currentTimeMillis();

        final Exception exception = new AuthenticationException( "dummy" );
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.