Open tnmtechnologies opened 1 year ago
After upgrading maven from 3.8.x to 3.9.1, the following build error occurs:
[ERROR] Failed to execute goal ch.mfrey.maven.plugin:copy-maven-plugin:1.0.0:copy (copy-youtube-video-player-images-for-war) on project my-project: Execution copy-youtube-video-player-images-for-war of goal ch.mfrey.maven.plugin:copy-maven-plugin:1.0.0:copy failed: A required class was missing while executing ch.mfrey.maven.plugin:copy-maven-plugin:1.0.0:copy: org/codehaus/plexus/util/FileUtils [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>ch.mfrey.maven.plugin:copy-maven-plugin:1.0.0 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/v:/maven/.m2/repository/ch/mfrey/maven/plugin/copy-maven-plugin/1.0.0/copy-maven-plugin-1.0.0.jar [ERROR] urls[1] = file:/v:/maven/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar [ERROR] Number of foreign imports: 1
A workaround is to add org.codehaus.plexus:plexus-utils:3.5.0 artifact as dependency of the plugin ch.mfrey.maven.plugin:copy-maven-plugin as follows:
<plugin> <groupId>ch.mfrey.maven.plugin</groupId> <artifactId>copy-maven-plugin</artifactId> <version>1.0.0</version> <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> <version>3.5.0</version> </dependency> </dependencies> </plugin>
After upgrading maven from 3.8.x to 3.9.1, the following build error occurs:
Workaround
A workaround is to add org.codehaus.plexus:plexus-utils:3.5.0 artifact as dependency of the plugin ch.mfrey.maven.plugin:copy-maven-plugin as follows: