Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcut to deploy output of build for IT tests #503

Open
arjantijms opened this issue Oct 9, 2023 · 3 comments
Open

Shortcut to deploy output of build for IT tests #503

arjantijms opened this issue Oct 9, 2023 · 3 comments

Comments

@arjantijms
Copy link
Contributor

arjantijms commented Oct 9, 2023

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.

@starksm64
Copy link
Member

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?

@arjantijms
Copy link
Contributor Author

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.

@starksm64
Copy link
Member

Ah, ok, I misread the code. Maybe an importPath property on @deployment along with an importer utility class would suffice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants