Examples of DownloadableArtifact


Examples of io.fabric8.agent.mvn.DownloadableArtifact

            priority++;
            try {
                if (isExactVersion) {
                    downloadables.add(resolveExactVersion(parser, repositoryURL, priority));
                } else if (isSnapshot) {
                    final DownloadableArtifact snapshot =
                            resolveSnapshotVersion(parser, repositoryURL, priority, parser.getVersion());
                    downloadables.add(snapshot);
                    // if we have a local built snapshot we skip the rest of repositories
                    if (snapshot.isLocalSnapshotBuild()) {
                        break;
                    }
                } else {
                    final Document metadata = getMetadata(repositoryURL.getURL(),
                            new String[]
View Full Code Here

Examples of io.fabric8.agent.mvn.DownloadableArtifact

            throws IOException {
        if (!repositoryURL.isReleasesEnabled()) {
            throw new IOException("Releases not enabled");
        }
        LOG.debug(Ix2 + "Resolving exact version");
        return new DownloadableArtifact(
                parser.getVersion(),
                priority,
                repositoryURL.getURL(),
                parser.getArtifactPath(),
                false, // no local built snapshot
View Full Code Here

Examples of io.fabric8.agent.mvn.DownloadableArtifact

        final String version = XmlUtils.getTextContentOfElement(metadata, "versioning/versions/version[last]");
        if (version != null) {
            if (version.endsWith("SNAPSHOT")) {
                return resolveSnapshotVersion(parser, repositoryURL, priority, version);
            } else {
                return new DownloadableArtifact(
                        version,
                        priority,
                        repositoryURL.getURL(),
                        parser.getArtifactPath(version),
                        false, // no local built snapshot
View Full Code Here

Examples of io.fabric8.agent.mvn.DownloadableArtifact

            final String buildNumber =
                    XmlUtils.getTextContentOfElement(snapshotMetadata, "versioning/snapshot/buildNumber");
            final String localSnapshot =
                    XmlUtils.getTextContentOfElement(snapshotMetadata, "versioning/snapshot/localCopy");
            if (timestamp != null && buildNumber != null) {
                return new DownloadableArtifact(
                        parser.getSnapshotVersion(version, timestamp, buildNumber),
                        priority,
                        repositoryURL.getURL(),
                        parser.getSnapshotPath(version, timestamp, buildNumber),
                        localSnapshot != null,
                        configuration.getCertificateCheck()
                );
            } else {
                String lastUpdated = XmlUtils.getTextContentOfElement(snapshotMetadata, "versioning/lastUpdated");
                if (lastUpdated != null) {
                    // last updated should contain in the first 8 chars the date and then the time,
                    // fact that is not compatible with timeStamp from remote repos which has a "." after date
                    if (lastUpdated.length() > 8) {
                        lastUpdated = lastUpdated.substring(0, 8) + "." + lastUpdated.substring(8);
                        return new DownloadableArtifact(
                                parser.getSnapshotVersion(version, lastUpdated, "0"),
                                priority,
                                repositoryURL.getURL(),
                                parser.getArtifactPath(version),
                                localSnapshot != null,
                                configuration.getCertificateCheck()
                        );
                    }
                }
            }
        } catch (IOException ignore) {
            // in this case we could not find any metadata so try to get the *-SNAPSHOT file directly
        }
        return new DownloadableArtifact(
                parser.getVersion(),
                priority,
                repositoryURL.getURL(),
                parser.getArtifactPath(),
                false, // no local built snapshot
View Full Code Here

Examples of io.fabric8.agent.mvn.DownloadableArtifact

                            downladables.add(
                                    resolveSnapshotVersion(parser, repositoryURL, priority, versionString)
                            );
                        } else {
                            downladables.add(
                                    new DownloadableArtifact(
                                            versionString,
                                            priority,
                                            repositoryURL.getURL(),
                                            parser.getArtifactPath(versionString),
                                            false, // no local built snapshot
View Full Code Here

Examples of org.jfrog.build.api.dependency.DownloadableArtifact

                        final String repoUrl = patternArtifact.getArtifactoryUrl() + '/' + uri.substring(0,
                                indexOfFirstSlash);
                        final String filePath = uri.substring(indexOfFirstSlash + 1);
                        downloadableArtifacts.add(
                                new DownloadableArtifact(repoUrl, buildDependencyPattern.getTargetDirectory(), filePath,
                                        buildDependencyPattern.getMatrixParams(), buildDependencyPattern.getPattern(),
                                        buildDependencyPattern.getPatternType()));
                    }

                    if (!patternArtifacts.isEmpty()) {
View Full Code Here

Examples of org.jfrog.build.api.dependency.DownloadableArtifact

        List<PropertySearchResult.SearchEntry> filteredEntries = filterResultEntries(
                propertySearchResult.getResults(), pattern);
        log.info("Found " + filteredEntries.size() + " dependencies by doing a property search.");
        for (PropertySearchResult.SearchEntry searchEntry : filteredEntries) {
            downloadableArtifacts.add(
                    new DownloadableArtifact(searchEntry.getRepoUri(), dependencyPattern.getTargetDirectory(),
                            searchEntry.getFilePath(), matrixParams, pattern, dependencyPattern.getPatternType()));
        }

        return downloadableArtifacts;
    }
View Full Code Here

Examples of org.jfrog.build.api.dependency.DownloadableArtifact

        PatternResultFileSet fileSet = downloader.getClient().searchArtifactsByPattern(pattern);
        Set<String> filesToDownload = fileSet.getFiles();
        log.info("Found " + filesToDownload.size() + " dependencies by doing a pattern search.");
        for (String fileToDownload : filesToDownload) {
            downloadableArtifacts.add(
                    new DownloadableArtifact(fileSet.getRepoUri(), dependencyPattern.getTargetDirectory(),
                            fileToDownload, dependencyPattern.getMatrixParams(), pattern,
                            dependencyPattern.getPatternType()));
        }

        return downloadableArtifacts;
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.