zlgopen / awtk-java

JAVA Binding for AWTK
GNU Lesser General Public License v2.1
7 stars 1 forks source link

maven 3.x版本不兼容 #2

Open wildfire810 opened 2 weeks ago

wildfire810 commented 2 weeks ago

[WARNING] Parameter 'tasks' is deprecated: Use {@link #target} instead. For version 3.0.0, this parameter is only defined to break the build if you use it! [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 06:34 min [INFO] Finished at: 2024-10-27T18:57:17+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run (default) on project awtk: You are using 'tasks' which has been removed from the maven-antrun-plugin. Please use 'target' and refer to the >>Major Version Upgrade to version 3.0.0<< on the plugin site. -> [Help 1] [ERROR]

wildfire810 commented 2 weeks ago

maven-antrun-plugin 插件的 3.0.0 及以上版本中,tasks 参数已被移除,您需要将配置文件中的 tasks 替换为 target 才能继续使用该插件。

要解决此问题,您可以在 pom.xml 中找到相关配置,将 <tasks> 替换为 <target>。这并不依赖于 Maven 的具体版本,而是和 maven-antrun-plugin 插件版本(您的版本是 3.1.0)有关。如果您使用的是 3.0.0 以下的插件版本,tasks 仍然可用,但建议更新到新的配置。

如果需要帮助修改配置文件,随时告诉我!

xianjimli commented 2 weeks ago

我改了 demos/pom.xml,在macos上,文件有拷贝到bin目录下,在linux还是不行。 这个我不熟悉,你方便的话,帮我改一下吧。谢谢

wildfire810 commented 2 weeks ago

我给出来我修改的例子,和你探讨一下

<?xml version="1.0" encoding="UTF-8"?>

4.0.0 org.awtk awtk_demos 1.0-SNAPSHOT jar UTF-8 org.awtk awtk 1.0 system ${basedir}/../bin/awtk.jar ${project.artifactId} #修改开始 org.apache.maven.plugins maven-compiler-plugin 23#这里可以按你要求修改,但是8可能有些过于古老了 #修改结束 maven-antrun-plugin package run #这里从tasks改为target #这里从tasks改为target
xianjimli commented 2 weeks ago

好的,谢谢。还是用cp拷贝简单