diff --git a/manual/pom.xml b/manual/pom.xml index 26cfb37..ef5f035 100644 --- a/manual/pom.xml +++ b/manual/pom.xml @@ -128,6 +128,36 @@ + + org.asciidoctor + asciidoctor-maven-plugin + 1.5.2 + + + output-html + generate-resources + + process-asciidoc + + + coderay + html5 + + + false + book + ${project.version} + + + + + + src/main/asciidoc + target/docs + true + images/ + + maven-war-plugin 2.1 @@ -230,7 +260,43 @@ - + + + + + asciidoc + + + + org.asciidoctor + asciidoctor-maven-plugin + 1.5.2 + + + output-html + generate-resources + + process-asciidoc + + + coderay + html5 + + + false + book + ${project.version} + + + + + + src/main/asciidoc + target/docs + true + images/ + + diff --git a/manual/src/main/asciidoc/developers-guide/example.adoc b/manual/src/main/asciidoc/developers-guide/example.adoc new file mode 100644 index 0000000..d7dd376 --- /dev/null +++ b/manual/src/main/asciidoc/developers-guide/example.adoc @@ -0,0 +1,55 @@ + += How to modify code + +With this example we want to show how to modify EIK. +To do this we start by an example, we try to solve together a issue https://issues.apache.org/jira/browse/KARAF-1855. + +== Prerequisites + +For import eik project in eclipse without error we need follow the following point + +*Environment:* + +* Java SE Development Kit 1.6.x or greater (http://www.oracle.com/technetwork/java/javase/). +* Apache Maven 3.0.3 (http://maven.apache.org/download.html). +* Eclipse IDE Eclipse for RCP and RAP Developers (http://www.eclipse.org/downloads/packages/release/indigo/sr2). +* Apache KARAF 2.2.x or 2.3.x (http://karaf.apache.org/index/community/download.html); +* m2e(clipse) plugins (http://eclipse.org/m2e/) +* Tycho Project Configurators it is downloaded automatically when inport EIK in eclipse with m2e version 0.6.0 or higher +* WST server tools download from *Install Manager* version 3.2.100.v20110303-51EoAkF77g8HBSc or higher +* JST Enterprise Core from *Install Manager* 3.3.0.v201102200555 or higher +* JST Enterprise User Documentation from *Install Manager* version 3.3.100.v201105122000-62FUGBgJ9EA9aEeHRHc or higher +* JST Server Adapters from *Install Manager* version 3.3.0.v201102200555 or higher +* JST Server UI from *Install Manager* version 3.3.0.v201102200555 or higher +* JST Server User Documentation from *Install Manager* version 3.3.100.v20110303-2-Eo7w3121162A3329 or higher +* JST Web Core from *Install Manager* version 3.3.0.v201103310009 or higher +* JST Web User Documentation from *Install Manager* version 3.3.0.v201102200555-2107w31211938 or higher + + +== Import EIK in eclipse + +From File > Import > Maven > Existing Maven Projects + +image::devexample_1.png[] + +After the development environment is ready, the class to change for resolve the issue is *NewKarafProjectWizard*. +Goal is to advise user that the project has been created successfully and close the wizard. + +For do that I added a messageDialog as outlined in the code: + +image::devexample_4.png[] + +To see if the change has its effect select +*Right click on org.apache.karaf.eik.ui > Debug As > EclipseApplication* + +Create a new project as see in link:../user-guide/installation.html.adoc[installation] + +image::devexample_5.png[] + +Click Finish and message and wizard will be closed. + +image::devexample_6.png[] + +This minor change doesn't resolve the issue, but it illustrates how to test our changes on the code. + + diff --git a/manual/src/main/asciidoc/developers-guide/index.adoc b/manual/src/main/asciidoc/developers-guide/index.adoc new file mode 100644 index 0000000..7a7b548 --- /dev/null +++ b/manual/src/main/asciidoc/developers-guide/index.adoc @@ -0,0 +1,4 @@ +image::../images/karaf-logo.png[] += Eclipse Integration Karaf Developer Guide +* link:/developers-guide/prerequisites.adoc[Prerequisites] +* link:/developers-guide/example.adoc[How to modify code] diff --git a/manual/src/main/asciidoc/developers-guide/prerequisites.adoc b/manual/src/main/asciidoc/developers-guide/prerequisites.adoc new file mode 100644 index 0000000..074ea08 --- /dev/null +++ b/manual/src/main/asciidoc/developers-guide/prerequisites.adoc @@ -0,0 +1,20 @@ += Prerequisites + +For import eik project in eclipse without error we need follow the following point + +*Environment:* + +* Java SE Development Kit 1.6.x or greater (http://www.oracle.com/technetwork/java/javase/). +* Apache Maven 3.0.3 (http://maven.apache.org/download.html). +* Eclipse IDE Eclipse for RCP and RAP Developers (http://www.eclipse.org/downloads/packages/release/indigo/sr2). +* Apache KARAF 2.2.x or 2.3.x (http://karaf.apache.org/index/community/download.html); +* m2e(clipse) plugins (http://eclipse.org/m2e/) +* Tycho Project Configurators it is downloaded automatically when inport EIK in eclipse with m2e version 0.6.0 or higher +* WST server tools download from *Install Manager* version 3.2.100.v20110303-51EoAkF77g8HBSc or higher +* JST Enterprise Core from *Install Manager* 3.3.0.v201102200555 or higher +* JST Enterprise User Documentation from *Install Manager* version 3.3.100.v201105122000-62FUGBgJ9EA9aEeHRHc or higher +* JST Server Adapters from *Install Manager* version 3.3.0.v201102200555 or higher +* JST Server UI from *Install Manager* version 3.3.0.v201102200555 or higher +* JST Server User Documentation from *Install Manager* version 3.3.100.v20110303-2-Eo7w3121162A3329 or higher +* JST Web Core from *Install Manager* version 3.3.0.v201103310009 or higher +* JST Web User Documentation from *Install Manager* version 3.3.0.v201102200555-2107w31211938 or higher diff --git a/manual/src/main/asciidoc/images/Runkaraf229_l.png b/manual/src/main/asciidoc/images/Runkaraf229_l.png new file mode 100644 index 0000000..d6a2929 Binary files /dev/null and b/manual/src/main/asciidoc/images/Runkaraf229_l.png differ diff --git a/manual/src/main/asciidoc/images/apachekarafperspective_l.png b/manual/src/main/asciidoc/images/apachekarafperspective_l.png new file mode 100644 index 0000000..509afea Binary files /dev/null and b/manual/src/main/asciidoc/images/apachekarafperspective_l.png differ diff --git a/manual/src/main/asciidoc/images/check.gif b/manual/src/main/asciidoc/images/check.gif new file mode 100644 index 0000000..28bb999 Binary files /dev/null and b/manual/src/main/asciidoc/images/check.gif differ diff --git a/manual/src/main/asciidoc/images/createproject_1.png b/manual/src/main/asciidoc/images/createproject_1.png new file mode 100644 index 0000000..2a3ccee Binary files /dev/null and b/manual/src/main/asciidoc/images/createproject_1.png differ diff --git a/manual/src/main/asciidoc/images/createproject_2.png b/manual/src/main/asciidoc/images/createproject_2.png new file mode 100644 index 0000000..1dc8d95 Binary files /dev/null and b/manual/src/main/asciidoc/images/createproject_2.png differ diff --git a/manual/src/main/asciidoc/images/createproject_3.png b/manual/src/main/asciidoc/images/createproject_3.png new file mode 100644 index 0000000..24fecc8 Binary files /dev/null and b/manual/src/main/asciidoc/images/createproject_3.png differ diff --git a/manual/src/main/asciidoc/images/devcomponent_1.png b/manual/src/main/asciidoc/images/devcomponent_1.png new file mode 100644 index 0000000..e0f2eb1 Binary files /dev/null and b/manual/src/main/asciidoc/images/devcomponent_1.png differ diff --git a/manual/src/main/asciidoc/images/devcomponent_2.png b/manual/src/main/asciidoc/images/devcomponent_2.png new file mode 100644 index 0000000..e1b764f Binary files /dev/null and b/manual/src/main/asciidoc/images/devcomponent_2.png differ diff --git a/manual/src/main/asciidoc/images/devcomponent_4.png b/manual/src/main/asciidoc/images/devcomponent_4.png new file mode 100644 index 0000000..b038b16 Binary files /dev/null and b/manual/src/main/asciidoc/images/devcomponent_4.png differ diff --git a/manual/src/main/asciidoc/images/devcomponent_6.png b/manual/src/main/asciidoc/images/devcomponent_6.png new file mode 100644 index 0000000..f262870 Binary files /dev/null and b/manual/src/main/asciidoc/images/devcomponent_6.png differ diff --git a/manual/src/main/asciidoc/images/devcomponent_8.png b/manual/src/main/asciidoc/images/devcomponent_8.png new file mode 100644 index 0000000..6f26ecc Binary files /dev/null and b/manual/src/main/asciidoc/images/devcomponent_8.png differ diff --git a/manual/src/main/asciidoc/images/devcomponent_9.png b/manual/src/main/asciidoc/images/devcomponent_9.png new file mode 100644 index 0000000..506b780 Binary files /dev/null and b/manual/src/main/asciidoc/images/devcomponent_9.png differ diff --git a/manual/src/main/asciidoc/images/devcomponentwithm2e_1.png b/manual/src/main/asciidoc/images/devcomponentwithm2e_1.png new file mode 100644 index 0000000..d8ee605 Binary files /dev/null and b/manual/src/main/asciidoc/images/devcomponentwithm2e_1.png differ diff --git a/manual/src/main/asciidoc/images/devcomponentwithm2e_2.png b/manual/src/main/asciidoc/images/devcomponentwithm2e_2.png new file mode 100644 index 0000000..190df3f Binary files /dev/null and b/manual/src/main/asciidoc/images/devcomponentwithm2e_2.png differ diff --git a/manual/src/main/asciidoc/images/devexample_1.png b/manual/src/main/asciidoc/images/devexample_1.png new file mode 100644 index 0000000..39da337 Binary files /dev/null and b/manual/src/main/asciidoc/images/devexample_1.png differ diff --git a/manual/src/main/asciidoc/images/devexample_4.png b/manual/src/main/asciidoc/images/devexample_4.png new file mode 100644 index 0000000..9743e69 Binary files /dev/null and b/manual/src/main/asciidoc/images/devexample_4.png differ diff --git a/manual/src/main/asciidoc/images/devexample_5.png b/manual/src/main/asciidoc/images/devexample_5.png new file mode 100644 index 0000000..b4f16c4 Binary files /dev/null and b/manual/src/main/asciidoc/images/devexample_5.png differ diff --git a/manual/src/main/asciidoc/images/devexample_6.png b/manual/src/main/asciidoc/images/devexample_6.png new file mode 100644 index 0000000..383816f Binary files /dev/null and b/manual/src/main/asciidoc/images/devexample_6.png differ diff --git a/manual/src/main/asciidoc/images/eik-karaf-new-project_l.png b/manual/src/main/asciidoc/images/eik-karaf-new-project_l.png new file mode 100644 index 0000000..2a3ccee Binary files /dev/null and b/manual/src/main/asciidoc/images/eik-karaf-new-project_l.png differ diff --git a/manual/src/main/asciidoc/images/eik-karaf-osgi-framework_l.png b/manual/src/main/asciidoc/images/eik-karaf-osgi-framework_l.png new file mode 100644 index 0000000..eb049cf Binary files /dev/null and b/manual/src/main/asciidoc/images/eik-karaf-osgi-framework_l.png differ diff --git a/manual/src/main/asciidoc/images/eikupdatemanager_l.png b/manual/src/main/asciidoc/images/eikupdatemanager_l.png new file mode 100644 index 0000000..e7108dc Binary files /dev/null and b/manual/src/main/asciidoc/images/eikupdatemanager_l.png differ diff --git a/manual/src/main/asciidoc/images/error.gif b/manual/src/main/asciidoc/images/error.gif new file mode 100644 index 0000000..6d68a8c Binary files /dev/null and b/manual/src/main/asciidoc/images/error.gif differ diff --git a/manual/src/main/asciidoc/images/installation_1.png b/manual/src/main/asciidoc/images/installation_1.png new file mode 100644 index 0000000..b83721d Binary files /dev/null and b/manual/src/main/asciidoc/images/installation_1.png differ diff --git a/manual/src/main/asciidoc/images/installation_2.png b/manual/src/main/asciidoc/images/installation_2.png new file mode 100644 index 0000000..9abf8d8 Binary files /dev/null and b/manual/src/main/asciidoc/images/installation_2.png differ diff --git a/manual/src/main/asciidoc/images/installation_3.png b/manual/src/main/asciidoc/images/installation_3.png new file mode 100644 index 0000000..052fefa Binary files /dev/null and b/manual/src/main/asciidoc/images/installation_3.png differ diff --git a/manual/src/main/asciidoc/images/installation_4.png b/manual/src/main/asciidoc/images/installation_4.png new file mode 100644 index 0000000..509afea Binary files /dev/null and b/manual/src/main/asciidoc/images/installation_4.png differ diff --git a/manual/src/main/asciidoc/images/karaf-logo.png b/manual/src/main/asciidoc/images/karaf-logo.png new file mode 100644 index 0000000..066ab86 Binary files /dev/null and b/manual/src/main/asciidoc/images/karaf-logo.png differ diff --git a/manual/src/main/asciidoc/images/karafConsole_l.png b/manual/src/main/asciidoc/images/karafConsole_l.png new file mode 100644 index 0000000..0fa599a Binary files /dev/null and b/manual/src/main/asciidoc/images/karafConsole_l.png differ diff --git a/manual/src/main/asciidoc/images/karaflocation_l.png b/manual/src/main/asciidoc/images/karaflocation_l.png new file mode 100644 index 0000000..1dc8d95 Binary files /dev/null and b/manual/src/main/asciidoc/images/karaflocation_l.png differ diff --git a/manual/src/main/asciidoc/images/launchconf_1.png b/manual/src/main/asciidoc/images/launchconf_1.png new file mode 100644 index 0000000..d6a2929 Binary files /dev/null and b/manual/src/main/asciidoc/images/launchconf_1.png differ diff --git a/manual/src/main/asciidoc/images/launchconf_2.png b/manual/src/main/asciidoc/images/launchconf_2.png new file mode 100644 index 0000000..0fa599a Binary files /dev/null and b/manual/src/main/asciidoc/images/launchconf_2.png differ diff --git a/manual/src/main/asciidoc/images/loadbundle_1.png b/manual/src/main/asciidoc/images/loadbundle_1.png new file mode 100644 index 0000000..e048011 Binary files /dev/null and b/manual/src/main/asciidoc/images/loadbundle_1.png differ diff --git a/manual/src/main/asciidoc/images/loadbundle_2.png b/manual/src/main/asciidoc/images/loadbundle_2.png new file mode 100644 index 0000000..982594e Binary files /dev/null and b/manual/src/main/asciidoc/images/loadbundle_2.png differ diff --git a/manual/src/main/asciidoc/images/osgiframework_l.png b/manual/src/main/asciidoc/images/osgiframework_l.png new file mode 100644 index 0000000..052fefa Binary files /dev/null and b/manual/src/main/asciidoc/images/osgiframework_l.png differ diff --git a/manual/src/main/asciidoc/images/projectName_l.png b/manual/src/main/asciidoc/images/projectName_l.png new file mode 100644 index 0000000..4cb0732 Binary files /dev/null and b/manual/src/main/asciidoc/images/projectName_l.png differ diff --git a/manual/src/main/asciidoc/images/selecttargetplatform_l.png b/manual/src/main/asciidoc/images/selecttargetplatform_l.png new file mode 100644 index 0000000..24fecc8 Binary files /dev/null and b/manual/src/main/asciidoc/images/selecttargetplatform_l.png differ diff --git a/manual/src/main/asciidoc/images/uninstall.png b/manual/src/main/asciidoc/images/uninstall.png new file mode 100644 index 0000000..b359b71 Binary files /dev/null and b/manual/src/main/asciidoc/images/uninstall.png differ diff --git a/manual/src/main/asciidoc/index.adoc b/manual/src/main/asciidoc/index.adoc new file mode 100644 index 0000000..7a13231 --- /dev/null +++ b/manual/src/main/asciidoc/index.adoc @@ -0,0 +1,7 @@ +image::images/karaf-logo.png[] += Apache Karaf EIK + +Welcome to Apache Eclipse Intergration Karaf (EIK) Subproject. +* link:overview.adoc[Overview] +* link:user-guide/index.adoc[User Guide] +* link:developers-guide/index.adoc[Developers guide] diff --git a/manual/src/main/asciidoc/manual.adoc b/manual/src/main/asciidoc/manual.adoc new file mode 100644 index 0000000..9d88951 --- /dev/null +++ b/manual/src/main/asciidoc/manual.adoc @@ -0,0 +1,44 @@ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// += Apache Karaf-Cellar {docVersion} Guide +Apache Software Foundation +:doctype: book +:toc: left +:toclevels: 3 +:toc-position: left +:toc-title: Apache Karaf +:numbered: +:projectdir: ../../../ +:sourcedir: {projectdir}/target/test-sources +:icons: font +:leveloffset: 1 + +image::karaf-logo.png[] + +Copyright 2008-2015 The Apache Software Foundation + +The PDF format of the Karaf Manual has been generated by Prince XML (http://www.princexml.com). + +include::overview.adoc[] + +include::user-guide/prerequisites.adoc[] +include::user-guide/supportedversions.html.adoc[] +include::user-guide/installation.adoc[] +include::user-guide/createproject.adoc[] +include::user-guide/launchconf.adoc[] +include::user-guide/loadbundle.adoc[] +include::user-guide/uninstall.adoc[] +include::user-guide/devcomponent.adoc[] +include::user-guide/devcomponentwithm2e.adoc[] +include::developers-guide/example.adoc[] diff --git a/manual/src/main/asciidoc/overview.adoc b/manual/src/main/asciidoc/overview.adoc new file mode 100644 index 0000000..758ad70 --- /dev/null +++ b/manual/src/main/asciidoc/overview.adoc @@ -0,0 +1,25 @@ +image::images/karaf-logo.png[] += Karaf EIK Overview +EIK supports nearly all Apache Karaf compatible runtimes including: + +* Apache Karaf +* Apache ServiceMix +* Talend ESB +* FUSE ESB + + +Notable features include: + +* Custom Eclipse perspective for Apache Karaf development: +** places valuable Karaf runtime information in one location +* Apache Karaf installation management in your workspace: +** Karaf installations are managed as workspace projects giving the developer visibility in to the runtime +** each Karaf installation is automatically synchronized with your workspace, including additional bundles, configuration files +* Run and debug Karaf installations with a single Eclipse Launcher: +** the launch configuration allows developers to fine tune how Karaf will launch +* Automatic deployment of workspace plugin projects: +* create plugin-projects and have them deployed automatically +* Advanced instrumentation of the running Karaf instance: +** watch bundles deploy in real time and examine the OSGi service registry from within the Eclipse IDE +* Access Eclipse platform IDE plugins from within a running Karaf instance: +** all Eclipse plugins are presented as an OBR diff --git a/manual/src/main/asciidoc/user-guide/createproject.adoc b/manual/src/main/asciidoc/user-guide/createproject.adoc new file mode 100644 index 0000000..3b55145 --- /dev/null +++ b/manual/src/main/asciidoc/user-guide/createproject.adoc @@ -0,0 +1,38 @@ + += Create a new Apache Karaf Project + +Create new karaf runtime with *Select File > New > Apache Karaf Installation* and add *project_name* + +image::createproject_1.png[] + +Select runtime *karaf_installation_dir* of your karaf or Servicemix runtime + +image::createproject_2.png[] + +Doubleclick on .target and select target platform. +Target platform corresponds to the set of OSGi components used for development and any OSGi components defined as projects within the workspace for Example (Karaf , Servicemix, Camel , CXF ). +For example Eclipse PDE uses these components for compilation and checks if imports can be resolved. +Basically is based on a directory containing these components. +By default, this is the plugins directory under the Eclipse installation directory, which contains all plug-ins associated with Eclipse. + +image::createproject_3.png[] + +To configure target platform there can be two approch: +* Using the facilities provided by Eclipse PDE to specify all the components you need selecting directory ecc.ecc. +* EIK provides preconfigured target platforms for Karaf based runtime + +choose the most convenient for you + + + + + + + + + + + + + + diff --git a/manual/src/main/asciidoc/user-guide/devcomponent.adoc b/manual/src/main/asciidoc/user-guide/devcomponent.adoc new file mode 100644 index 0000000..f6749f1 --- /dev/null +++ b/manual/src/main/asciidoc/user-guide/devcomponent.adoc @@ -0,0 +1,112 @@ + += Developing OSGi components with EIK + +This chapter describes how to develop a osgi component with EIK. +Now we have a functional karaf environment in Eclipse, and we will illustrate howto develop a debug simple Camel route + +For this example we use apache servicemix 4.4.2. + +Using command line, we can create our project: +---- +mvn archetype:generate \ + -DarchetypeGroupId=org.apache.karaf.eik.archetypes \ + -DarchetypeArtifactId=eik-camel-archetype \ + -DarchetypeVersion=0.9.0-SNAPSHOT \ + -DgroupId=org.apache \ + -DartifactId=eik-camel-osgi-project \ + -Dversion=1.0.0-SNAPSHOT +---- +as soon as possible this archetype will be available for m2e + + +*Additional parameters* + +During the maven creation process, additional questions will be asked on the console : + +* Define value for property 'camel-version': + The version of camel we want to use + +* Define value for property 'slf4j-version': + The version of slf4j we want to use + +*Result of Maven command execution* + +---- +[INFO] Scanning for projects... +[INFO] +[INFO] ------------------------------------------------------------------------ +[INFO] Building Maven Stub Project (No POM) 1 +[INFO] ------------------------------------------------------------------------ +[INFO] +[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>> +[INFO] +[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<< +[INFO] +[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom --- +[INFO] Generating project in Interactive mode +[INFO] Archetype repository missing. Using the one from [org.apache.karaf.eik.archetypes:camel-osgi-pde-plugin:3.0.0-SNAPSHOT] found in catalog local +[INFO] Using property: groupId = org.apache +[INFO] Using property: artifactId = eik-camel-osgi-project +[INFO] Using property: version = 1.0.0-SNAPSHOT +[INFO] Using property: package = org.apache +Define value for property 'camel-version': ${camel-version}: : 2.8.5 +Define value for property 'slf4j-version': ${slf4j-version}: : 1.6.1 +Confirm properties configuration: +groupId: org.apache +artifactId: eik-camel-osgi-project +version: 1.0.0-SNAPSHOT +package: org.apache +camel-version: 2.8.5 +slf4j-version: 1.6.1 + Y: : +[INFO] ---------------------------------------------------------------------------- +[INFO] Using following parameters for creating project from Archetype: camel-osgi-pde-plugin:3.0.0-SNAPSHOT +[INFO] ---------------------------------------------------------------------------- +[INFO] Parameter: groupId, Value: org.apache +[INFO] Parameter: artifactId, Value: eik-camel-osgi-project +[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT +[INFO] Parameter: package, Value: org.apache +[INFO] Parameter: packageInPathFormat, Value: org/apache +[INFO] Parameter: camel-version, Value: 2.8.5 +[INFO] Parameter: package, Value: org.apache +[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT +[INFO] Parameter: groupId, Value: org.apache +[INFO] Parameter: slf4j-version, Value: 1.6.1 +[INFO] Parameter: artifactId, Value: eik-camel-osgi-project +[INFO] project created from Archetype in dir: /projects/formazione/manual/test/eik-camel-osgi-project +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 13.551s +[INFO] Finished at: Wed Oct 10 13:54:28 CEST 2012 +[INFO] Final Memory: 7M/118M +[INFO] ------------------------------------------------------------------------ +---- + +*Import project in eclipse* + +To compile and import project in Eclipse, type: + +mvn clean install -DskipTests=true eclipse:eclipse + +then import the project in Eclipse and add to MANIFEST + +then inport project in eclipse and add in MANIFEST + +* Bundle ID +* Name + +image::devcomponent_1.png[] + + +Using Eclipse IDE we can import package for our needs in the project, the package available are those present in target platform. +To do that we need do double click on the MANIFEST.MF > Dependencies you can use UI to import package + +EIK feature allows Automatic deployment of workspace plugin projects. +If you check Run configurations or in Debug configurations. You will see your project + +image::devcomponent_2.png[] + +To run your application, select Debug button, wait few seconds for container startup and you will see + +image::devcomponent_9.png[] diff --git a/manual/src/main/asciidoc/user-guide/devcomponentwithm2e.adoc b/manual/src/main/asciidoc/user-guide/devcomponentwithm2e.adoc new file mode 100644 index 0000000..a078e3a --- /dev/null +++ b/manual/src/main/asciidoc/user-guide/devcomponentwithm2e.adoc @@ -0,0 +1,73 @@ + += Developing OSGi components with m2e and EIK + +Most of the examples and archetype present on the web use maven-bundle-plugins to create bundle. +EIK is able to use these archetype through the help of M2E. + +If m2e is not installed yet please download it from m2ehttp://download.eclipse.org/technology/m2e/releasesm2e. + +Using Karaf-bundle-archetype a simple projects called simpleBundle. + +We need to instruct maven-bundle-plugin configuration like this: + +* manifestLocation to META-INF +* unpackBundle to true + +---- + + org.apache.felix + maven-bundle-plugin + 2.3.7 + true + + META-INF + true + + ${project.artifactId} + ${project.version} + org.apache.karaf.eik.manual.simpleBundle.Activator + + org.apache.karaf.eik.manual.simpleBundle*;version=${project.version} + + + * + + + + +---- + + +* Right click on project -> Maven -> Update Project... +* Right click on project -> RunAs -> Maven install + + +from Debug Configurations is possible to see simpleBundle + +image::devcomponentwithm2e_1.png[] + +Run Eik and to verify the installed bundle were started type osgi:list + +image::devcomponentwithm2e_2.png[] + + + + + + + + + + + + + + + + + + + + + + diff --git a/manual/src/main/asciidoc/user-guide/index.adoc b/manual/src/main/asciidoc/user-guide/index.adoc new file mode 100644 index 0000000..8d7454f --- /dev/null +++ b/manual/src/main/asciidoc/user-guide/index.adoc @@ -0,0 +1,12 @@ +image::karaf-logo.png[] + += Eclipse Integration Karaf User Guide +* link:/user-guide/prerequisites.adoc[Prerequisites ] +* link:/user-guide/supportedversions.adoc[Supported versions] +* link:/user-guide/installation.adoc[Installation ] +* link:/user-guide/createproject.adoc[Create EIK Project ] +* link:/user-guide/launchconf.adoc[Create Launch configuration ] +* link:/user-guide/loadbundle.adoc[View loaded bundle ] +* link:/user-guide/uninstall.adoc[Uninstalling ] +* link:/user-guide/devcomponent.adoc[Developing OSGi components] +* link:/user-guide/devcomponentwithm2e.adoc[Developing OSGi components with m2e] diff --git a/manual/src/main/asciidoc/user-guide/installation.adoc b/manual/src/main/asciidoc/user-guide/installation.adoc new file mode 100644 index 0000000..00dbc3a --- /dev/null +++ b/manual/src/main/asciidoc/user-guide/installation.adoc @@ -0,0 +1,52 @@ + += EIK Installation + +EIK can be installed in two ways. + +* Installing from EIK repository (available online) +* Installing from EIK sources (by building the repository locally) + +=== Installing from EIK repository + +Download the EIK repository zip archive from Central. +For instance, download: +http://repository.apache.org/content/groups/snapshots/org/apache/karaf/eik/org.apache.karaf.eik.repository/3.0.0-SNAPSHOT/org.apache.karaf.eik.repository-3.0.0-20140225.150041-1.zip + +Uncompress the repository zip archive on your system, in the folder of your choice. + +In Eclipse, pick up this folder in the following menu: + +*Select Help > Install new software > Add.. > Local...* + +=== Installing from EIK sources + +From EIK sources, you start by building the repository: + +---- +The following avoids running all the unit test cases, we just skip the test running phase and not the building part +mvn -Dmaven.test.skip=true clean install +or +mvn -DskipTests clean install +---- + +*Select Help > Install new software > Add.. > Local...* +select folder +/repository/target/repository + + +image::installation_2.png[] + + +=== Setting the OSGi Framework +With this step we specify to Eclipse which OSGi framework we need to use +*Select Window > Preferences > OSGI Frameworks* + +image::installation_3.png[] + +=== Switch on the the Apache Karaf perspective + +To Switch perspective we need *Select Window > Open Perspective > Other > Select Apache Karaf* + +image::installation_4.png[] + +Now EIK is installed correctly diff --git a/manual/src/main/asciidoc/user-guide/launchconf.adoc b/manual/src/main/asciidoc/user-guide/launchconf.adoc new file mode 100644 index 0000000..da5ad9e --- /dev/null +++ b/manual/src/main/asciidoc/user-guide/launchconf.adoc @@ -0,0 +1,26 @@ + += Create an OSGi Framework Launcher + +To define launch configuration we need *Select Run > Run Configurations > Osgi Framework > new ..* + +image::launchconf_1.png[] + +From *Karaf tab* in Launch configuration is possible to chance which features need to load. +By Default the feature that loaded are those listed in the file */etc/org.apache.karaf.features.cfg*. +Note that all changes modify the org.apache.karaf.features.cfg file present in the runtime installation. To Run karaf runtime Select *Add Required Bundles* > Apply and the *Select Run* + +image::launchconf_2.png[] + +When the Karaf runtime runs, its output appears in Eclipse Console view at the bottom of the window. +With console we can interact with Karaf console. Please see here to found useful karaf console commands http://karaf.apache.org/manual/latest-2.2.x/commands/commands.html Please see here to found useful karaf console commands + + + + + + + + + + + diff --git a/manual/src/main/asciidoc/user-guide/loadbundle.adoc b/manual/src/main/asciidoc/user-guide/loadbundle.adoc new file mode 100644 index 0000000..35a9184 --- /dev/null +++ b/manual/src/main/asciidoc/user-guide/loadbundle.adoc @@ -0,0 +1,23 @@ + += View Bundle Loaded + +From Apache Karaf perspective it's possible to see in a view the bundles that are currently loaded at runtime. +Before launch runtime we need create new Launch Configuration : from *Run > Debug Configuration or Run Configuration > Apache Felix Karaf new Launch Configuration* + +image::loadbundle_1.png[] + +and after lanching Karaf runtime from *Bundles view* we can understanding the Runtime Properties of Apache Karaf without use karaf console + +image::loadbundle_2.png[] + + + + + + + + + + + + diff --git a/manual/src/main/asciidoc/user-guide/manualinstallation.adoc b/manual/src/main/asciidoc/user-guide/manualinstallation.adoc new file mode 100644 index 0000000..e0a5cf1 --- /dev/null +++ b/manual/src/main/asciidoc/user-guide/manualinstallation.adoc @@ -0,0 +1,5 @@ + += EIK Manual Installation + +This chapter describes how to install EIK from source code. + diff --git a/manual/src/main/asciidoc/user-guide/prerequisites.adoc b/manual/src/main/asciidoc/user-guide/prerequisites.adoc new file mode 100644 index 0000000..d1111e8 --- /dev/null +++ b/manual/src/main/asciidoc/user-guide/prerequisites.adoc @@ -0,0 +1,19 @@ + += Prerequisites + +*Environment:* + +* Java SE Development Kit 1.6.x or greater (http://www.oracle.com/technetwork/java/javase/). +* Apache Maven 3.0.3 (http://maven.apache.org/download.html). +* Eclipse IDE Eclipse for RCP and RAP Developers (http://www.eclipse.org/downloads/packages/release/indigo/sr2). +* Apache KARAF 2.2.x or 2.3.x (http://karaf.apache.org/index/community/download.html); + +Download and extract the Eclipse IDE for RCP and RAP Developers archives to a directory of your choice (for e.g. $HOME/eclipse). +The archive will be extracted to a directory named eclipse under the directory you specified (for e.g. $HOME/tools/eclipse/eclipse), referred to as ** from now on. +Make sure that the JDK in the PATH is Sun JDK 6.0. +Launch Eclipse by running /eclipse. + +To install the Karaf, download the Karaf 2.2.x runtime from Apache Karaf downloads and extract the archive to a directory of your choice (for e.g. $HOME/tools/karaf). +The archive will be extracted to a directory apache-karaf-2.2.* (for e.g. $HOME/tools/karaf/apache-karaf-2.2.*). +We will refer to this directory as ** from now on. + diff --git a/manual/src/main/asciidoc/user-guide/supportedversions.html b/manual/src/main/asciidoc/user-guide/supportedversions.html new file mode 100644 index 0000000..b758176 --- /dev/null +++ b/manual/src/main/asciidoc/user-guide/supportedversions.html @@ -0,0 +1,34 @@ +

Supported Versions

+ +This section defines the matrix of supported versions: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Karaf 2.2.4Karaf 2.2.9Karaf 2.3.0ServiceMix 4.5.0
Eclipse RCP Helios SR2 (3.6.2)
Eclipse RCP Indigo SR2 (3.7.2)
Eclipse RCP Juno (4.2)
\ No newline at end of file diff --git a/manual/src/main/asciidoc/user-guide/uninstall.adoc b/manual/src/main/asciidoc/user-guide/uninstall.adoc new file mode 100644 index 0000000..097d24c --- /dev/null +++ b/manual/src/main/asciidoc/user-guide/uninstall.adoc @@ -0,0 +1,16 @@ + += Uninstall EIK from your Eclipse IDE + +This chapter describes how to unInstall EIK through the Update Manager +From menu we need *Select Help > About Eclipse > Installation Details*. Select plugins as shown in image. +Select Uninstall + +image::uninstall.png[] + + + + + + + +