Skip to main content
Jump to: navigation, search

Difference between revisions of "OM2M/Download"

(Replaced content with "{{CTable}} |- | [https://www.eclipse.org/downloads/download.php?file=/om2m/releases/0.8.0/OM2M_0.8.0.zip OM2M_0.8.0] || 31 || Wed, 8 April 2015 |}")
Line 1: Line 1:
In this tutorial, you can download already built OM2M binaries or learn how to build OM2M from source code by yourself using command line or Eclipse.
+
{{CTable}}
 
+
|-
__TOC__
+
| [https://www.eclipse.org/downloads/download.php?file=/om2m/releases/0.8.0/OM2M_0.8.0.zip OM2M_0.8.0]  || 31 || Wed, 8 April 2015
 
+
|}
= Prerequisites =
+
* JAVA 1.7 or later is required to run OM2M.
+
* Apache Maven 3 or later is required to build OM2M.
+
 
+
= Download latest OM2M release =
+
* Download OM2M release from this link: [https://www.eclipse.org/downloads/download.php?file=/om2m/releases/0.8.0/OM2M_0.8.0.zip OM2M_0.8.0].
+
* Extract the archive. You will find the NSCL and GSCL products.
+
* Use start.bat for windows or start.sh for linux to start NSCL and GSCL. '''(JAVA 1.7 is required to run OM2M)'''
+
* More information about OM2M configuration are available on this tutorial: [https://wiki.eclipse.org/OM2M/Configuration Configure OM2M]
+
* More information about OM2M startup are available on this tutorial: [https://wiki.eclipse.org/OM2M/Starting Startup OM2M]
+
 
+
= Clone and build OM2M using Command line =
+
 
+
== Clone OM2M using command line ==
+
 
+
* '''Git is required to clone OM2M.'''
+
* Clone the OM2M project using git with the following command:
+
<pre>
+
git clone http://git.eclipse.org/gitroot/om2m/org.eclipse.om2m.git
+
</pre>
+
 
+
== build OM2M using command line ==
+
* '''Maven 3 is required to build OM2M.'''
+
* Go to "org.eclipse.om2m" directory.
+
* Build OM2M using the following command: (An internet connection is required to download required dependencies)
+
<pre>
+
mvn clean install
+
</pre>
+
 
+
* Two Eclipse products will be generated after a successful built:
+
** The NSCL product can be found on this directory: "om2m/org.eclipse.om2m/org.eclipse.om2m.site.nscl/target/products/nscl/<os>/<ws>/<arch>"
+
** The GSCL product can be found on this directory: "om2m/org.eclipse.om2m/org.eclipse.om2m.site.gscl/target/products/gscl/<os>/<ws>/<arch>"
+
 
+
= Clone and build OM2M using Eclipse IDE =
+
 
+
== Install Eclipse IDE ==
+
* Install Eclipse Kepler (Eclipse for RCP and RAP Developers).
+
* You can download it from this link: https://www.eclipse.org/downloads/packages/eclipse-rcp-and-rap-developers/keplersr2
+
 
+
== Configure Maven Proxy (Only if requried) ==
+
 
+
If you are required to use a proxy server to access the Internet, then you have to configure maven proxy settings as follows:
+
 
+
* Select Window -> Preferences -> Maven -> User settings
+
* You will find the warning message "''settings.xml file doesn't exist''" .
+
* Move to the .m2 directory location and create the settings.xml file and put this snippet.
+
<pre>
+
<settings>
+
  <proxies>
+
  <proxy>
+
      <active>true</active>
+
      <protocol>http</protocol>
+
      <host>proxy-host</host>
+
      <port>proxy-port</port>
+
    </proxy>
+
  </proxies>
+
</settings>
+
</pre>
+
 
+
== Install Tycho plugin ==
+
 
+
=== Tycho quick install using Eclipse Maven Marketplace ===
+
* Click Window -> Preferences -> maven -> discovery -> open catalog and type Tycho. Check the “Tycho Configurator” checkbox.
+
[[File:git_clone5bis.png|thumb|center|600px|Eclipse Maven marketplace]]
+
 
+
=== Tycho Manual install using the Eclipse Update repository (Only if requried) ===
+
 
+
It happens that the Tycho plugin do not appears in the Eclipse Maven marketplace, then you have to install it manually using the following steps
+
 
+
* Select Help -> Install New Software.
+
* Click on the Add button.
+
[[File:tycho_install1.png|thumb|center|600px|Tycho install]]
+
 
+
* Put in the ''name field'' "tycho0.8" and in the ''location filed'' this url "http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-tycho/0.8.0/N/LATEST/"
+
* Press on on ok button and check the "m2e extensions" and "Tycho Project Configurators" checkboxes and click on next.
+
[[File:tycho_install2.png|thumb|center|600px|Tycho install]]
+
 
+
* Select the "Tycho Project Configurators" and click on Next.
+
[[File:tycho_install3.png|thumb|center|600px|Tycho install]]
+
 
+
* Accept the terms of use and click on Finish.
+
 
+
* Update your project: Select the package "org.eclipse.om2m" -> right click -> maven -> update Project.
+
 
+
== Clone OM2M using Eclipse ==
+
* Select Windiow->Show View -> Other .
+
* In the dialog box, select the Git view.
+
* Click on “Clone a Git repository”.
+
[[File:Git_clone.png|thumb|center|350px|Git clone]]
+
 
+
* Clone the OM2M project using the following link: http://git.eclipse.org/gitroot/om2m/org.eclipse.om2m.git. In the first page, enter the mentioned link in the URI’s location field. Click Next .[[File:git_clonebis.png|thumb|center|600px|Git clone]]
+
 
+
* In the second page, keep the “master” branch checkbox selected and click Next.
+
[[File:git_clone2bis.png|thumb|center|600px|Git clone]]
+
 
+
* In the third page, check the “import all existing projects after clone finishes” and click “Finish”.
+
[[File:git_clone3bis2.png|thumb|center|600px|Git clone]]
+
 
+
* The OM2M project is now cloned and is visible on the Git repositories’ and Package’ explorers.
+
 
+
== Build OM2M using Eclipse ==
+
 
+
* Select “org.eclipse.om2m” package and right click. Select “Run as -> maven install”.
+
* Two Eclipse products will be generated after a successful built:
+
** The NSCL product can be found on this directory: "om2m/org.eclipse.om2m/org.eclipse.om2m.site.nscl/target/products/nscl/<os>/<ws>/<arch>"
+
** The GSCL product can be found on this directory: "om2m/org.eclipse.om2m/org.eclipse.om2m.site.gscl/target/products/gscl/<os>/<ws>/<arch>"
+
 
+
== Test OM2M ==
+
 
+
* '''JAVA 1.7 is required to run OM2M.'''
+
* Go to the NSCL product directory: "om2m/org.eclipse.om2m/org.eclipse.om2m.site.nscl/target/products/nscl/<os>/<ws>/<arch>".
+
* Start the NSCL directly by executing the nscl native launcher. The executable file is called "nscl.exe" on windows, and is called "nscl" on Linux and Mac OS.
+
 
+
* You can also start the NSCL by invoking the JVM manually as follows:
+
<pre>
+
java -jar -ea -Declipse.ignoreApp=true -Dosgi.clean=true -Ddebug=true plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar -console -noExit
+
</pre>
+
 
+
* Once the NSCL is started, you will see an OSGi console. You can type “ss” to report a summary status of all installed bundles. Type "exit" to shutdown.
+
[[File:OM2M-start-NSCL.jpg|center|600px|thumb|NSCL OSGi console]]
+
 
+
* Open your browser and connect to the address "127.0.0.1:8080" to access the NSCL web interface.
+
* Enter username "admin" and password "admin" then click on login button to display the NSCL resource tree.
+
 
+
[[File:OM2M-web-authentication.jpg|center|300px|thumb|NSCL web interface: authentication]]
+
 
+
* After a successful authentication, the NSCL resource will be displayed. You can see the "nscl" SclBase sub-resources and attributes.
+
 
+
[[File:OM2M-web-nscl.jpg|center|500px|thumb|NSCL web interface: nscl sclBase resource]]
+
 
+
* '''Congratulation !! You built and started OM2M successfully.'''
+

Revision as of 14:24, 31 March 2015

OM2M_0.8.0 31 Wed, 8 April 2015

Back to the top