Java Code Examples for org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenDependencies#createDependency()

The following examples show how to use org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenDependencies#createDependency() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ShrinkwrapArtifactResolvingHelper.java    From thorntail with Apache License 2.0 5 votes vote down vote up
public MavenDependency createMavenDependency(final ArtifactSpec spec) {
    final MavenCoordinate newCoordinate = MavenCoordinates.createCoordinate(
            spec.groupId(),
            spec.artifactId(),
            spec.version(),
            PackagingType.of(spec.type()),
            spec.classifier());
    return MavenDependencies.createDependency(newCoordinate, ScopeType.fromScopeType(spec.scope), false);
}
 
Example 2
Source File: Utils.java    From arquillian-container-chameleon with Apache License 2.0 5 votes vote down vote up
public static MavenDependency[] toMavenDependencies(String[] dependencies, String[] exclusions) {
    MavenDependencyExclusion[] mavenExclusions = toMavenExclusions(exclusions);
    MavenDependency[] mavenDependencies = new MavenDependency[dependencies.length];
    for (int i = 0; i < dependencies.length; i++) {
        mavenDependencies[i] = MavenDependencies.createDependency(
            dependencies[i],
            ScopeType.COMPILE,
            false,
            mavenExclusions);
    }
    return mavenDependencies;
}