Skip to content
Snippets Groups Projects
Commit 2fed4c66 authored by Simon Urli's avatar Simon Urli
Browse files

XWIKI-18801: Docker-based tests overriding components failing when the build...

XWIKI-18801: Docker-based tests overriding components failing when the build is executed with the "maven.build.dir" system property

  * Ensure to use the target output directory only if inside a container
    build

(cherry picked from commit 4d98bc81)
parent df4101d3
No related branches found
No related tags found
No related merge requests found
......@@ -235,7 +235,11 @@ private int extractJettyVersionFromDockerTag(String tag)
private void copyClasses(File webInfClassesDirectory, TestConfiguration testConfiguration) throws Exception
{
LOGGER.info("Copying resources to WEB-INF/classes ...");
File classesDirectory = new File(testConfiguration.getOutputDirectory(), "classes");
// if we're building a jetty standalone it means we're using a standard maven build so the classes will be built
// in target/classes directly.
String outputDirectory = (testConfiguration.getServletEngine() != ServletEngine.JETTY_STANDALONE)
? testConfiguration.getOutputDirectory() : "target";
File classesDirectory = new File(outputDirectory, "classes");
if (classesDirectory.exists()) {
copyDirectory(classesDirectory, webInfClassesDirectory);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment