0

I want to deploy my application in a tomcat server during integration tests. This works fine. I am struggling with copying the keycloak-adapter-core to the folder: \target\cargo\installs\tomcat-8.5.9\apache-tomcat-8.5.9\lib

If I copy the files manually, my application runs. I would like to know how to copy these files automatically. Or find a smart way how to download them to the lib folder directory, before the integration test is conducted.

This is the part of my pom.xml

<plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven2-plugin</artifactId>
                <version>${version.cargo-maven2-plugin}</version>

                <configuration>
                    <container>
                        <containerId>tomcat8x</containerId>

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

                        <!-- <log>${project.build.directory}/cargo/cargo.log</log> -->
                        <output>${project.build.directory}/cargo/container.log</output>
                    </container>
                    <configuration>
                        <properties>
                            <cargo.servlet.port>8080</cargo.servlet.port>
                            <cargo.jvmargs>${argLine}</cargo.jvmargs>
                            <!-- <cargo.logging>low</cargo.logging> -->
                            <!-- <cargo.jvmargs>-XX:MaxPermSize=512m -Xms256m -Xmx3072m</cargo.jvmargs> -->
                        </properties>

                    </configuration>
                    <deployables>
                        <deployable>
                            <location>${project.build.directory}/${project.build.finalName}.${project.packaging}</location>
                        </deployable>
                    </deployables>
                </configuration>

                <executions>
                    <execution>


                        <configuration>
                            <container>
                                <timeout>240000</timeout>
                            </container>
                        </configuration>

                        <id>start-server</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>start</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>stop-server</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
DavidBoe
  • 21
  • 3

0 Answers0