Skip to content

Common LAYer module containing adoption of different features to ease of use

License

Notifications You must be signed in to change notification settings

camelot-framework/clay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLAY (Common LAYer module)

release Maven Central covarage

Clay Maven Settings Builder

Fluent-api builders for maven settings.

Settings settings = newSettings()
        .withActiveProfile(newProfile()
                .withId("profile")
                .withRepository(newRepository()
                        .withUrl("http://repo1.maven.org/maven2"))).build();

Clay Aether

Fluent-api for Eclipse Aether. Easy to resolve/collect/install/deploy artifacts.

//resolve with transitives 
List<ArtifactResult> results = aether(localRepositoryFile, settings)
        .resolve("ru.yandex.qatools.allure:allure-model:jar:1.3.9").get();
}

//resolve without transitives
List<ArtifactResult> results = aether(localRepositoryFile, settings)
        .resolve("ru.yandex.qatools.allure:allure-model:jar:1.3.9", false);
        
//resolve all given artifacts 
List<ArtifactResult> results = aether(localRepo, MAVEN_SETTINGS)
        .resolveAll("ru.yandex.qatools.allure:allure-model:jar:1.3.9", 
                    "ru.yandex.qatools.allure:allure-java-annotations:jar:1.3.9").get();
        
//collect
List<Artifact> artifacts = aether(localRepositoryFile, settings)
        .collect("ru.yandex.qatools.allure:allure-model:jar:1.3.9");

//install
aether(localRepositoryFile, settings)
        .install(archiveToDeploy, "testGroupId", "testArtifactId", "testVersion");

//deploy
aether(localRepositoryFile, settings)
        .deploy(distributionManagement, archiveToDeploy, "testGroupId", "testArtifactId", "testVersion");

Also you have few ways to get resolve results:

//as list of artifact results:
List<ArtifactResult> results = aether(localRepositoryFile, settings)
        .resolve("ru.yandex.qatools.allure:allure-model:jar:1.3.9").get();
        
//as array of urls:
URL[] urls = aether(localRepositoryFile, settings)
        .resolve("ru.yandex.qatools.allure:allure-model:jar:1.3.9").getAsUrls();
        
//as class path:
String[] cp = aether(localRepositoryFile, settings)
        .resolve("ru.yandex.qatools.allure:allure-model:jar:1.3.9").getAsClassPath();
        
//as ClassLoader:
ClassLoader cl = aether(localRepositoryFile, settings)
        .resolve("ru.yandex.qatools.allure:allure-model:jar:1.3.9").getAsClassLoader();

Clay Utils

Some useful tools, such as ArchiveUtil (configurable unpack jar's), DateUtil and MapUtil.

About

Common LAYer module containing adoption of different features to ease of use

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages