Hi, zhao,

IIRC, it seems that the error occurred because you ran the test
before packaging. While running <copy-dependencies> in
flink-clients/pom.xml, maven can not find the packages.

Based on your command, it seems that you want to run the tests.
Have you tried running "mvn clean package" or "mvn clean install"
directly instead of the complicated commands? If you do so, the tests
will run automatically. If you don't want to run the tests, you can try
using "mvn clean package -DskipTests" or "mvn clean install -DskipTests".

Best,
Yuxin


zbz-163 <zhao_abc_...@163.com> 于2023年11月9日周四 15:33写道:

> Dear Flink Community,
>
> I am using Java 1.8.0_ 202 and Maven 3.8.8 build Flink 1.18, but
> encountered an error :
> ```
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-dependency-plugin:3.2.0:copy-dependencies
> (copy-dependencies) on project flink-clients: Artifact has not been
> packaged yet. When used on reactor artifact, copy should be executed after
> packaging: see MDEP-187. -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal
> org.apache.maven.plugins:maven-dependency-plugin:3.2.0:copy-dependencies
> (copy-dependencies) on project flink-clients: Artifact has not been
> packaged yet. When used on reactor artifact, copy should be executed after
> packaging: see MDEP-187.
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2
> (MojoExecutor.java:375)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute
> (MojoExecutor.java:351)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:215)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:171)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:163)
>     at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:117)
>     at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:81)
>     at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
> (SingleThreadedBuilder.java:56)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:128)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
>
> ```
>
> The command executed is :
> ```
> ./mvnw clean test -e -DforkCount=2 -DreuseForks=true
> -Dmaven.test.failure.ignore=true -pl '!flink-docs' -Dflink.forkCount=4
> -Dflink.forkCountTestPackage=4 -B -nsu -Dskip.npm -Dscala-2.12
> -Ddeprecated.check.skip=true -Dcheckstyle.skip=true
> ```
>
> Could you advise on the proper way to address this issue?
>
>
> Best,
> Zbz
>

Reply via email to