Package org.apache.maven.artifact.repository

Examples of org.apache.maven.artifact.repository.Authentication


                        {
                            logger.debug( problem.getMessage(), problem.getException() );
                        }
                    }

                    Authentication authentication = new Authentication( server.getUsername(), server.getPassword() );
                    authentication.setPrivateKey( server.getPrivateKey() );
                    authentication.setPassphrase( server.getPassphrase() );

                    repository.setAuthentication( authentication );
                }
                else
                {
View Full Code Here


            {
                org.sonatype.aether.repository.Authentication auth =
                    selector.getAuthentication( RepositoryUtils.toRepo( repository ) );
                if ( auth != null )
                {
                    Authentication result = new Authentication( auth.getUsername(), auth.getPassword() );
                    result.setPrivateKey( auth.getPrivateKeyFile() );
                    result.setPassphrase( auth.getPassphrase() );
                    return result;
                }
            }
        }
        return null;
View Full Code Here

                        {
                            logger.debug( problem.getMessage(), problem.getException() );
                        }
                    }

                    Authentication authentication = new Authentication( server.getUsername(), server.getPassword() );
                    authentication.setPrivateKey( server.getPrivateKey() );
                    authentication.setPassphrase( server.getPassphrase() );

                    repository.setAuthentication( authentication );
                }
                else
                {
View Full Code Here

            {
                org.sonatype.aether.repository.Authentication auth =
                    selector.getAuthentication( RepositoryUtils.toRepo( repository ) );
                if ( auth != null )
                {
                    Authentication result = new Authentication( auth.getUsername(), auth.getPassword() );
                    result.setPrivateKey( auth.getPrivateKeyFile() );
                    result.setPassphrase( auth.getPassphrase() );
                    return result;
                }
            }
        }
        return null;
View Full Code Here

                        {
                            logger.debug( problem.getMessage(), problem.getException() );
                        }
                    }

                    Authentication authentication = new Authentication( server.getUsername(), server.getPassword() );

                    repository.setAuthentication( authentication );
                }
                else
                {
View Full Code Here

            {
                org.sonatype.aether.repository.Authentication auth =
                    selector.getAuthentication( RepositoryUtils.toRepo( repository ) );
                if ( auth != null )
                {
                    return new Authentication( auth.getUsername(), auth.getPassword() );
                }
            }
        }
        return null;
    }
View Full Code Here

        server.setPassword( "abc123" );

        ArtifactRepository repository =
            repositorySystem.createArtifactRepository( "repository", "http://foo", null, null, null );
        repositorySystem.injectAuthentication( Arrays.asList( repository ), Arrays.asList( server ) );
        Authentication authentication = repository.getAuthentication();
        assertNotNull( authentication );
        assertEquals( "jason", authentication.getUsername() );
        assertEquals( "abc123", authentication.getPassword() );
    }
View Full Code Here

                        {
                            logger.debug( problem.getMessage(), problem.getException() );
                        }
                    }

                    Authentication authentication = new Authentication( server.getUsername(), server.getPassword() );
                    authentication.setPrivateKey( server.getPrivateKey() );
                    authentication.setPassphrase( server.getPassphrase() );

                    repository.setAuthentication( authentication );
                }
                else
                {
View Full Code Here

                org.eclipse.aether.repository.Authentication auth = selector.getAuthentication( repo );
                if ( auth != null )
                {
                    repo = new RemoteRepository.Builder( repo ).setAuthentication( auth ).build();
                    AuthenticationContext authCtx = AuthenticationContext.forRepository( session, repo );
                    Authentication result =
                        new Authentication( authCtx.get( AuthenticationContext.USERNAME ),
                                            authCtx.get( AuthenticationContext.PASSWORD ) );
                    result.setPrivateKey( authCtx.get( AuthenticationContext.PRIVATE_KEY_PATH ) );
                    result.setPassphrase( authCtx.get( AuthenticationContext.PRIVATE_KEY_PASSPHRASE ) );
                    authCtx.close();
                    return result;
                }
            }
        }
View Full Code Here

                        {
                            logger.debug( problem.getMessage(), problem.getException() );
                        }
                    }

                    Authentication authentication = new Authentication( server.getUsername(), server.getPassword() );

                    repository.setAuthentication( authentication );
                }
                else
                {
View Full Code Here

TOP

Related Classes of org.apache.maven.artifact.repository.Authentication

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.