Shortcut to deploy output of build for IT tests
To deploy the output of a build in an IT test, we typically use code such as:
@Deployment(testable = false)
public static JavaArchive createDeployment() {
return create(ZipImporter.class, getProperty("finalName") + ".jar")
.importFrom(new File("target/" + getProperty("finalName") + ".jar"))
.as(JavaArchive.class);
}
Though it's not difficult, it might be nice to have some annotation or annotations for this to declaratively state this.
This is already supported via the deploymentExportPath property of the arquillian.xml engine configuration or by setting the arquillian.deploymentExportPath system property.
See the "Export the Deployment" section of this guide: https://arquillian.org/guides/getting_started_rinse_and_repeat/#export_the_deployment
There are also deploymentExportExploded/arquillian.deploymentExportExploded boolean setting to indicate the exported test artifact should be exploded.
Do you think you need something more?
This is already supported via the deploymentExportPath property of the arquillian.xml engine configuration or by setting the arquillian.deploymentExportPath system property.
I think that's something completely else, if I'm not mistaken.
That property makes Arquillian export the archive that was used for deployment to a file, right? What I'm looking for is essentially the reverse. Whatever target Maven created is used for deployment via a simple setting or annotation.
Ah, ok, I misread the code. Maybe an importPath property on @Deployment along with an importer utility class would suffice.