Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Commit

Permalink
Functional tests: fix DeploymentResolver to produce war with artifact…
Browse files Browse the repository at this point in the history
…'s original name, not test.war
  • Loading branch information
Ron Smeral authored and mareknovotny committed Jul 4, 2013
1 parent d9f7abe commit ef5671a
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -20,7 +20,8 @@ public static Archive<?> createDeployment() {
PomEquippedResolveStage mvn = Maven.resolver().loadPomFromFile("pom.xml", profiles);

// resolves an artifact with coordinates given in property DEPLOYMENT_ARTIFACT in /ftest.properties
MavenResolvedArtifact artifact = mvn.resolve(SeamGrapheneTest.getProperty("DEPLOYMENT_ARTIFACT")).withoutTransitivity().asSingleResolvedArtifact();
MavenResolvedArtifact artifact = mvn.resolve(SeamGrapheneTest.getProperty("DEPLOYMENT_ARTIFACT"))
.withoutTransitivity().asSingleResolvedArtifact();

// use correct archive type
PackagingType packaging = artifact.getCoordinate().getPackaging();
Expand All @@ -31,6 +32,7 @@ public static Archive<?> createDeployment() {

// this is ugly due to ARQ-1390; need to get rid of dots in archive name, otherwise it would be
// return ShrinkWrap.createFromZipFile(deploymentClass, artifact.asFile()).as(deploymentClass);
return ShrinkWrap.create(ZipImporter.class, "test." + packaging).importFrom(artifact.asFile()).as(deploymentClass);
return ShrinkWrap.create(ZipImporter.class, artifact.getCoordinate().getArtifactId() + "." + packaging)
.importFrom(artifact.asFile()).as(deploymentClass);
}
}

0 comments on commit ef5671a

Please sign in to comment.