0

I am trying to debug why I am getting a 404 when trying to access the url of the war I run using maven cargo with Tomcat container. I suspect the war is not starting up and need to check the localhost log file to debug the issue. I do not see any errors in cargo log.

I cannot find the localhost log file in the target/cargo/configurations/tomcat8x/logs folder. The deployment is going successfully. Do you know where I can find the file or better way to debug the issue?

Snippet of the maven cargo plugin configuration

    <plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven2-plugin</artifactId>

                <configuration>
                    <container>
                        <containerId>${tomcat.containerId}</containerId>
                        <log>${project.build.directory}/cargo/logs/cargo.log</log>
                        <output>${project.build.directory}/cargo/logs/container.log</output>
                        <logLevel>debug</logLevel>

                        <artifactInstaller>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat</artifactId>
                            <version>${tomcat.version}</version>

                        </artifactInstaller>
MONTEREY01
  • 49
  • 1
  • 1
  • 6

1 Answers1

2

In such case I try to check war status and its context in Tomcat console.

For Tomcat7:

  • Define Tomcat user in Cargo which will have role manager-gui. See cargo.servlet.users property here.
  • When starting container use Cargo goal "run" - it will just start container and then it will wait on you.
  • After you start container log into Tomcat console, for example on URL http://localhost:8080/manager/html , there you can see if your war runs and what is its path.
Karel Suta
  • 179
  • 5