如何在 Netbeans 中获取 CodenameOne Maven 项目 运行

How to get CodenameOne Maven Project Running in Netbeans

感谢 Steve 的 CN1 ant 到 maven 迁移工具和视频 here. - Has anyone been able to run the Kitchen Sink project in Netbeans after migration? I follow the video instructions with the migration tool and migrate successfully and it runs from command line with ./run.sh but when I go to run it in NetBeans, I had a lot of 501 (https needed) errors. Added umer's code from 并且解决了 501 错误但现在得到:

  1. com.codenameone:codenameone-javase:jar:7.0.23 和
  2. 的 POM 无效
  3. 未绑定 org.codehaus.plexus.languages.java.jpms.LocationManager 的实现。 在定位 org.apache.maven.plugin.surefire.SurefirePlugin.

注意无效 POM 警告...

------------------------------------------------------------------------
Building kitchensink-common 1.0-SNAPSHOT
------------------------------------------------------------------------

--- properties-maven-plugin:1.0.0:read-project-properties (default) @ kitchensink-common ---

--- codenameone-maven-plugin:7.0.23:generate-gui-sources (generate-gui-sources) @ kitchensink-common ---
The POM for com.codenameone:codenameone-javase:jar:7.0.23 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
Generating GUI sources
No GUI Entries available

运行 来自命令行,无效 POM 警告消失:

[INFO] -----------< com.codename1.demos.kitchen:kitchensink-common >-----------
[INFO] Building kitchensink-common 1.0-SNAPSHOT                           [4/5]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- properties-maven-plugin:1.0.0:read-project-properties (default) @ kitchensink-common ---
[INFO] 
[INFO] --- codenameone-maven-plugin:7.0.23:generate-gui-sources (generate-gui-sources) @ kitchensink-common ---
Generating GUI sources
No GUI Entries available

运行 在 MacOSX 上的 apache-maven-3.8.1 Java 版本:1.8.0_172 欢迎提出建议。

谢谢,迈克

我想可能是我检测最新版cn1的方法有问题。它选择了今天早上发布的 7.0.23。但是后来找不到一些罐子。

如果您再次尝试 运行 该项目,它可能会起作用,因为它现在应该已完全传播到 Maven Central。

问题已解决,从 Netbeans 8.2 更新到最新的 Netbeans 版本(当前为 12.3)。