Skip to content
Snippets Groups Projects
Commit a223b3db authored by Vincent Massol's avatar Vincent Massol
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
parent c24e8220
No related branches found
No related tags found
No related merge requests found
......@@ -168,7 +168,7 @@ public void build() throws Exception
// Step: Copy target/classes to WEB-INF/classes to allow docker tests to provide custom java code that is
// deployed in the custom WAR.
File webInfClassesDirectory = new File(webInfDirectory, "classes");
copyClasses(webInfClassesDirectory);
copyClasses(webInfClassesDirectory, this.testConfiguration);
// Step: Add the webapp resources (web.xml, templates VM files, etc)
copyWebappResources(this.testConfiguration, warDependencies, this.targetWARDirectory);
......@@ -232,11 +232,12 @@ private int extractJettyVersionFromDockerTag(String tag)
return result;
}
private void copyClasses(File webInfClassesDirectory) throws Exception
private void copyClasses(File webInfClassesDirectory, TestConfiguration testConfiguration) throws Exception
{
File sourceDirectory = new File("target/classes");
if (sourceDirectory.exists()) {
copyDirectory(new File("target/classes"), webInfClassesDirectory);
LOGGER.info("Copying resources to WEB-INF/classes ...");
File classesDirectory = new File(testConfiguration.getOutputDirectory(), "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