0

I'm using Maven Cargo to deploy and run a war file on a WebSphere Liberty server. Below is the profile I'm using:

<profile>
    <id>integration</id>
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven2-plugin</artifactId>
                <version>1.6.11</version>
                <configuration>
                    <!-- Container configuration -->
                    <container>
                        <timeout>600000</timeout>
                        <containerId>liberty</containerId>
                        <type>installed</type>
                        <home>ServerHome</home>
                    </container>
                    <configuration>
                        <type>standalone</type>
                        <properties>
                        <cargo.servlet.port>8081</cargo.servlet.port>
                        </properties>
                        <home>ServerHome</home>
                    </configuration>
                    <deployables>
                        <deployable>
                            <artifactId>artifact</artifactId>
                            <groupId>com.group</groupId>
                            <type>war</type>
                        </deployable>
                    </deployables>
                </configuration>
            </plugin>
        </plugins>
    </build>
</profile>

It deploys to {Server Home}\servers\defaultServer\apps when I use

mvn cargo:deploy -Pintegration.

Once deployed I'm trying to run the server so that I can manually test the app using

cargo:run -Pintegration.

But it is failing with the below error

[ERROR] Starting container [org.codehaus.cargo.container.liberty.LibertyInstalledLocalContainer@38af1bf6] failed org.codehaus.cargo.container.ContainerException: Deployable [http://localhost:8081/cargocpc/index.html] failed to finish deploying within the timeout period [600000]. The Deployable state is thus unknown.

Is there something I'm missing for the server to be able to run?

Spinners
  • 1
  • 6
  • I'm not familiar with the Cargo plugin, but I would suggest using the Liberty Maven Plugin as it provides Liberty-speciifc goals to manage your runtime and deploy your apps. Is there a reason that you are using the Cargo plugin over the Liberty Maven Plugin? – Charles Nov 05 '18 at 17:21
  • Honestly I wasn't aware of it. Thanks for the tip I'll look into it. – Spinners Nov 06 '18 at 08:50

0 Answers0