Skip to content

Commit

Permalink
Update Readme to show the newer building process with Maven (#3511)
Browse files Browse the repository at this point in the history
  • Loading branch information
Double-A-92 committed Oct 8, 2021
1 parent 31d7d76 commit a17bd00
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,23 +167,47 @@ You can get started with the binary and the birds eye view in the [download sect

## Setup & Getting Started With The Code

NOTE: We are in the process of migrating from Ant to Maven, which simplifies the process for building from source. This section still refers to the process for building with Ant. See [Maven Quick Start](#maven) for the new Maven build instructions.
NOTE: *We are in the process of migrating from Ant to Maven, which simplifies the process for building from source.
See [Ant Quick Start](#quick-start-with-ant) for the legacy Ant build instructions.*

Setup is covered in depth in [this article and video](https://www.codenameone.com/blog/how-to-use-the-codename-one-sources.html). Notice that this covers debugging the simulator and working with the code that requires the Codename One plugin for NetBeans. You can install that by installing NetBeans and typing "Codename One" in the plugin search section see [the getting started tutorial](https://www.codenameone.com/getting-started.html).
The setup is covered in depth in [this article and video](https://www.codenameone.com/blog/building-codename-one-from-source-maven-edition.html).

<div>
<a href="http://www.youtube.com/watch?v=2nD75pODPWk " target="_blank"><img src="https://i.imgur.com/1lckS4d.png" alt="Using The Codename One Source Code" img width="80%"> </a>
<a href="https://www.youtube.com/watch?v=H8-QMIsTHNc " target="_blank"><img src="https://i.imgur.com/X0xzM6H.jpg" alt="Building Codename One from Source - Maven Edition
" img width="80%"> </a>
</div>

<br>
**IMPORTANT:** Building Codename One requires **JDK 8**, currently. You cannot use JDK 11 as some sub-modules must use `-source 1.5` and `-target 1.5` to maintain backward compatibility with parts of the toolchain.


### Quick Start with Maven

~~~~
git clone https://github.com/codenameone/CodenameOne
cd CodenameOne/maven
mvn install
~~~~

This will build and install Codename One in your local Maven repository. This process can take a while since it automatically downloads dependencies with a size of ~1GB.


To build the archetype projects from source, you should check out the [cn1-maven-archetypes](https://github.com/shannah/cn1-maven-archetypes) repository and build it also:

~~~~
git clone https://github.com/shannah/cn1-maven-archetypes
cd cn1-maven-archetypes
mvn install
~~~~


While Codename One itself works with all major IDE's the code in this repository was designed to work with NetBeans.
Now that Codename One is installed in your local Maven repository, you can use that version in a project instead of the release version.
A new testing project can be quickly generated with the [Codename One initializr](https://start.codenameone.com).

<img src="http://resources.jetbrains.com/storage/products/intellij-idea/img/meta/intellij-idea_logo_300x300.png" width="50"> &nbsp; &nbsp; <img src="http://codenameone.com/img/NetBeans-logo.png" width="120"> &nbsp; &nbsp; <img src="http://codenameone.com/img/eclipse-logo.png" width="120">
After downloading and extracting the project, open its pom.xml file and and look for the `<cn1.version>` and `<cn1.plugin.version>` properties.
Then change these to point to the version that got installed into your *local* maven repository by `mvn install`. The locally built version will usually be a SNAPSHOT version (e.g. 7.0.21-SNAPSHOT).

Please notice that while we fully support IntelliJ/IDEA (both CE and Ultimate), we don't support Android Studio which diverted too much from the mainline IDE.

### Quick Start
### Quick Start with Ant

**Getting and Building Sources**

Expand All @@ -209,30 +233,6 @@ You can launch the sample runner app from the command-line using:
$ ant samples
~~~

<a id="maven">

### Quick Start with Maven

IMPORTANT: Building Codename One requires JDK 8, currently. You cannot use JDK 11 as some sub-modules must use `-source 1.5` and `-target 1.5` to maintain backward compatibility with parts of the toolchain.

~~~~
git clone https://github.com/codenameone/CodenameOne
cd CodenameOne/maven
mvn install
~~~~

This will build and install Codename One in your local Maven repository.

To build the archetype projects from source, you should check out the [cn1-maven-archetypes](https://github.com/shannah/cn1-maven-archetypes) repository and build it also:

~~~~
git clone https://github.com/shannah/cn1-maven-archetypes
cd cn1-maven-archetypes
mvn install
~~~~

To get started building projects using Maven, see https://start.codenameone.com.


## ParparVM
Codename One's iOS VM is quite unique and is open source as well. You can read more about it [in its dedicated folder in this repository](https://github.com/codenameone/CodenameOne/tree/master/vm).
Expand Down

0 comments on commit a17bd00

Please sign in to comment.