This sample shows how to deploy the current artifact (EAR or WAR) to a target environment.

<plugins>
    <plugin>
        <groupId>com.xebialabs.xldeploy</groupId>
        <artifactId>xldeploy-maven-plugin</artifactId>
        <version>6.0.0</version>
        <executions>
            <execution>
                <id>deployit-plugin-test</id>
                <phase>pre-integration-test</phase>
                <goals>
                    <goal>deploy</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <environmentId>Environments/MyProjectEnvironment</environmentId>
        </configuration>
    </plugin>
</plugins>

Shows how to customize the current artifact (ear or war) deployable definition.

<plugins>
    <plugin>
        <groupId>com.xebialabs.xldeploy</groupId>
        <artifactId>xldeploy-maven-plugin</artifactId>
        <version>6.0.0</version>
        <executions>
            <execution>
                <id>deployit-plugin-test</id>
                <phase>pre-integration-test</phase>
                <goals>
                    <goal>deploy</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <deployables>
                <!-- artifactId must be the same name as artifact id defined for this pom -->
                <wls.War artifactId="petclinic">
                    <stageMode>stage</stageMode>
                </wls.War>
            </deployables>
            <environmentId>Environments/MyProjectEnvironment</environmentId>
        </configuration>
    </plugin>
</plugins>