moving to mavin

144 views
Skip to first unread message

Dave Dyer

unread,
Mar 30, 2021, 5:04:42 PM3/30/21
to CodenameOne Discussions

What is your preferred forum for issues related to mavin?  Here? StackOverflow? Github?

Steve Hannah

unread,
Mar 30, 2021, 6:39:19 PM3/30/21
to codenameone...@googlegroups.com
Use the usual channels you would use for any issue.  Questions in forum or stack overflow.  If you have a pro account, then you can use email support.  Bugs in issue tracker (Just use main Codenameone One github repo issue tracker.. easier to keep track of them then).

Best regards

Steve

On Tue, Mar 30, 2021 at 2:04 PM Dave Dyer <daved...@gmail.com> wrote:

What is your preferred forum for issues related to mavin?  Here? StackOverflow? Github?

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/a5366caa-4d55-4fcd-8259-580372640f6fn%40googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

Dave Dyer

unread,
Mar 30, 2021, 7:38:16 PM3/30/21
to CodenameOne Discussions
Well for a start then, sample "converting kitch sink" doesn't work


Running the example from https://shannah.github.io/codenameone-maven-manual/#migrate-existing-project


[INFO] Parameter: artifactId, Value: kitchensink
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.995 s
[INFO] Finished at: 2021-03-30T15:08:19-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.0:generate (default-cli) on project standalone-pom: A Maven project already exists in the directory C:\Users\Ddyer\Downloads\kitchensink -> [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/MojoFailureException
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.815 s
[INFO] Finished at: 2021-03-30T15:08:19-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.codenameone:codenameone-maven-plugin:7.0.13:generate-app-project (default-cli) on project standalone-pom: Failed to generate project using cn1app-archetype.  Exit code 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.codenameone:codenameone-maven-plugin:7.0.13:generate-app-project (default-cli) on project standalone-pom: Failed to generate project using cn1app-archetype.  Exit code 1
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    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:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:497)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to generate project using cn1app-archetype.  Exit code 1
    at com.codename1.maven.GenerateAppProjectMojo.generateProject (GenerateAppProjectMojo.java:105)
    at com.codename1.maven.GenerateAppProjectMojo.execute (GenerateAppProjectMojo.java:839)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    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:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:497)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[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

C:\Users\Ddyer\Downloads>

Also, the "create skeleton" produces a skeleton which has errors
err.jpg

and a .bat file for windows which doesn't run:

G:\share\projects\eclipse\mtest>.\run.bat
The syntax of the command is incorrect.

G:\share\projects\eclipse\mtest>

Steve Hannah

unread,
Mar 30, 2021, 7:49:10 PM3/30/21
to codenameone...@googlegroups.com

Use the latest version.  7.0.17


Dave Dyer

unread,
Mar 30, 2021, 8:05:10 PM3/30/21
to CodenameOne Discussions
I missed sticking a windows path into the command structure, with that converting
kitchen sink runs, but the other 2 complaints stand.   The project produced has errors.

Steve Hannah

unread,
Mar 30, 2021, 8:13:00 PM3/30/21
to codenameone...@googlegroups.com
What exact command are you running?  I'll try it on my Windows machine.  The example working fine for me on Windows 10.  Might be some differences in our commands.

Dave Dyer

unread,
Mar 30, 2021, 8:22:24 PM3/30/21
to CodenameOne Discussions
run the run.bat produced by maven

Steve Hannah

unread,
Mar 30, 2021, 8:46:25 PM3/30/21
to codenameone...@googlegroups.com

Dave Dyer

unread,
Mar 30, 2021, 8:48:34 PM3/30/21
to CodenameOne Discussions
And what about the errors in the project produced when importing into eclipse?

Steve Hannah

unread,
Mar 30, 2021, 8:50:15 PM3/30/21
to codenameone...@googlegroups.com
I haven't gotten to eclipse yet.  I've been working with IntelliJ, NetBeans, and CLI so far.  Will be attacking Eclipse soon.
What errors are you getting, and in response to what commands?

Dave Dyer

unread,
Mar 30, 2021, 8:58:47 PM3/30/21
to CodenameOne Discussions
importing the project has some dangling errors.  I've tried both kitchensink and a new hello world project
err.jpg

Dave Dyer

unread,
Mar 31, 2021, 1:48:20 PM3/31/21
to CodenameOne Discussions
FYI, your conversion scripts do not appear to handle legacy scripts that have manually changed source paths.
All of my codename1 projects keep the actual sources in a separate hierarchy from the eclipse/codename1
project gubbish.

Steve Hannah

unread,
Mar 31, 2021, 1:52:38 PM3/31/21
to codenameone...@googlegroups.com
The migration tool expects source files to be in the standard locations.   If you've modified the project structure, it will be up to you to migrate it manually.

It expects source files in the src directory.
CSS files in the css directory.
native files in the native directory, etc...


Steve Hannah

unread,
Apr 1, 2021, 11:53:32 AM4/1/21
to codenameone...@googlegroups.com
Note:  Made the maven project more Eclipse friendly with 7.0.19 (available now).  You would need to run migration again.
7.0.20 will be available in a few hours with a bug fix for native interfaces on Android.

By "Eclipse Friendly", I mean that the project now contains launch files for all of the main build targets so that they will show up in the run menu - so you don't have to futz with CLI parameters for the common goals.

Steve

Dave Dyer

unread,
Apr 1, 2021, 1:54:21 PM4/1/21
to CodenameOne Discussions
in Eclipse, 7.0.20 still produces projects with errors, and a menagerie of separate projects instead of
a single rooted project.    I assume you plan to eventually make projects that eclipse will like.
err2.jpg

Steve Hannah

unread,
Apr 1, 2021, 2:29:41 PM4/1/21
to codenameone...@googlegroups.com
Ignore the project errors.  Those are there to make Eclipse users feel at home.  There should now be short-cuts to the common build goals in the run menu.
image.png

I'm surprised you got 7.0.20 working at all.  It doesn't look like it's made it to maven central yet.


Dave Dyer

unread,
Apr 1, 2021, 3:32:29 PM4/1/21
to CodenameOne Discussions
The items are there, but they don't work as far as I can tell.  (this example for the converted kitchen sink project

[ERROR] Failed to execute goal com.codenameone:codenameone-maven-plugin:7.0.20:generate-gui-sources (generate-gui-sources) on project sink-common: Execution generate-gui-sources of goal com.codenameone:codenameone-maven-plugin:7.0.20:generate-gui-sources failed: Plugin com.codenameone:codenameone-maven-plugin:7.0.20 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.8.0 at specified path C:\Program Files\Java\jre1.8.0_144/../lib/tools.jar -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.codenameone:codenameone-maven-plugin:7.0.20:generate-gui-sources (generate-gui-sources) on project sink-common: Execution generate-gui-sources of goal com.codenameone:codenameone-maven-plugin:7.0.20:generate-gui-sources failed: Plugin com.codenameone:codenameone-maven-plugin:7.0.20 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.8.0 at specified path C:\Program Files\Java\jre1.8.0_144/../lib/tools.jar
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)

Steve Hannah

unread,
Apr 1, 2021, 4:02:54 PM4/1/21
to codenameone...@googlegroups.com
Right now, you need to make sure the root module is selected in the package manager before selecting one of these options because all "mvn" commands must be run from this directory.  I'm working on getting Eclipse to not require this, but so far it has been uncooperative.

Dave Dyer

unread,
Apr 1, 2021, 4:14:03 PM4/1/21
to CodenameOne Discussions
All the entries have the same names, not per project, so if I have both a hello world and a kitchen sink
project open in the workspace, there are two of everthing in the debug-as menu

Still do not work - the javase project is one of the 4 that have errors
[INFO] Reactor Summary:
[INFO]
[INFO] mtest .............................................. SUCCESS [  0.000 s]
[INFO] mtest-common ....................................... FAILURE [  2.678 s]
[INFO] mtest-javase ....................................... SKIPPED

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

Steve Hannah

unread,
Apr 1, 2021, 4:45:01 PM4/1/21
to codenameone...@googlegroups.com
I'm open to suggestions on how to make things easier for Eclipse users.  The launch options seemed like the way to go, but now I'm not so sure.  Each IDE has its own way of working with Maven projects.  IntelliJ's support is by far the best.  NetBeans is pretty good.  Eclipse, so far, leaves much to be desired.  If you have used any other Maven projects in eclipse that provide multiple build options in a nice way, I'd be interested to hear about them.

Both NetBeans and IntelliJ allow me to add "actions/configurations" to the project directory that will be picked up by the IDE to add the appropriate UI options (build options) only for that project.  So far I haven't found a nice way to do that in Eclipse.  Launch options is close, but now that you raise the issue of multiple projects in a workspace, it has some problems.

Dave Dyer

unread,
Apr 1, 2021, 4:49:27 PM4/1/21
to CodenameOne Discussions
Hoping to help the process, I'm updating my eclipse ide to the latest version.  This time I noticed
this in the import error window.

No marketplace entries found to handle codenameone-maven-plugin:7.0.19:compliance-check in Eclipse.  Please see Help for more information.

Dave Dyer

unread,
Apr 1, 2021, 4:51:22 PM4/1/21
to CodenameOne Discussions
I'm not an eclipse guru, but it would definitely help if the names the launch options
included the name of the project they are launching.

Steve Hannah

unread,
Apr 1, 2021, 4:53:14 PM4/1/21
to codenameone...@googlegroups.com

Dave Dyer

unread,
May 5, 2021, 4:48:07 PM5/5/21
to CodenameOne Discussions


There apparently hasn't been any progress on making the Mavin builds available with Eclipse ? or did I miss something.
The initializer still produces projects that eclipse opens with errors.
Reply all
Reply to author
Forward
0 new messages