Codename One online building error by terminal

I'm trying to use my CN1 account to compile online my project whit Ubuntu 16.04 LTS terminal command:

$ mvn cn1:build -Dcodename1.platform=android -Dcodename1.buildTarget=android-device

but I got this long error:

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for bo.conectica.carry:carry-common:jar:1.0-SNAPSHOT
[WARNING] 'dependencyManagement.dependencies.dependency.systemPath' for com.codenameone:codenameone-buildclient:jar refers to a non-existing file /home/synapsido/.codenameone/CodeNameOneBuildClient.jar @ bo.conectica.carry:carry:1.0-SNAPSHOT, /home/synapsido/Documentos/carry/pom.xml, line 293, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for bo.conectica.carry:carry-android:jar:1.0-SNAPSHOT
[WARNING] 'dependencyManagement.dependencies.dependency.systemPath' for com.codenameone:codenameone-buildclient:jar refers to a non-existing file /home/synapsido/.codenameone/CodeNameOneBuildClient.jar @ bo.conectica.carry:carry:1.0-SNAPSHOT, /home/synapsido/Documentos/carry/pom.xml, line 293, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for bo.conectica.carry:carry:pom:1.0-SNAPSHOT
[WARNING] 'dependencyManagement.dependencies.dependency.systemPath' for com.codenameone:codenameone-buildclient:jar refers to a non-existing file /home/synapsido/.codenameone/CodeNameOneBuildClient.jar @ line 293, column 21
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] carry                                                              [pom]
[INFO] carry-common                                                       [jar]
[INFO] carry-android                                                      [jar]
[INFO] 
[INFO] ----------------------< bo.conectica.carry:carry >----------------------
[INFO] Building carry 1.0-SNAPSHOT                                        [1/3]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] >>> codenameone-maven-plugin:7.0.36:build (default-cli) > package @ carry >>>
[INFO] 
[INFO] <<< codenameone-maven-plugin:7.0.36:build (default-cli) < package @ carry <<<
[INFO] 
[INFO] 
[INFO] --- codenameone-maven-plugin:7.0.36:build (default-cli) @ carry ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for carry 1.0-SNAPSHOT:
[INFO] 
[INFO] carry .............................................. FAILURE [ 10.155 s]
[INFO] carry-common ....................................... SKIPPED
[INFO] carry-android ...................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  12.516 s
[INFO] Finished at: 2022-01-09T21:32:07-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.codenameone:codenameone-maven-plugin:7.0.36:build (default-cli) on project carry: Execution default-cli of goal com.codenameone:codenameone-maven-plugin:7.0.36:build failed: Plugin com.codenameone:codenameone-maven-plugin:7.0.36 or one of its dependencies could not be resolved: Could not find artifact com.codenameone:codenameone-buildclient:jar:7.0.36 at specified path /home/synapsido/.codenameone/CodeNameOneBuildClient.jar -> [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/PluginResolutionException

maybe my mvn plugin version is deprecated? How to Update?


Solution 1:

That particular target doesn't seem to trigger the download of that dependency. If you run mvn verify first, or the "Run In Simulator" option in your IDE, it will cause these dependencies to be downloaded.

e.g.

mvn verify

then

mvn cn1:build -Dcodename1.platform=android -Dcodename1.buildTarget=android-device

will work.