Examples of ArtifactReference


Examples of org.apache.archiva.model.ArtifactReference

        catch ( IllegalArgumentException e )
        {
            throw new LayoutException( e.getMessage(), e );
        }

        ArtifactReference artifact = new ArtifactReference();
        artifact.setGroupId( metadata.getNamespace() );
        artifact.setArtifactId( metadata.getProject() );
        artifact.setVersion( metadata.getVersion() );
        MavenArtifactFacet facet = (MavenArtifactFacet) metadata.getFacet( MavenArtifactFacet.FACET_ID );
        if ( facet != null )
        {
            artifact.setClassifier( facet.getClassifier() );
            artifact.setType( facet.getType() );
        }

        return artifact;
    }
View Full Code Here

Examples of org.apache.archiva.model.ArtifactReference

            if ( filetypes.matchesArtifactPattern( relativePath ) )
            {
                try
                {
                    ArtifactReference artifact = toArtifactReference( relativePath );

                    // Test for related, groupId / artifactId / version must match.
                    if ( artifact.getGroupId().equals( reference.getGroupId() ) && artifact.getArtifactId().equals(
                        reference.getArtifactId() ) && artifact.getVersion().equals( reference.getVersion() ) )
                    {
                        foundArtifacts.add( artifact );
                    }
                }
                catch ( LayoutException e )
View Full Code Here

Examples of org.apache.archiva.model.ArtifactReference

            if ( filetypes.matchesArtifactPattern( relativePath ) )
            {
                try
                {
                    ArtifactReference artifact = toArtifactReference( relativePath );

                    foundVersions.add( artifact.getVersion() );
                }
                catch ( LayoutException e )
                {
                    log.debug( "Not processing file that is not an artifact: {}", e.getMessage() );
                }
View Full Code Here

Examples of org.apache.archiva.model.ArtifactReference

            String relativePath = PathUtil.getRelative( repository.getLocation(), repoFiles[i] );

            if ( filetypes.matchesArtifactPattern( relativePath ) )
            {
                ArtifactReference artifact = toArtifactReference( relativePath );

                return artifact;
            }
        }
View Full Code Here

Examples of org.apache.archiva.model.ArtifactReference

    public void testManagedLegacyNotPresentRemoteDefaultPresent()
        throws Exception
    {
        String path = "org.apache.maven.test/jars/get-default-layout-1.0.jar";
        File expectedFile = new File( managedLegacyDir, path );
        ArtifactReference artifact = managedLegacyRepository.toArtifactReference( path );

        assertNotExistsInManagedLegacyRepo( expectedFile );

        // Configure Connector (usually done within archiva.xml configuration)
        saveConnector( ID_LEGACY_MANAGED, ID_PROXIED1, false );
View Full Code Here

Examples of org.apache.archiva.model.ArtifactReference

        File expectedFile = new File( managedLegacyDir, path );
        File remoteFile = new File( REPOPATH_PROXIED1, remotePath );

        setManagedOlderThanRemote( expectedFile, remoteFile );
       
        ArtifactReference artifact = managedLegacyRepository.toArtifactReference( path );

        // Configure Connector (usually done within archiva.xml configuration)
        saveConnector( ID_LEGACY_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
                       SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
View Full Code Here

Examples of org.apache.archiva.model.ArtifactReference

    public void testManagedLegacyNotPresentRemoteLegacyPresent()
        throws Exception
    {
        String path = "org.apache.maven.test/plugins/get-legacy-plugin-1.0.jar";
        File expectedFile = new File( managedLegacyDir, path );
        ArtifactReference artifact = managedLegacyRepository.toArtifactReference( path );

        assertNotExistsInManagedLegacyRepo( expectedFile );

        // Configure Connector (usually done within archiva.xml configuration)
        saveConnector( ID_LEGACY_MANAGED, ID_LEGACY_PROXIED, false );
View Full Code Here

Examples of org.apache.archiva.model.ArtifactReference

        File expectedFile = new File( managedLegacyDir, path );
        File remoteFile = new File( REPOPATH_PROXIED_LEGACY, path );

        setManagedOlderThanRemote( expectedFile, remoteFile );
       
        ArtifactReference artifact = managedLegacyRepository.toArtifactReference( path );

        // Configure Connector (usually done within archiva.xml configuration)
        saveConnector( ID_LEGACY_MANAGED, ID_LEGACY_PROXIED, false );

        File downloadedFile = proxyHandler.fetchFromProxies( managedLegacyRepository, artifact );
View Full Code Here

Examples of org.apache.archiva.model.ArtifactReference

    public void testManagedLegacyPresentRemoteLegacyNotPresent()
        throws Exception
    {
        String path = "org.apache.maven.test/jars/managed-only-lib-2.1.jar";
        File expectedFile = new File( managedLegacyDir, path );
        ArtifactReference artifact = managedLegacyRepository.toArtifactReference( path );

        assertTrue( expectedFile.exists() );

        // Configure Connector (usually done within archiva.xml configuration)
        saveConnector( ID_LEGACY_MANAGED, ID_LEGACY_PROXIED, false );
View Full Code Here

Examples of org.apache.archiva.model.ArtifactReference

    public void testManagedLegacyPresentRemoteDefaultNotPresent()
        throws Exception
    {
        String path = "org.apache.maven.test/jars/managed-only-lib-2.1.jar";
        File expectedFile = new File( managedLegacyDir, path );
        ArtifactReference artifact = managedLegacyRepository.toArtifactReference( path );

        assertTrue( expectedFile.exists() );

        // Configure Connector (usually done within archiva.xml configuration)
        saveConnector( ID_LEGACY_MANAGED, ID_PROXIED1, false );
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.