How do you add cn1libs to the CodeRAD app generated by start.codenameone.com

Viewed 25

Looking through the documentation for Codename One, the instructions for using the cn1libs indicate using the IDE plugins and the Codename One Preferences/Settings dialogs. When I follow this process and review the resulting project, I do not see any references to the libraries where I would expect to see them in the project code. Even doing a full text search through the Project does not appear to add the library as a dependency where I would expect it. I am only seeing the library name in the overview.adoc file.

Since the entire project structure is different for the CodeRAD project generated by the initializer webapp, and those projects are not recognized as Codename One projects IntelliJ (and hence do not have the Codename One Preferences/Settings dialogs available) how do we add the cn1libs to this initializer generated project?

1 Answers

In maven projects the libraries are downloaded dynamically by maven itself to the .m2 directory in your home folder. This is handled seamlessly by maven and updated when you change/refresh the pom file.

When you add a dependency on a cn1lib it's effectively a POM dependency and when you refresh or force refresh you should see maven fetching the dependency. Codename One Settings just adds a POM entry for you based on our listings, you then need to refresh the updated POM for a new version.

Related