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

Examples of org.jboss.shrinkwrap.resolver.api.maven.MavenResolvedArtifact.asFile()


        MavenResolvedArtifact ejb = Maven.resolver().resolve("org.wicketstuff:javaee-inject-example-ejb:ejb:6.15.0")
                .withoutTransitivity()
                .asSingleResolvedArtifact();

        Assert.assertThat(ejb, not(nullValue()));
        Assert.assertThat(ejb.asFile(), not(nullValue()));
        Assert.assertThat(ejb.getExtension(), is("jar"));
        Assert.assertThat(ejb.getCoordinate().getPackaging(), is(PackagingType.EJB));
    }

    // SHRINKRES-182
View Full Code Here


                .resolve("org.jboss.shrinkwrap.test:test-ejb:ejb:1.0.0")
                .withoutTransitivity()
                .asSingleResolvedArtifact();

        Assert.assertThat(ejb, not(nullValue()));
        Assert.assertThat(ejb.asFile(), not(nullValue()));
        Assert.assertThat(ejb.getExtension(), is("jar"));
        Assert.assertThat(ejb.getCoordinate().getPackaging(), is(PackagingType.EJB));
    }

    // SHRINKRES-182
View Full Code Here

                .loadPomFromFile("target/poms/test-deps-ejb.xml")
                .importCompileAndRuntimeDependencies()
                .resolve().withTransitivity().asSingleResolvedArtifact();

        Assert.assertThat(ejb, not(nullValue()));
        Assert.assertThat(ejb.asFile(), not(nullValue()));
        Assert.assertThat(ejb.getExtension(), is("jar"));
        Assert.assertThat(ejb.getCoordinate().getPackaging(), is(PackagingType.EJB));
        new ValidationUtil("test-ejb").validate(ejb.asFile());

    }
View Full Code Here

        Assert.assertThat(ejb, not(nullValue()));
        Assert.assertThat(ejb.asFile(), not(nullValue()));
        Assert.assertThat(ejb.getExtension(), is("jar"));
        Assert.assertThat(ejb.getCoordinate().getPackaging(), is(PackagingType.EJB));
        new ValidationUtil("test-ejb").validate(ejb.asFile());

    }
}
View Full Code Here

                .loadPomFromFile("target/poms/test-tests-classifier.xml")
                .resolve("org.jboss.shrinkwrap.test:test-dependency-with-test-jar:test-jar:tests:1.0.0")
                .withoutTransitivity()
                .asSingleResolvedArtifact();

        new ValidationUtil("test-dependency-with-test-jar").validate(artifact.asFile());

        Assert.assertEquals("jar", artifact.getExtension());
        Assert.assertEquals("tests", artifact.getCoordinate().getClassifier());
        Assert.assertEquals(PackagingType.TEST_JAR, artifact.getCoordinate().getPackaging());
    }
View Full Code Here

        final String version = coordinate.getVersion();
        final String resolvedVersion = shortcut.getResolvedVersion();
        final String type = coordinate.getType().toString();
        final boolean isSnapshot = shortcut.isSnapshotVersion();
        final String classifier = coordinate.getClassifier();
        final File file = shortcut.asFile();
        final File file2 = shortcut.as(File.class);
        final InputStream in = shortcut.as(InputStream.class);
        final InputStream in2 = shortcut.as(InputStream.class);
        final JavaArchive archive = shortcut.as(JavaArchive.class);
    }
View Full Code Here

        // picks it up)
        final MavenResolvedArtifact artifact = Maven.resolver().loadPomFromFile("pom.xml")
                .resolve("org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:" + expectedVersion)
                .withoutTransitivity().asSingleResolvedArtifact();

        final String resolvedFilename = artifact.asFile().getName();

        Assert.assertTrue("Incorrect version was resolved", resolvedFilename.contains(expectedVersion));
    }

}
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.