Package org.jboss.shrinkwrap.resolver.api.maven.coordinate

Examples of org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenDependencyExclusion


     */
    private MavenDependencyExclusion[] getMavenDependencyExclusions(String[] exclusions) {
        final int numExclusions = exclusions.length;
        final MavenDependencyExclusion[] depExclusions = new MavenDependencyExclusion[numExclusions];
        for (int i = 0; i < numExclusions; i++) {
            final MavenDependencyExclusion depExclusion = MavenDependencies.createExclusion(exclusions[i]);
            depExclusions[i] = depExclusion;
        }
        return depExclusions;
    }
View Full Code Here


     *
     */
    @Test
    public void exclusion() {

        final MavenDependencyExclusion exclusion = MavenDependencies
            .createExclusion("org.jboss.shrinkwrap.test:test-deps-f");
        final MavenDependency dependency = MavenDependencies.createDependency(
            "org.jboss.shrinkwrap.test:test-dependency-test:jar:1.0.0", ScopeType.TEST, false, exclusion);

        // FIXME in Maven 3.1.x, scope of resolved dependencies is compile
View Full Code Here

     *
     */
    @Test
    public void exclusions() {

        final MavenDependencyExclusion exclusion = MavenDependencies
            .createExclusion("org.jboss.shrinkwrap.test:test-deps-f");
        final MavenDependencyExclusion exclusion2 = MavenDependencies
            .createExclusion("org.jboss.shrinkwrap.test:test-deps-g");
        final MavenDependency dependency = MavenDependencies.createDependency(
            "org.jboss.shrinkwrap.test:test-dependency-test:1.0.0", ScopeType.TEST, false, exclusion, exclusion2);

        // FIXME in Maven 3.1.x, scope of resolved dependencies is compile
View Full Code Here

     * Tests exclusion of all transitive artifacts
     */
    @Test
    public void universalExclusion() {

        final MavenDependencyExclusion exclusion = MavenDependencies.createExclusion("*:*");
        final MavenDependency dependency = MavenDependencies.createDependency(
            "org.jboss.shrinkwrap.test:test-dependency-test:1.0.0", ScopeType.TEST, false, exclusion);

        File file = Resolvers.use(MavenResolverSystem.class).loadPomFromFile("target/poms/test-parent.xml")
            .addDependency(dependency).resolve().using(new AcceptScopesStrategy(ScopeType.TEST)).asSingle(File.class);
View Full Code Here

     * Resolve an artifact with transitive dependencies using extra exclusion
     */
    @Test
    public void transitiveArtifactExtraExclusion() {

        final MavenDependencyExclusion exclusion = MavenDependencies.createExclusion("GA");
        final MavenDependency dependency = MavenDependencies.createDependency("GAV", null, false, exclusion);

        @SuppressWarnings("unused")
        final File[] longhand = Resolvers.use(MavenResolverSystem.class).addDependency(dependency).resolve().withTransitivity()
                .as(File.class);
View Full Code Here

     * Resolve artifacts with transitive dependencies using extra exclusions
     */
    @Test
    public void transitiveArtifactsExtraExclusions() {

        final MavenDependencyExclusion exclusion = MavenDependencies.createExclusion("GA");
        final MavenDependencyExclusion exclusion2 = MavenDependencies.createExclusion("GA");
        final MavenDependency dependency = MavenDependencies.createDependency("GAV", null, false, exclusion, exclusion2);

        @SuppressWarnings("unused")
        final File[] shorthand = Maven.resolver().addDependency(dependency).resolve().withTransitivity().as(File.class);
    }
View Full Code Here

    }

    private static final MavenDependencyExclusion[] TYPESAFE_EXCLUSIONS_ARRAY = new MavenDependencyExclusion[] {};

    public static MavenDependencyExclusion fromExclusion(final org.apache.maven.model.Exclusion exclusion) {
        final MavenDependencyExclusion translated = MavenDependencies.createExclusion(exclusion.getGroupId(),
                exclusion.getArtifactId());
        return translated;
    }
View Full Code Here

                exclusion.getArtifactId());
        return translated;
    }

    public static MavenDependencyExclusion fromExclusion(final Exclusion exclusion) {
        final MavenDependencyExclusion translated = MavenDependencies.createExclusion(exclusion.getGroupId(),
                exclusion.getArtifactId());
        return translated;
    }
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenDependencyExclusion

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.