This project includes maven archetypes for Codename One.
There are two fundamental project types:
- Codename One Applications
-
A multi-module Maven project for developing cross-platform mobile applications in Codename One.
- Codename One Libraries
-
A multi-module Maven project for developing Codename One libraries (.cn1libs).
Use the cn1app-archetype
to create a new application project. Below is the full mvn archetype:generate
command.
mvn archetype:generate \
-DarchetypeGroupId=com.codenameone \
-DarchetypeArtifactId=cn1app-archetype \
-DarchetypeVersion=LATEST \
-DartifactId=$YOUR_PROJECT_ARTIFACT_ID \
-DgroupId=$YOUR_PROJECT_GROUP_ID \
-Dversion=$YOUR_PROJECT_VERSION \
-DmainName=$YOUR_MAIN_CLASS_NAME \
-DuseInteractiveMode=false
Tip
|
If you don’t want to remember this whole command, you can simply run mvn archetype:generate \
-DarchetypeGroupId=com.codenameone
-DarchetypeArtifactId=cn1app-archetype or Even just |
If archetype:generate
completes successfully, you will find your new project in the current working directory in a directory named after the artifactId you supplied for the project using the -DartifactId
parameter. The project will contain the following useful files to get you started:
- README.adoc
-
A readme file with useful information about the project layout and instructions for running and building your project.
- run.sh/run.bat
-
Bash and windows batch files for running the project. (These are just thin wrappers around Maven).
- build.sh/build.bat
-
Bash and windows batch files for building the project. (These are just thin wrappers around Maven).
This section includes information for developing this project. This includes activities like creating new archetypes, building from source, and deploying archetypes to Maven Central.
Important
|
This project should be re-deployed to maven central to correspond with each Codename One release. See lhttps://github.com/codenameone/CodenameOne/tree/master/maven#deploying-to-maven-central[Release Instructions] release instructions. |