Skip to content

Commit

Permalink
Issue #7970 fix Maven having trouble to find correct method to use fr…
Browse files Browse the repository at this point in the history
…om parent class (#8268)

Signed-off-by: Olivier Lamy <[email protected]>
  • Loading branch information
olamy authored Jul 7, 2022
1 parent 93be234 commit c6264ab
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,4 +503,11 @@ public void initCDI()
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);
}

}

0 comments on commit c6264ab

Please sign in to comment.