Issue #7970 fix Maven having trouble to find correct method to use from parent class (#8268)

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
This commit is contained in:
Olivier Lamy 2022-07-07 22:07:57 +10:00 committed by GitHub
parent 93be234873
commit c6264abed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 0 deletions

View File

@ -60,6 +60,31 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-random-dependency</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>@junit.version@</version>
<type>jar</type>
<outputDirectory>${project.build.directory}/dependency</outputDirectory>
<destFileName>junit-jupiter-engine.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
@ -92,6 +117,9 @@
<goal>start</goal>
</goals>
<configuration>
<webApp>
<extraClasspath>${project.build.directory}/dependency/junit-jupiter-engine.jar</extraClasspath>
</webApp>
<contextXml>${basedir}/src/config/context.xml</contextXml>
<systemProperties>
<jetty.port.file>${jetty.port.file}</jetty.port.file>

View File

@ -503,4 +503,11 @@ public class MavenWebAppContext extends WebAppContext
LOG.warn("Problem initializing cdi", e);
}
}
// need to be overridden to avoid Maven reflection issues with super class and override method
public void setExtraClasspath(String extraClasspath) throws IOException
{
super.setExtraClasspath(extraClasspath);
}
}