-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The same build fails on the second run #561
Comments
Could you provide a project to reproduce the problem ? |
@gnodet OK, I'll get you a project. It will take some time. |
@suninformation you may want to try excluding the If it fixes the problem, it means the ymate maven plugin does not support being reused because persists some data across invocations and you should fix it. |
@gnodet You're right. When execute the following command, it's right for a period of time. mvnd ymate:entity -DshowOnly=true -Dmvnd.pluginRealmEvictPattern=mvn:net.ymate.maven.plugins:ymate-maven-plugin I don't quite understand how to support reuse? How can I prevent such problems from happening? Can you give me some advice? |
To be honest, I wasn't really expecting the plugin eviction to work, as this looks more like a classloading issue. I suspect the thread's ContextClassLoader is not correctly set the second time. Could you debug the plugin execution and check the TTCL's value ? |
It may also be related to the concurrency issue found in maven https://issues.apache.org/jira/browse/MNG-7156 and https://issues.apache.org/jira/browse/MNG-7285 that should be fixed in maven 3.8.5. It was included with #523 but I think I should have removed the custom |
That's good news. Now we can only wait for maven 3.8.5 to be released before problem verification. Is there any other way? I can try. |
Yes. Could you build #566 and see if you can build your project correctly ? |
@gnodet I download and switch i561 branches from https://github.com/gnodet/mvnd.git. suninformation@mintlinux:~/Workspace/goldenriver-drc-parent/goldenriver-drc$ mvnd ymate:entity
[INFO] Processing build on daemon a8dbc4c2
[INFO] Scanning for projects...
[INFO] BuildTimeEventSpy is registered.
[INFO] Task segments : [ymate:entity]
[INFO] Build maximum degree of concurrency is 1
[INFO] Total number of projects is 1
[INFO]
[INFO] ------------------< com.goldenriver:goldenriver-drc >-------------------
[INFO] Building goldenriver-drc 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- ymate-maven-plugin:1.0.0:entity (default-cli) @ goldenriver-drc ---
[INFO] Found and load the config file: /home/suninformation/Workspace/goldenriver-drc-parent/goldenriver-drc/src/main/resources/ymp-conf.properties
[INFO] Initializing ymate-platform-core-2.1.0-Release build-2022-01-05T16:55:24Z - debug:true - env:dev - PID:13398
[INFO] Initializing ymate-platform-persistence-jdbc-2.1.0-Release build-2022-01-05T16:55:24Z
[INFO] RecycleHelper has registered the number of resources to be recycled: 0
[INFO] Initialization completed, Total time: 1ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.215 s
[INFO] Finished at: 2022-01-06T02:27:08+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.ymate.maven.plugins:ymate-maven-plugin:1.0.0:entity (default-cli) on project goldenriver-drc: No suitable driver found for jdbc:mysql://192.168.3.6:3306/drc?useUnicode=true&useSSL=false&characterEncoding=UTF-8 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
suninformation@mintlinux:~/Workspace/goldenriver-drc-parent/goldenriver-drc$ mvnd -version
mvnd native client 0.7.2-SNAPSHOT-linux-amd64 (f81c974b881903465bd415d801cca1e82ce1ec0a)
Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.jansi.linux.LinuxNativePty
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: /home/suninformation/Workspace/mvnd/dist/target/mvnd-0.7.2-SNAPSHOT-linux-amd64/mvn
Java version: 11.0.13, vendor: GraalVM Community, runtime: /home/suninformation/Downloads/graalvm-ce-java11-21.3.0
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-92-generic", arch: "amd64", family: "unix" |
Did you make sure you're using the |
@gnodet I tested by recompiling the mvnd version in a new environment built on a new virtual machine. Thank you very much for your help! |
@gnodet I created a project to reproduce #561 problems, please visit https://github.com/suninformation/maven-mvnd-demo-561 |
The same command is executed successfully for the first time but is abnormal when it is executed again.
Two command execution console outputs are as follows:
The Mojo configuration is as follows:
Use the MVN command to execute successfully.
It can be seen from the error message that the runtime dependent package is not loaded normally.
The following is debug information:
The text was updated successfully, but these errors were encountered: