Search in sources :

Example 36 with ArtifactReference

use of org.apache.archiva.model.ArtifactReference in project archiva by apache.

the class SnapshotTransferTest method testTimestampDrivenSnapshotNotPresentAlreadyExpiredCacheFailure.

@Test
public void testTimestampDrivenSnapshotNotPresentAlreadyExpiredCacheFailure() throws Exception {
    String path = "org/apache/maven/test/get-timestamped-snapshot/1.0-SNAPSHOT/get-timestamped-snapshot-1.0-SNAPSHOT.jar";
    setupTestableManagedRepository(path);
    Path expectedFile = managedDefaultDir.resolve(path);
    ArtifactReference artifact = managedDefaultRepository.toArtifactReference(path);
    Files.deleteIfExists(expectedFile);
    assertFalse(Files.exists(expectedFile));
    // Configure Connector (usually done within archiva.xml configuration)
    saveConnector(ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS, SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.YES, false);
    saveConnector(ID_DEFAULT_MANAGED, ID_PROXIED2, ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS, SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.YES, false);
    Path downloadedFile = proxyHandler.fetchFromProxies(managedDefaultRepository, artifact);
    Path proxiedFile = Paths.get(REPOPATH_PROXIED1, path);
    assertFileEquals(expectedFile, downloadedFile, proxiedFile);
    assertNoTempFiles(expectedFile);
}
Also used : Path(java.nio.file.Path) ArtifactReference(org.apache.archiva.model.ArtifactReference) Test(org.junit.Test)

Example 37 with ArtifactReference

use of org.apache.archiva.model.ArtifactReference in project archiva by apache.

the class SnapshotTransferTest method testGetMetadataDrivenSnapshotRemoteUpdate.

@Test
public void testGetMetadataDrivenSnapshotRemoteUpdate() throws Exception {
    // Metadata driven snapshots (using a full timestamp) are treated like a release. It is the timing of the
    // updates to the metadata files that triggers which will be downloaded
    String path = "org/apache/maven/test/get-present-metadata-snapshot/1.0-SNAPSHOT/get-present-metadata-snapshot-1.0-20050831.101112-1.jar";
    setupTestableManagedRepository(path);
    Path expectedFile = managedDefaultDir.resolve(path);
    ArtifactReference artifact = managedDefaultRepository.toArtifactReference(path);
    assertTrue(Files.exists(expectedFile));
    Files.setLastModifiedTime(expectedFile, FileTime.from(getPastDate().getTime(), TimeUnit.MILLISECONDS));
    // Configure Connector (usually done within archiva.xml configuration)
    saveConnector(ID_DEFAULT_MANAGED, ID_PROXIED1, false);
    Path downloadedFile = proxyHandler.fetchFromProxies(managedDefaultRepository, artifact);
    Path proxiedFile = Paths.get(REPOPATH_PROXIED1, path);
    assertFileEquals(expectedFile, downloadedFile, proxiedFile);
    assertNoTempFiles(expectedFile);
}
Also used : Path(java.nio.file.Path) ArtifactReference(org.apache.archiva.model.ArtifactReference) Test(org.junit.Test)

Example 38 with ArtifactReference

use of org.apache.archiva.model.ArtifactReference in project archiva by apache.

the class DefaultRepositoriesService method deleteArtifact.

@Override
public Boolean deleteArtifact(Artifact artifact) throws ArchivaRestServiceException {
    String repositoryId = artifact.getContext();
    // so try both!!
    if (StringUtils.isEmpty(repositoryId)) {
        repositoryId = artifact.getRepositoryId();
    }
    if (StringUtils.isEmpty(repositoryId)) {
        throw new ArchivaRestServiceException("repositoryId cannot be null", 400, null);
    }
    if (!isAuthorizedToDeleteArtifacts(repositoryId)) {
        throw new ArchivaRestServiceException("not authorized to delete artifacts", 403, null);
    }
    if (artifact == null) {
        throw new ArchivaRestServiceException("artifact cannot be null", 400, null);
    }
    if (StringUtils.isEmpty(artifact.getGroupId())) {
        throw new ArchivaRestServiceException("artifact.groupId cannot be null", 400, null);
    }
    if (StringUtils.isEmpty(artifact.getArtifactId())) {
        throw new ArchivaRestServiceException("artifact.artifactId cannot be null", 400, null);
    }
    // TODO more control on artifact fields
    boolean snapshotVersion = VersionUtil.isSnapshot(artifact.getVersion()) | VersionUtil.isGenericSnapshot(artifact.getVersion());
    RepositorySession repositorySession = repositorySessionFactory.createSession();
    try {
        Date lastUpdatedTimestamp = Calendar.getInstance().getTime();
        TimeZone timezone = TimeZone.getTimeZone("UTC");
        DateFormat fmt = new SimpleDateFormat("yyyyMMdd.HHmmss");
        fmt.setTimeZone(timezone);
        ManagedRepository repoConfig = managedRepositoryAdmin.getManagedRepository(repositoryId);
        VersionedReference ref = new VersionedReference();
        ref.setArtifactId(artifact.getArtifactId());
        ref.setGroupId(artifact.getGroupId());
        ref.setVersion(artifact.getVersion());
        ManagedRepositoryContent repository = getManagedRepositoryContent(repositoryId);
        ArtifactReference artifactReference = new ArtifactReference();
        artifactReference.setArtifactId(artifact.getArtifactId());
        artifactReference.setGroupId(artifact.getGroupId());
        artifactReference.setVersion(artifact.getVersion());
        artifactReference.setClassifier(artifact.getClassifier());
        artifactReference.setType(artifact.getPackaging());
        MetadataRepository metadataRepository = repositorySession.getRepository();
        String path = repository.toMetadataPath(ref);
        if (StringUtils.isNotBlank(artifact.getClassifier())) {
            if (StringUtils.isBlank(artifact.getPackaging())) {
                throw new ArchivaRestServiceException("You must configure a type/packaging when using classifier", 400, null);
            }
            repository.deleteArtifact(artifactReference);
        } else {
            int index = path.lastIndexOf('/');
            path = path.substring(0, index);
            Path targetPath = Paths.get(repoConfig.getLocation(), path);
            if (!Files.exists(targetPath)) {
                // throw new ContentNotFoundException(
                // artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getVersion() );
                log.warn("targetPath {} not found skip file deletion", targetPath);
            }
            // delete from file system
            if (!snapshotVersion) {
                repository.deleteVersion(ref);
            } else {
                Set<ArtifactReference> related = repository.getRelatedArtifacts(artifactReference);
                log.debug("related: {}", related);
                for (ArtifactReference artifactRef : related) {
                    repository.deleteArtifact(artifactRef);
                }
            }
            Path metadataFile = getMetadata(targetPath.toAbsolutePath().toString());
            ArchivaRepositoryMetadata metadata = getMetadata(metadataFile);
            updateMetadata(metadata, metadataFile, lastUpdatedTimestamp, artifact);
        }
        Collection<ArtifactMetadata> artifacts = Collections.emptyList();
        if (snapshotVersion) {
            String baseVersion = VersionUtil.getBaseVersion(artifact.getVersion());
            artifacts = metadataRepository.getArtifacts(repositoryId, artifact.getGroupId(), artifact.getArtifactId(), baseVersion);
        } else {
            artifacts = metadataRepository.getArtifacts(repositoryId, artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion());
        }
        log.debug("artifacts: {}", artifacts);
        if (artifacts.isEmpty()) {
            if (!snapshotVersion) {
                // verify metata repository doesn't contains anymore the version
                Collection<String> projectVersions = metadataRepository.getProjectVersions(repositoryId, artifact.getGroupId(), artifact.getArtifactId());
                if (projectVersions.contains(artifact.getVersion())) {
                    log.warn("artifact not found when deleted but version still here ! so force cleanup");
                    metadataRepository.removeProjectVersion(repositoryId, artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion());
                }
            }
        }
        for (ArtifactMetadata artifactMetadata : artifacts) {
            // TODO: mismatch between artifact (snapshot) version and project (base) version here
            if (artifactMetadata.getVersion().equals(artifact.getVersion())) {
                if (StringUtils.isNotBlank(artifact.getClassifier())) {
                    if (StringUtils.isBlank(artifact.getPackaging())) {
                        throw new ArchivaRestServiceException("You must configure a type/packaging when using classifier", 400, null);
                    }
                    // cleanup facet which contains classifier information
                    MavenArtifactFacet mavenArtifactFacet = (MavenArtifactFacet) artifactMetadata.getFacet(MavenArtifactFacet.FACET_ID);
                    if (StringUtils.equals(artifact.getClassifier(), mavenArtifactFacet.getClassifier())) {
                        artifactMetadata.removeFacet(MavenArtifactFacet.FACET_ID);
                        String groupId = artifact.getGroupId(), artifactId = artifact.getArtifactId(), version = artifact.getVersion();
                        MavenArtifactFacet mavenArtifactFacetToCompare = new MavenArtifactFacet();
                        mavenArtifactFacetToCompare.setClassifier(artifact.getClassifier());
                        metadataRepository.removeArtifact(repositoryId, groupId, artifactId, version, mavenArtifactFacetToCompare);
                        metadataRepository.save();
                    }
                } else {
                    if (snapshotVersion) {
                        metadataRepository.removeArtifact(artifactMetadata, VersionUtil.getBaseVersion(artifact.getVersion()));
                    } else {
                        metadataRepository.removeArtifact(artifactMetadata.getRepositoryId(), artifactMetadata.getNamespace(), artifactMetadata.getProject(), artifact.getVersion(), artifactMetadata.getId());
                    }
                }
                // repository metadata to an artifact
                for (RepositoryListener listener : listeners) {
                    listener.deleteArtifact(metadataRepository, repository.getId(), artifactMetadata.getNamespace(), artifactMetadata.getProject(), artifactMetadata.getVersion(), artifactMetadata.getId());
                }
                triggerAuditEvent(repositoryId, path, AuditEvent.REMOVE_FILE);
            }
        }
    } catch (ContentNotFoundException e) {
        throw new ArchivaRestServiceException("Artifact does not exist: " + e.getMessage(), 400, e);
    } catch (RepositoryNotFoundException e) {
        throw new ArchivaRestServiceException("Target repository cannot be found: " + e.getMessage(), 400, e);
    } catch (RepositoryException e) {
        throw new ArchivaRestServiceException("Repository exception: " + e.getMessage(), 500, e);
    } catch (MetadataResolutionException e) {
        throw new ArchivaRestServiceException("Repository exception: " + e.getMessage(), 500, e);
    } catch (MetadataRepositoryException e) {
        throw new ArchivaRestServiceException("Repository exception: " + e.getMessage(), 500, e);
    } catch (RepositoryAdminException e) {
        throw new ArchivaRestServiceException("RepositoryAdmin exception: " + e.getMessage(), 500, e);
    } finally {
        repositorySession.save();
        repositorySession.close();
    }
    return Boolean.TRUE;
}
Also used : ManagedRepository(org.apache.archiva.admin.model.beans.ManagedRepository) MavenArtifactFacet(org.apache.archiva.metadata.model.maven2.MavenArtifactFacet) RepositorySession(org.apache.archiva.metadata.repository.RepositorySession) MetadataRepository(org.apache.archiva.metadata.repository.MetadataRepository) VersionedReference(org.apache.archiva.model.VersionedReference) ArtifactMetadata(org.apache.archiva.metadata.model.ArtifactMetadata) Path(java.nio.file.Path) RepositoryListener(org.apache.archiva.repository.events.RepositoryListener) MetadataRepositoryException(org.apache.archiva.metadata.repository.MetadataRepositoryException) ContentNotFoundException(org.apache.archiva.repository.ContentNotFoundException) RepositoryException(org.apache.archiva.repository.RepositoryException) MetadataRepositoryException(org.apache.archiva.metadata.repository.MetadataRepositoryException) RepositoryNotFoundException(org.apache.archiva.repository.RepositoryNotFoundException) RepositoryAdminException(org.apache.archiva.admin.model.RepositoryAdminException) Date(java.util.Date) MetadataResolutionException(org.apache.archiva.metadata.repository.MetadataResolutionException) TimeZone(java.util.TimeZone) ArchivaRestServiceException(org.apache.archiva.rest.api.services.ArchivaRestServiceException) DateFormat(java.text.DateFormat) SimpleDateFormat(java.text.SimpleDateFormat) ManagedRepositoryContent(org.apache.archiva.repository.ManagedRepositoryContent) ArchivaRepositoryMetadata(org.apache.archiva.model.ArchivaRepositoryMetadata) SimpleDateFormat(java.text.SimpleDateFormat) ArtifactReference(org.apache.archiva.model.ArtifactReference)

Example 39 with ArtifactReference

use of org.apache.archiva.model.ArtifactReference in project archiva by apache.

the class DefaultRepositoriesService method copyArtifact.

@Override
public Boolean copyArtifact(ArtifactTransferRequest artifactTransferRequest) throws ArchivaRestServiceException {
    // check parameters
    String userName = getAuditInformation().getUser().getUsername();
    if (StringUtils.isBlank(userName)) {
        throw new ArchivaRestServiceException("copyArtifact call: userName not found", null);
    }
    if (StringUtils.isBlank(artifactTransferRequest.getRepositoryId())) {
        throw new ArchivaRestServiceException("copyArtifact call: sourceRepositoryId cannot be null", null);
    }
    if (StringUtils.isBlank(artifactTransferRequest.getTargetRepositoryId())) {
        throw new ArchivaRestServiceException("copyArtifact call: targetRepositoryId cannot be null", null);
    }
    ManagedRepository source = null;
    try {
        source = managedRepositoryAdmin.getManagedRepository(artifactTransferRequest.getRepositoryId());
    } catch (RepositoryAdminException e) {
        throw new ArchivaRestServiceException(e.getMessage(), e);
    }
    if (source == null) {
        throw new ArchivaRestServiceException("cannot find repository with id " + artifactTransferRequest.getRepositoryId(), null);
    }
    ManagedRepository target = null;
    try {
        target = managedRepositoryAdmin.getManagedRepository(artifactTransferRequest.getTargetRepositoryId());
    } catch (RepositoryAdminException e) {
        throw new ArchivaRestServiceException(e.getMessage(), e);
    }
    if (target == null) {
        throw new ArchivaRestServiceException("cannot find repository with id " + artifactTransferRequest.getTargetRepositoryId(), null);
    }
    if (StringUtils.isBlank(artifactTransferRequest.getGroupId())) {
        throw new ArchivaRestServiceException("groupId is mandatory", null);
    }
    if (StringUtils.isBlank(artifactTransferRequest.getArtifactId())) {
        throw new ArchivaRestServiceException("artifactId is mandatory", null);
    }
    if (StringUtils.isBlank(artifactTransferRequest.getVersion())) {
        throw new ArchivaRestServiceException("version is mandatory", null);
    }
    if (VersionUtil.isSnapshot(artifactTransferRequest.getVersion())) {
        throw new ArchivaRestServiceException("copy of SNAPSHOT not supported", null);
    }
    // end check parameters
    User user = null;
    try {
        user = securitySystem.getUserManager().findUser(userName);
    } catch (UserNotFoundException e) {
        throw new ArchivaRestServiceException("user " + userName + " not found", e);
    } catch (UserManagerException e) {
        throw new ArchivaRestServiceException("ArchivaRestServiceException:" + e.getMessage(), e);
    }
    // check karma on source : read
    AuthenticationResult authn = new AuthenticationResult(true, userName, null);
    SecuritySession securitySession = new DefaultSecuritySession(authn, user);
    try {
        boolean authz = securitySystem.isAuthorized(securitySession, ArchivaRoleConstants.OPERATION_REPOSITORY_ACCESS, artifactTransferRequest.getRepositoryId());
        if (!authz) {
            throw new ArchivaRestServiceException("not authorized to access repo:" + artifactTransferRequest.getRepositoryId(), null);
        }
    } catch (AuthorizationException e) {
        log.error("error reading permission: {}", e.getMessage(), e);
        throw new ArchivaRestServiceException(e.getMessage(), e);
    }
    // check karma on target: write
    try {
        boolean authz = securitySystem.isAuthorized(securitySession, ArchivaRoleConstants.OPERATION_REPOSITORY_UPLOAD, artifactTransferRequest.getTargetRepositoryId());
        if (!authz) {
            throw new ArchivaRestServiceException("not authorized to write to repo:" + artifactTransferRequest.getTargetRepositoryId(), null);
        }
    } catch (AuthorizationException e) {
        log.error("error reading permission: {}", e.getMessage(), e);
        throw new ArchivaRestServiceException(e.getMessage(), e);
    }
    // sounds good we can continue !
    ArtifactReference artifactReference = new ArtifactReference();
    artifactReference.setArtifactId(artifactTransferRequest.getArtifactId());
    artifactReference.setGroupId(artifactTransferRequest.getGroupId());
    artifactReference.setVersion(artifactTransferRequest.getVersion());
    artifactReference.setClassifier(artifactTransferRequest.getClassifier());
    String packaging = StringUtils.trim(artifactTransferRequest.getPackaging());
    artifactReference.setType(StringUtils.isEmpty(packaging) ? "jar" : packaging);
    try {
        ManagedRepositoryContent sourceRepository = getManagedRepositoryContent(artifactTransferRequest.getRepositoryId());
        String artifactSourcePath = sourceRepository.toPath(artifactReference);
        if (StringUtils.isEmpty(artifactSourcePath)) {
            log.error("cannot find artifact {}", artifactTransferRequest);
            throw new ArchivaRestServiceException("cannot find artifact " + artifactTransferRequest.toString(), null);
        }
        Path artifactFile = Paths.get(source.getLocation(), artifactSourcePath);
        if (!Files.exists(artifactFile)) {
            log.error("cannot find artifact {}", artifactTransferRequest);
            throw new ArchivaRestServiceException("cannot find artifact " + artifactTransferRequest.toString(), null);
        }
        ManagedRepositoryContent targetRepository = getManagedRepositoryContent(artifactTransferRequest.getTargetRepositoryId());
        String artifactPath = targetRepository.toPath(artifactReference);
        int lastIndex = artifactPath.lastIndexOf('/');
        String path = artifactPath.substring(0, lastIndex);
        Path targetPath = Paths.get(target.getLocation(), path);
        Date lastUpdatedTimestamp = Calendar.getInstance().getTime();
        int newBuildNumber = 1;
        String timestamp = null;
        Path versionMetadataFile = targetPath.resolve(MetadataTools.MAVEN_METADATA);
        /* unused */
        getMetadata(versionMetadataFile);
        if (!Files.exists(targetPath)) {
            Files.createDirectories(targetPath);
        }
        String filename = artifactPath.substring(lastIndex + 1);
        boolean fixChecksums = !(archivaAdministration.getKnownContentConsumers().contains("create-missing-checksums"));
        Path targetFile = targetPath.resolve(filename);
        if (Files.exists(targetFile) && target.isBlockRedeployments()) {
            throw new ArchivaRestServiceException("artifact already exists in target repo: " + artifactTransferRequest.getTargetRepositoryId() + " and redeployment blocked", null);
        } else {
            copyFile(artifactFile, targetPath, filename, fixChecksums);
            queueRepositoryTask(target.getId(), targetFile);
        }
        // copy source pom to target repo
        String pomFilename = filename;
        if (StringUtils.isNotBlank(artifactTransferRequest.getClassifier())) {
            pomFilename = StringUtils.remove(pomFilename, "-" + artifactTransferRequest.getClassifier());
        }
        pomFilename = FilenameUtils.removeExtension(pomFilename) + ".pom";
        Path pomFile = Paths.get(source.getLocation(), artifactSourcePath.substring(0, artifactPath.lastIndexOf('/')), pomFilename);
        if (pomFile != null && Files.size(pomFile) > 0) {
            copyFile(pomFile, targetPath, pomFilename, fixChecksums);
            queueRepositoryTask(target.getId(), targetPath.resolve(pomFilename));
        }
        // explicitly update only if metadata-updater consumer is not enabled!
        if (!archivaAdministration.getKnownContentConsumers().contains("metadata-updater")) {
            updateProjectMetadata(targetPath.toAbsolutePath().toString(), lastUpdatedTimestamp, timestamp, newBuildNumber, fixChecksums, artifactTransferRequest);
        }
        String msg = "Artifact \'" + artifactTransferRequest.getGroupId() + ":" + artifactTransferRequest.getArtifactId() + ":" + artifactTransferRequest.getVersion() + "\' was successfully deployed to repository \'" + artifactTransferRequest.getTargetRepositoryId() + "\'";
        log.debug("copyArtifact {}", msg);
    } catch (RepositoryException e) {
        log.error("RepositoryException: {}", e.getMessage(), e);
        throw new ArchivaRestServiceException(e.getMessage(), e);
    } catch (RepositoryAdminException e) {
        log.error("RepositoryAdminException: {}", e.getMessage(), e);
        throw new ArchivaRestServiceException(e.getMessage(), e);
    } catch (IOException e) {
        log.error("IOException: {}", e.getMessage(), e);
        throw new ArchivaRestServiceException(e.getMessage(), e);
    }
    return true;
}
Also used : UserNotFoundException(org.apache.archiva.redback.users.UserNotFoundException) Path(java.nio.file.Path) ManagedRepository(org.apache.archiva.admin.model.beans.ManagedRepository) User(org.apache.archiva.redback.users.User) AuthorizationException(org.apache.archiva.redback.authorization.AuthorizationException) SecuritySession(org.apache.archiva.redback.system.SecuritySession) DefaultSecuritySession(org.apache.archiva.redback.system.DefaultSecuritySession) RepositoryException(org.apache.archiva.repository.RepositoryException) MetadataRepositoryException(org.apache.archiva.metadata.repository.MetadataRepositoryException) IOException(java.io.IOException) RepositoryAdminException(org.apache.archiva.admin.model.RepositoryAdminException) Date(java.util.Date) AuthenticationResult(org.apache.archiva.redback.authentication.AuthenticationResult) UserManagerException(org.apache.archiva.redback.users.UserManagerException) ArchivaRestServiceException(org.apache.archiva.rest.api.services.ArchivaRestServiceException) ManagedRepositoryContent(org.apache.archiva.repository.ManagedRepositoryContent) DefaultSecuritySession(org.apache.archiva.redback.system.DefaultSecuritySession) ArtifactReference(org.apache.archiva.model.ArtifactReference)

Example 40 with ArtifactReference

use of org.apache.archiva.model.ArtifactReference in project archiva by apache.

the class ArtifactBuilder method build.

public Artifact build() {
    ArtifactReference ref = new ArtifactReference();
    ref.setArtifactId(artifactMetadata.getProject());
    ref.setGroupId(artifactMetadata.getNamespace());
    ref.setVersion(artifactMetadata.getVersion());
    String type = null, classifier = null;
    MavenArtifactFacet facet = (MavenArtifactFacet) artifactMetadata.getFacet(MavenArtifactFacet.FACET_ID);
    if (facet != null) {
        type = facet.getType();
        classifier = facet.getClassifier();
    }
    ref.setClassifier(classifier);
    ref.setType(type);
    Path file = managedRepositoryContent.toFile(ref);
    String extension = getExtensionFromFile(file);
    Artifact artifact = new Artifact(ref.getGroupId(), ref.getArtifactId(), ref.getVersion());
    artifact.setRepositoryId(artifactMetadata.getRepositoryId());
    artifact.setClassifier(classifier);
    artifact.setPackaging(type);
    artifact.setType(type);
    artifact.setFileExtension(extension);
    artifact.setPath(managedRepositoryContent.toPath(ref));
    // TODO: find a reusable formatter for this
    double s = this.artifactMetadata.getSize();
    String symbol = "b";
    if (s > 1024) {
        symbol = "K";
        s /= 1024;
        if (s > 1024) {
            symbol = "M";
            s /= 1024;
            if (s > 1024) {
                symbol = "G";
                s /= 1024;
            }
        }
    }
    artifact.setContext(managedRepositoryContent.getId());
    DecimalFormat df = new DecimalFormat("#,###.##", new DecimalFormatSymbols(Locale.US));
    artifact.setSize(df.format(s) + " " + symbol);
    artifact.setId(ref.getArtifactId() + "-" + ref.getVersion() + "." + ref.getType());
    return artifact;
}
Also used : Path(java.nio.file.Path) DecimalFormatSymbols(java.text.DecimalFormatSymbols) DecimalFormat(java.text.DecimalFormat) MavenArtifactFacet(org.apache.archiva.metadata.model.maven2.MavenArtifactFacet) ArtifactReference(org.apache.archiva.model.ArtifactReference) Artifact(org.apache.archiva.maven2.model.Artifact)

Aggregations

ArtifactReference (org.apache.archiva.model.ArtifactReference)77 Path (java.nio.file.Path)62 Test (org.junit.Test)50 LayoutException (org.apache.archiva.repository.LayoutException)13 IOException (java.io.IOException)10 ManagedRepositoryContent (org.apache.archiva.repository.ManagedRepositoryContent)9 ContentNotFoundException (org.apache.archiva.repository.ContentNotFoundException)8 RepositoryException (org.apache.archiva.repository.RepositoryException)8 VersionedReference (org.apache.archiva.model.VersionedReference)7 File (java.io.File)5 Date (java.util.Date)5 ArchivaRestServiceException (org.apache.archiva.rest.api.services.ArchivaRestServiceException)5 RepositoryTask (org.apache.archiva.scheduler.repository.model.RepositoryTask)5 ResourceDoesNotExistException (org.apache.maven.wagon.ResourceDoesNotExistException)5 ArrayList (java.util.ArrayList)4 HashSet (java.util.HashSet)4 RepositoryAdminException (org.apache.archiva.admin.model.RepositoryAdminException)4 ManagedRepository (org.apache.archiva.admin.model.beans.ManagedRepository)4 ArtifactMetadata (org.apache.archiva.metadata.model.ArtifactMetadata)4 MetadataRepository (org.apache.archiva.metadata.repository.MetadataRepository)4