Package org.jfrog.build.api.dependency.pattern

Examples of org.jfrog.build.api.dependency.pattern.DependencyPattern


    }

    private Map<String, Map<String, List<BuildDependencyPattern>>> getBuildDependencies(List<String> patternLines) {
        Map<String, Map<String, List<BuildDependencyPattern>>> buildsMap = Maps.newHashMap();
        for (String patternLine : patternLines) {
            DependencyPattern dependencyPattern = PatternFactory.create(patternLine);
            if (dependencyPattern instanceof BuildDependencyPattern) {
                BuildDependencyPattern buildDependencyPattern = (BuildDependencyPattern) dependencyPattern;
                String buildName = buildDependencyPattern.getBuildName();
                Map<String, List<BuildDependencyPattern>> numbersMap = buildsMap.get(buildName);
                if (numbersMap == null) {
View Full Code Here


                }
                return new BuildDependencyPattern(buildDependencyPattern, matrixParams, targetPattern,
                        getPatternType(patternLine), buildName, buildNumber);
            }
        } else {
            return new DependencyPattern(pattern, matrixParams, targetPattern, getPatternType(patternLine));
        }

        return null;
    }
View Full Code Here

    private Set<DownloadableArtifact> collectArtifactsToDownload(List<String> patternLines)
            throws IOException, InterruptedException {
        Set<DownloadableArtifact> downloadableArtifacts = Sets.newHashSet();
        for (String patternLine : patternLines) {
            DependencyPattern dependencyPattern = PatternFactory.create(patternLine);
            if (!(dependencyPattern instanceof BuildDependencyPattern)) {
                downloadableArtifacts.addAll(handleDependencyPattern(dependencyPattern));
            }
        }
View Full Code Here

*/
@Test
public class PatternFactoryTest {

    public void testDependencies() throws Exception {
        DependencyPattern dependencyPattern = PatternFactory.create("win-demo:*/*/*.dll;type+=32;OS+=win-7=>property");
        assertDependency(dependencyPattern, "win-demo:*/*/*.dll", "type+=32;OS+=win-7", "property", PatternType.NORMAL);

        dependencyPattern = PatternFactory.create("win-demo:**/*;type+=64;OS+=win-7=>starstar");
        assertDependency(dependencyPattern, "win-demo:**/*", "type+=64;OS+=win-7", "starstar", PatternType.NORMAL);

View Full Code Here

        dependencyPattern = PatternFactory.create("win-demo:**/*.*=!>");
        assertDependency(dependencyPattern, "win-demo:**/*.*", "", "", PatternType.DELETE);
    }

    public void testBuildDependencies() throws Exception {
        DependencyPattern pattern = PatternFactory.create("repo:**/*;a=1;b+=2@build#13=>relative\\path");
        assertBuildDependency(pattern, "repo:**/*", "a=1;b+=2", "relative/path", PatternType.NORMAL, "build", "13");

        pattern = PatternFactory.create("repo:**/*;c+=4;@build#13=>");
        assertBuildDependency(pattern, "repo:**/*", "c+=4;", "", PatternType.NORMAL, "build", "13");

View Full Code Here

TOP

Related Classes of org.jfrog.build.api.dependency.pattern.DependencyPattern

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.