{"id":150,"date":"2015-02-08T13:02:22","date_gmt":"2015-02-08T04:02:22","guid":{"rendered":"http:\/\/www.wingnest.com\/blog\/?p=150"},"modified":"2018-12-20T13:58:30","modified_gmt":"2018-12-20T04:58:30","slug":"osgi-%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%82%92%e5%88%a9%e7%94%a8%e3%81%99%e3%82%8b-karaf-%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%ae%e5%ae%9f%e8%a3%85%e3%81%99%e3%82%8b-bundle%e3%81%ae","status":"publish","type":"post","link":"https:\/\/www.wingnest.com\/blog\/archives\/150","title":{"rendered":"OSGi \u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3059\u308b Karaf \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u88c5\u3059\u308b &#8211; Bundle\u306e\u521d\u6b69\u7684\u306a\u5b9f\u88c5\u6cd5\u3092\u611f\u899a\u7684\u306b\u7406\u89e3\u3059\u308b\u305f\u3081\u306b(1\/3)"},"content":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u306f\u3001\u3068\u3066\u3082\u5358\u7d14\u306a OSGi\u30d9\u30fc\u30b9\u306e\u30b5\u30fc\u30d3\u30b9\u3068\u3001\u305d\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3059\u308b <a href=\"http:\/\/karaf.apache.org\/\">Apache Karaf<\/a> \u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f5c\u6210\u3059\u308b\u624b\u9806\u3092\u901a\u3057\u3066\u3001OSGi\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u57fa\u672c\u7684\u306a\u4ed5\u7d44\u307f\u3068\u3001Bundle\u306e\u521d\u6b69\u7684\u306a\u5b9f\u88c5\u6cd5\u3092\u611f\u899a\u7684\u306b\u7406\u89e3\u3067\u304d\u308b\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u3066\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001OSGi \u306e\u5b9f\u884c\u74b0\u5883\u3068\u3057\u3066 OSGi \u30b3\u30f3\u30c6\u30ca\u3067\u3042\u308b <a href=\"http:\/\/karaf.apache.org\/index\/community\/download\/karaf-3.0.3-release.html\">Apache Karaf 3.0.3<\/a> \u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>\u3053\u306e\u8a18\u4e8b\u306e\u4e2d\u3067\u4f5c\u6210\u3059\u308b\u3082\u306e<\/h3>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u4f5c\u6210\u3059\u308b\u306e\u306f\u3001&#8221;hello&#8221; \u3068\u3044\u3046\u6587\u5b57\u5217\u3092\u8fd4\u3059\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u6301\u3063\u305f OSGi \u30d9\u30fc\u30b9\u306e\u30b5\u30fc\u30d3\u30b9\u3068\u3001\u305d\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3059\u308b Karaf \u306e\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002<br \/>\n\u30b3\u30de\u30f3\u30c9\u306e\u540d\u524d\u306f\u3001&#8221;mycommand:hello&#8221; \u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306b\u3088\u308a\u5b9f\u73fe\u3059\u308b\u30b7\u30ca\u30ea\u30aa\u306f\u3001Karaf \u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u3001&#8221;mycommand:hello&#8221; \u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001Karaf \u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u306b &#8220;hello&#8221;\u3068\u3044\u3046\u6587\u5b57\u5217\u304c\u51fa\u529b\u3055\u308c\u308b\u3068\u3044\u3046\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b<\/h3>\n<p>\u307e\u305a\u3001\u9069\u5f53\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e0b\u306b\u89aa\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4ee5\u4e0b\u306b\u793a\u3059 mvn \u30b3\u30de\u30f3\u30c9\u3092\u7aef\u672b\u304b\u3089\u5b9f\u884c\u3057\u3066\u4f5c\u6210\u3057\u307e\u3059\u3002<br \/>\n\u5b9f\u884c\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u3001\u3069\u3053\u3067\u3082\u69cb\u3044\u307e\u305b\u3093\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001&#8221;\/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/&#8221; \u306e\u4e0b\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo.archetypes -DarchetypeArtifactId=pom-root -DarchetypeVersion=RELEASE\n<\/code><\/pre>\n<p>\u5b9f\u884c\u3059\u308b\u3068\u3001\u7aef\u672b\u306b\u3001\u6b21\u306e\u3088\u3046\u306b\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre><code>$ mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo.archetypes -DarchetypeArtifactId=pom-root -DarchetypeVersion=RELEASE\n[INFO] Scanning for projects...\n[INFO]                                                                         \n[INFO] ------------------------------------------------------------------------\n[INFO] Building Maven Stub Project (No POM) 1\n[INFO] ------------------------------------------------------------------------\n[INFO] \n[INFO] &gt;&gt;&gt; maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom &gt;&gt;&gt;\n[INFO] \n[INFO] &lt;&lt;&lt; maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom &lt;&lt;&lt;\n[INFO] \n[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---\n[INFO] Generating project in Interactive mode\n[INFO] Archetype repository missing. Using the one from [org.codehaus.mojo.archetypes:pom-root:1.1] found in catalog remote\nDefine value for property 'groupId': : com.wingnest.bundles\nDefine value for property 'artifactId': : com.wingnest.bundles.sample.hello\nDefine value for property 'version':  1.0-SNAPSHOT: : \nDefine value for property 'package':  com.wingnest.bundles: : com.wingnest.bundles.sample.hello\nConfirm properties configuration:\ngroupId: com.wingnest.bundles\nartifactId: com.wingnest.bundles.sample.hello\nversion: 1.0-SNAPSHOT\npackage: com.wingnest.bundles.sample.hello\n Y: : \n[INFO] ----------------------------------------------------------------------------\n[INFO] Using following parameters for creating project from Archetype: pom-root:RELEASE\n[INFO] ----------------------------------------------------------------------------\n[INFO] Parameter: groupId, Value: com.wingnest.bundles\n[INFO] Parameter: artifactId, Value: com.wingnest.bundles.sample.hello\n[INFO] Parameter: version, Value: 1.0-SNAPSHOT\n[INFO] Parameter: package, Value: com.wingnest.bundles.sample.hello\n[INFO] Parameter: packageInPathFormat, Value: com\/wingnest\/bundles\/sample\/hello\n[INFO] Parameter: package, Value: com.wingnest.bundles.sample.hello\n[INFO] Parameter: version, Value: 1.0-SNAPSHOT\n[INFO] Parameter: groupId, Value: com.wingnest.bundles\n[INFO] Parameter: artifactId, Value: com.wingnest.bundles.sample.hello\n[INFO] project created from Archetype in dir: \/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\n[INFO] ------------------------------------------------------------------------\n[INFO] BUILD SUCCESS\n[INFO] ------------------------------------------------------------------------\n[INFO] Total time: 39.195s\n[INFO] Finished at: Fri Feb 06 19:55:44 JST 2015\n[INFO] Final Memory: 15M\/240M\n[INFO] ------------------------------------------------------------------------\n$ \n<\/code><\/pre>\n<p>\u5b9f\u884c\u304c\u6b63\u5e38\u306b\u7d42\u4e86\u3059\u308b\u3068\u3001&#8221;com.wingnest.bundles.sample.hello&#8221; \u3068\u3044\u3046\u540d\u524d\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u3001\u305d\u306e\u4e2d\u306b pom.xml \u30d5\u30a1\u30a4\u30eb\u304c\u3072\u3068\u3064\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><code>$ cd com.wingnest.bundles.sample.hello\/\n$ ls\npom.xml\n$ \n<\/code><\/pre>\n<p>\u3055\u3066\u6b21\u306f\u3001&#8221;com.wingnest.bundles.sample.hello&#8221; \u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e2d\u306b\u3001\u30b5\u30d6\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u3001\u30b5\u30fc\u30d3\u30b9\u306e Bundle \u3092\u5b9f\u88c5\u3059\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3068\u3001\u30b3\u30de\u30f3\u30c9\u306e Bundle \u3092\u5b9f\u88c5\u3059\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001\u30b5\u30fc\u30d3\u30b9\u3092\u5b9f\u88c5\u3059\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092<a href=\"http:\/\/karaf.apache.org\/manual\/latest\/developers-guide\/archetypes.html\">karaf-bundle-archetype<\/a>\u3092\u4f7f\u3063\u3066\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ pwd\n\/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\n$ mvn archetype:generate \\\n    -DarchetypeGroupId=org.apache.karaf.archetypes \\\n    -DarchetypeArtifactId=karaf-bundle-archetype \\\n    -DarchetypeVersion=3.0.3 \\\n    -DgroupId=com.wingnest.bundles.sample.hello \\\n    -DartifactId=com.wingnest.bundles.sample.hello.service \\\n    -Dversion=1.0-SNAPSHOT \\\n    -Dpackage=com.wingnest.bundles.sample.hello.service\n[INFO] Scanning for projects...\n[INFO]                                                                         \n[INFO] ------------------------------------------------------------------------\n[INFO] Building com.wingnest.bundles.sample.hello 1.0-SNAPSHOT\n[INFO] ------------------------------------------------------------------------\n[INFO] \n[INFO] &gt;&gt;&gt; maven-archetype-plugin:2.2:generate (default-cli) @ com.wingnest.bundles.sample.hello &gt;&gt;&gt;\n[INFO] \n[INFO] &lt;&lt;&lt; maven-archetype-plugin:2.2:generate (default-cli) @ com.wingnest.bundles.sample.hello &lt;&lt;&lt;\n[INFO] \n[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ com.wingnest.bundles.sample.hello ---\n[INFO] Generating project in Interactive mode\n[INFO] Archetype repository missing. Using the one from [org.apache.karaf.archetypes:karaf-bundle-archetype:3.0.3] found in catalog remote\n[INFO] Using property: groupId = com.wingnest.bundles.sample.hello\n[INFO] Using property: artifactId = com.wingnest.bundles.sample.hello.service\n[INFO] Using property: version = 1.0-SNAPSHOT\n[INFO] Using property: package = com.wingnest.bundles.sample.hello.service\nConfirm properties configuration:\ngroupId: com.wingnest.bundles.sample.hello\nartifactId: com.wingnest.bundles.sample.hello.service\nversion: 1.0-SNAPSHOT\npackage: com.wingnest.bundles.sample.hello.service\n Y: : \n[INFO] ----------------------------------------------------------------------------\n[INFO] Using following parameters for creating project from Archetype: karaf-bundle-archetype:3.0.3\n[INFO] ----------------------------------------------------------------------------\n[INFO] Parameter: groupId, Value: com.wingnest.bundles.sample.hello\n[INFO] Parameter: artifactId, Value: com.wingnest.bundles.sample.hello.service\n[INFO] Parameter: version, Value: 1.0-SNAPSHOT\n[INFO] Parameter: package, Value: com.wingnest.bundles.sample.hello.service\n[INFO] Parameter: packageInPathFormat, Value: com\/wingnest\/bundles\/sample\/hello\/service\n[INFO] Parameter: version, Value: 1.0-SNAPSHOT\n[INFO] Parameter: package, Value: com.wingnest.bundles.sample.hello.service\n[INFO] Parameter: groupId, Value: com.wingnest.bundles.sample.hello\n[INFO] Parameter: artifactId, Value: com.wingnest.bundles.sample.hello.service\n[INFO] project created from Archetype in dir: \/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\/com.wingnest.bundles.sample.hello.service\n[INFO] ------------------------------------------------------------------------\n[INFO] BUILD SUCCESS\n[INFO] ------------------------------------------------------------------------\n[INFO] Total time: 10.554s\n[INFO] Finished at: Fri Feb 06 20:00:41 JST 2015\n[INFO] Final Memory: 12M\/175M\n[INFO] ------------------------------------------------------------------------\n$ ls\ncom.wingnest.bundles.sample.hello.service  pom.xml\n$ \n<\/code><\/pre>\n<p>\u6b21\u306b\u3001Karaf \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u88c5\u3059\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092<a href=\"http:\/\/karaf.apache.org\/manual\/latest\/developers-guide\/archetypes.html\">karaf-command-archetype<\/a>\u3092\u4f7f\u3063\u3066\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ pwd\n\/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\n$ mvn archetype:generate \\\n    -DarchetypeGroupId=org.apache.karaf.archetypes \\\n    -DarchetypeArtifactId=karaf-command-archetype \\\n    -DarchetypeVersion=3.0.3 \\\n    -DgroupId=com.wingnest.bundles.sample.hello \\\n    -DartifactId=com.wingnest.bundles.sample.hello.command \\\n    -Dversion=1.0-SNAPSHOT \\\n    -Dpackage=com.wingnest.bundles.sample.hello.command\n[INFO] Scanning for projects...\n[INFO] ------------------------------------------------------------------------\n[INFO] Reactor Build Order:\n[INFO] \n[INFO] com.wingnest.bundles.sample.hello\n[INFO] com.wingnest.bundles.sample.hello.service Bundle\n[INFO]                                                                         \n[INFO] ------------------------------------------------------------------------\n[INFO] Building com.wingnest.bundles.sample.hello 1.0-SNAPSHOT\n[INFO] ------------------------------------------------------------------------\n[INFO] \n[INFO] &gt;&gt;&gt; maven-archetype-plugin:2.2:generate (default-cli) @ com.wingnest.bundles.sample.hello &gt;&gt;&gt;\n[INFO] \n[INFO] &lt;&lt;&lt; maven-archetype-plugin:2.2:generate (default-cli) @ com.wingnest.bundles.sample.hello &lt;&lt;&lt;\n[INFO] \n[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ com.wingnest.bundles.sample.hello ---\n[INFO] Generating project in Interactive mode\n[INFO] Archetype repository missing. Using the one from [org.apache.karaf.archetypes:karaf-command-archetype:3.0.3] found in catalog remote\n[INFO] Using property: groupId = com.wingnest.bundles.sample.hello\n[INFO] Using property: artifactId = com.wingnest.bundles.sample.hello.command\n[INFO] Using property: version = 1.0-SNAPSHOT\n[INFO] Using property: package = com.wingnest.bundles.sample.hello.command\nDefine value for property 'command': : hello\nDefine value for property 'description': : hello command\nDefine value for property 'scope': : mycommand\nConfirm properties configuration:\ngroupId: com.wingnest.bundles.sample.hello\nartifactId: com.wingnest.bundles.sample.hello.command\nversion: 1.0-SNAPSHOT\npackage: com.wingnest.bundles.sample.hello.command\ncommand: hello\ndescription: hello command\nscope: mycommand\n Y: : \n[INFO] ----------------------------------------------------------------------------\n[INFO] Using following parameters for creating project from Archetype: karaf-command-archetype:3.0.3\n[INFO] ----------------------------------------------------------------------------\n[INFO] Parameter: groupId, Value: com.wingnest.bundles.sample.hello\n[INFO] Parameter: artifactId, Value: com.wingnest.bundles.sample.hello.command\n[INFO] Parameter: version, Value: 1.0-SNAPSHOT\n[INFO] Parameter: package, Value: com.wingnest.bundles.sample.hello.command\n[INFO] Parameter: packageInPathFormat, Value: com\/wingnest\/bundles\/sample\/hello\/command\n[INFO] Parameter: version, Value: 1.0-SNAPSHOT\n[INFO] Parameter: package, Value: com.wingnest.bundles.sample.hello.command\n[INFO] Parameter: groupId, Value: com.wingnest.bundles.sample.hello\n[INFO] Parameter: scope, Value: mycommand\n[INFO] Parameter: description, Value: hello command\n[INFO] Parameter: command, Value: hello\n[INFO] Parameter: artifactId, Value: com.wingnest.bundles.sample.hello.command\n[INFO] project created from Archetype in dir: \/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\/com.wingnest.bundles.sample.hello.command\n[INFO] ------------------------------------------------------------------------\n[INFO] Reactor Summary:\n[INFO] \n[INFO] com.wingnest.bundles.sample.hello ................. SUCCESS [43.727s]\n[INFO] com.wingnest.bundles.sample.hello.service Bundle .. SKIPPED\n[INFO] ------------------------------------------------------------------------\n[INFO] BUILD SUCCESS\n[INFO] ------------------------------------------------------------------------\n[INFO] Total time: 44.182s\n[INFO] Finished at: Fri Feb 06 20:03:45 JST 2015\n[INFO] Final Memory: 15M\/224M\n[INFO] ------------------------------------------------------------------------\n$ pwd\n\/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\n$ ls\ncom.wingnest.bundles.sample.hello.command  pom.xml\ncom.wingnest.bundles.sample.hello.service\n$\n<\/code><\/pre>\n<p>\u3053\u308c\u3067\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u6e96\u5099\u306f\u6574\u3044\u307e\u3057\u305f\u3002<\/p>\n<h3>\u81ea\u52d5\u751f\u6210\u3057\u305f\u3070\u304b\u308a\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u52d5\u304b\u3057\u3066\u307f\u308b<\/h3>\n<p>\u307e\u305a\u3001\u30bd\u30fc\u30b9\u3092\u898b\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>com.wingnest.bundles.sample.hello.service\/src\/main\/java\/com\/wingnest\/bundles\/sample\/hello\/service\/Activator.java<br \/>\n\u3092\u30a8\u30c7\u30a3\u30bf\u3067\u958b\u304d\u307e\u3059\u3002<\/p>\n<pre><code>package com.wingnest.bundles.sample.hello.service;\n\nimport org.osgi.framework.BundleActivator;\nimport org.osgi.framework.BundleContext;\n\npublic class Activator implements BundleActivator {\n\n    public void start(BundleContext context) {\n        System.out.println(\"Starting the bundle\");\n    }\n\n    public void stop(BundleContext context) {\n        System.out.println(\"Stopping the bundle\");\n    }\n\n}\n<\/code><\/pre>\n<p>\u81ea\u52d5\u751f\u6210\u3055\u308c\u305f\u3053\u306e\u30b3\u30fc\u30c9\u306f\u3001\u30b5\u30fc\u30d3\u30b9\u304c\u958b\u59cb\u3057\u305f\u6642\u306b &#8220;Starting the bundle&#8221; \u3068\u51fa\u529b\u3057\u3001\u505c\u6b62\u3057\u305f\u6642\u306b &#8220;Stopping the bundle&#8221; \u3068\u51fa\u529b\u3057\u305d\u3046\u3067\u3059\u306d\u3002\u3042\u3068\u304b\u3089\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3067\u306f\u3001Maven \u306e\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u3055\u3089\u306b Karaf \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u52d5\u304b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001mvn install \u3092\u5b9f\u884c\u3057\u3066\u3001Maven \u306e\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30b5\u30fc\u30d3\u30b9\u306e Bundle \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ cd com.wingnest.bundles.sample.hello.service\n$ mvn install\n[INFO] Scanning for projects...\n[INFO]                                                                         \n[INFO] ------------------------------------------------------------------------\n[INFO] Building com.wingnest.bundles.sample.hello.service Bundle 1.0-SNAPSHOT\n[INFO] ------------------------------------------------------------------------\n[INFO] \n[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ com.wingnest.bundles.sample.hello.service ---\n[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!\n[INFO] skip non existing resourceDirectory \/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\/com.wingnest.bundles.sample.hello.service\/src\/main\/resources\n[INFO] \n[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ com.wingnest.bundles.sample.hello.service ---\n[INFO] Changes detected - recompiling the module!\n[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!\n[INFO] Compiling 1 source file to \/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\/com.wingnest.bundles.sample.hello.service\/target\/classes\n[INFO] \n[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ com.wingnest.bundles.sample.hello.service ---\n[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!\n[INFO] skip non existing resourceDirectory \/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\/com.wingnest.bundles.sample.hello.service\/src\/test\/resources\n[INFO] \n[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ com.wingnest.bundles.sample.hello.service ---\n[INFO] No sources to compile\n[INFO] \n[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ com.wingnest.bundles.sample.hello.service ---\n[INFO] \n[INFO] --- maven-bundle-plugin:2.5.3:bundle (default-bundle) @ com.wingnest.bundles.sample.hello.service ---\n[INFO] \n[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ com.wingnest.bundles.sample.hello.service ---\n[INFO] Installing \/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\/com.wingnest.bundles.sample.hello.service\/target\/com.wingnest.bundles.sample.hello.service-1.0-SNAPSHOT.jar to \/home\/gougi\/.m2\/repository\/com\/wingnest\/bundles\/sample\/hello\/com.wingnest.bundles.sample.hello.service\/1.0-SNAPSHOT\/com.wingnest.bundles.sample.hello.service-1.0-SNAPSHOT.jar\n[INFO] Installing \/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\/com.wingnest.bundles.sample.hello.service\/pom.xml to \/home\/gougi\/.m2\/repository\/com\/wingnest\/bundles\/sample\/hello\/com.wingnest.bundles.sample.hello.service\/1.0-SNAPSHOT\/com.wingnest.bundles.sample.hello.service-1.0-SNAPSHOT.pom\n[INFO] \n[INFO] --- maven-bundle-plugin:2.5.3:install (default-install) @ com.wingnest.bundles.sample.hello.service ---\n[INFO] Installing com\/wingnest\/bundles\/sample\/hello\/com.wingnest.bundles.sample.hello.service\/1.0-SNAPSHOT\/com.wingnest.bundles.sample.hello.service-1.0-SNAPSHOT.jar\n[INFO] Writing OBR metadata\n[INFO] ------------------------------------------------------------------------\n[INFO] BUILD SUCCESS\n[INFO] ------------------------------------------------------------------------\n[INFO] Total time: 1.570s\n[INFO] Finished at: Fri Feb 06 23:14:50 JST 2015\n[INFO] Final Memory: 20M\/251M\n[INFO] ------------------------------------------------------------------------\n$\n<\/code><\/pre>\n<p>\u6b21\u306b\u3001Maven \u306e\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30b5\u30fc\u30d3\u30b9\u306e Bundle\u3092 Karaf \u306e\u4e2d\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059<sup><a href=\"#footnote_1_150\" id=\"identifier_1_150\" class=\"footnote-link footnote-identifier-link\" title=\"\u3082\u3057\u3001\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u3066\u3044\u3066\u3001Karaf \u304c\u305d\u308c\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u5834\u5408\u306f\u3001Karaf \u306e etc\/org.ops4j.pax.url.mvn.cfg \u30d5\u30a1\u30a4\u30eb\u306b\u3001\u305d\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u52a0\u3048\u3066\u304f\u3060\u3055\u3044\u3002\">1<\/a><\/sup>\u3002<br \/>\nApache Karaf \u3092 <a href=\"http:\/\/karaf.apache.org\/index\/community\/download.html\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a>\u3057\u3066\u3001\u9069\u5f53\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u5c55\u958b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/ \u306e\u4e0b\u306b\u5c55\u958b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code>$ pwd\n\/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/apache-karaf-3.0.3\n$ bin\/karaf\n        __ __                  ____      \n       \/ \/\/_\/____ __________ _\/ __\/      \n      \/ ,&lt;  \/ __ `\/ ___\/ __ `\/ \/_        \n     \/ \/| |\/ \/_\/ \/ \/  \/ \/_\/ \/ __\/        \n    \/_\/ |_|\\__,_\/_\/   \\__,_\/_\/         \n\n  Apache Karaf (3.0.3)\n\nHit '&lt;tab&gt;' for a list of available commands\nand '[cmd] --help' for help on a specific command.\nHit '&lt;ctrl-d&gt;' or type 'system:shutdown' or 'logout' to shutdown Karaf.\n\nkaraf@root()&gt; install -s mvn:com.wingnest.bundles.sample.hello\/com.wingnest.bundles.sample.hello.service\/1.0-SNAPSHOT\nStarting the bundle\nBundle ID: 64\nkaraf@root()&gt; list\nSTART LEVEL 100 , List Threshold: 50\nID | State  | Lvl | Version        | Name                                            \n-------------------------------------------------------------------------------------\n64 | Active |  80 | 1.0.0.SNAPSHOT | com.wingnest.bundles.sample.hello.service Bundle\nkaraf@root()&gt; \n<\/code><\/pre>\n<p>install \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u5148\u307b\u3069\u78ba\u8a8d\u3057\u305f\u3001Activator#start() \u30e1\u30bd\u30c3\u30c9\u306e\u4e2d\u306b\u3042\u3063\u305f &#8220;Starting the bundle&#8221; \u3068\u3044\u3046\u6587\u5b57\u5217\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u305f\u3081\u3057\u306b\u3001\u3053\u306e\u30b5\u30fc\u30d3\u30b9\u306e Bundle \u3092 stop \u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre><code>karaf@root()&gt; stop 64\nStopping the bundle\nkaraf@root()&gt; \n<\/code><\/pre>\n<p>Activator#stop()\u30e1\u30bd\u30c3\u30c9\u306e\u4e2d\u306b\u3042\u3063\u305f&#8221;Stopping the bundle&#8221;\u3068\u3044\u3046\u6587\u5b57\u5217\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002\u4e88\u60f3\u3069\u304a\u308a\u3067\u3059\u306d\u3002<\/p>\n<p>\u3067\u306f\u3001\u30bd\u30fc\u30b9\u3092\u6b21\u306e\u3088\u3046\u306b\u3001\u4fee\u6b63\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\nprintln() \u306e\u4e2d\u306e\u6587\u5b57\u5217\u306e\u672b\u5c3e\u306b\u3001!\u30de\u30fc\u30af\u3092\uff12\u3064\u305a\u3064\u52a0\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code>public class Activator implements BundleActivator {\n\n    public void start(BundleContext context) {\n        System.out.println(\"Starting the bundle!!\");\n    }\n\n    public void stop(BundleContext context) {\n        System.out.println(\"Stopping the bundle!!\");\n    }\n\n}\n<\/code><\/pre>\n<p>\u52a0\u3048\u305f\u3089\u3001\u7aef\u672b\u304b\u3089 mvn install \u3057 Maven \u306e\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001\u305d\u306e\u5f8c\u3001\u7d9a\u3051\u3066\u3001Karaf \u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089 \u30b5\u30fc\u30d3\u30b9\u306e Bundle \u3092 update \u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001mvn install \u3092\u3057\u3066\u3001Maven \u306e\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ pwd\n\/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\/com.wingnest.bundles.sample.hello.service\n$ mvn install\n[INFO] Scanning for projects...\n[INFO]                                                                         \n[INFO] ------------------------------------------------------------------------\n[INFO] Building com.wingnest.bundles.sample.hello.service Bundle 1.0-SNAPSHOT\n[INFO] ------------------------------------------------------------------------\n(\u7701\u7565)\n[INFO] ------------------------------------------------------------------------\n[INFO] BUILD SUCCESS\n[INFO] ------------------------------------------------------------------------\n[INFO] Total time: 1.708s\n[INFO] Finished at: Fri Feb 06 23:49:55 JST 2015\n[INFO] Final Memory: 20M\/248M\n[INFO] ------------------------------------------------------------------------\n$ \n<\/code><\/pre>\n<p>\u305d\u3057\u3066\u3001Karaf \u30b3\u30f3\u30bd\u30fc\u30eb\u3067 update\u3057\u307e\u3059\u3002<\/p>\n<pre><code>karaf@root()&gt; update 64\nStopping the bundle\nStarting the bundle!!\nkaraf@root()&gt; \n<\/code><\/pre>\n<p>\u958b\u59cb\u3057\u305f\u6642\u306b\u51fa\u529b\u3055\u308c\u308b\u6587\u5b57\u5217\u306e\u672b\u5c3e\u306b&#8221;!!&#8221;\u304c\u3064\u3044\u3066&#8221;Starting the bundle!!&#8221;\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u306d\u3002\u3053\u306e\u3088\u3046\u306b\u306a\u308b\u306e\u306f\u3001\u7d42\u4e86\u306e\u30bf\u30a4\u30df\u30f3\u30b0(Stopping)\u3067\u306f\u307e\u3060\u53e4\u3044Bundle\u304c\u4f7f\u308f\u308c\u3001\u958b\u59cb\u306e\u30bf\u30a4\u30df\u30f3\u30b0(Staring)\u3067\u66f4\u65b0\u3055\u308c\u305f\u65b0\u3057\u3044Bundle\u306b\u7f6e\u304d\u63db\u308f\u308b\u304b\u3089\u3067\u3059\u306d\u3002<\/p>\n<p>\u3082\u3046\u4e00\u5ea6update\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre><code>karaf@root()&gt; update 64\nStopping the bundle!!\nStarting the bundle!!\nkaraf@root()&gt; \n<\/code><\/pre>\n<p>\u4e21\u65b9\u306e\u6587\u5b57\u5217\u306e\u672b\u5c3e\u306b&#8221;!!&#8221;\u304c\u4ed8\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>update\u306f\u3001\u307e\u305a\u3001Bundle\u3092\u505c\u6b62\u3057\u3066\u3001\u305d\u306e\u3042\u3068\u3001Bundle\u304c\u66f4\u65b0\u3055\u308c\u3066\u3044\u308b\u304b\u3092\u8abf\u3079\u3066\u3001\u3082\u3057\u66f4\u65b0\u3055\u308c\u3066\u3044\u308c\u3070\u3001\u73fe\u5728\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bBundle\u3092\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u6700\u65b0\u306e\u3082\u306e\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u6700\u5f8c\u306b\u3001Bundle\u3092\u958b\u59cb\u3057\u307e\u3059\u306e\u3067\u3001\u3053\u306e\u3088\u3046\u306a\u52d5\u304d\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>\u30b5\u30fc\u30d3\u30b9\u306e\u5b9f\u88c5\u3092\u5909\u66f4\u3059\u308b<\/h3>\n<p>\u3067\u306f\u3001\u30b5\u30fc\u30d3\u30b9\u306e\u5b9f\u88c5\u3092\u5909\u66f4\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u3001\u6b21\u306b\u793a\u3059 Hello \u3068\u3044\u3046\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092 com.wingnest.bundles.sample.hello.service \u306b\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><code>Hello.java:\n---\npackage com.wingnest.bundles.sample.hello.service;\n\npublic interface Hello {\n\n}\n<\/code><\/pre>\n<p>\u6b21\u306b\u3001\u305d\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u4f7f\u3063\u305f\u5b9f\u88c5\u30af\u30e9\u30b9 HelloImpl \u3092 Activator \u30af\u30e9\u30b9\u306e\u4e2d\u306b\u8a18\u8ff0\u3057<sup><a href=\"#footnote_2_150\" id=\"identifier_2_150\" class=\"footnote-link footnote-identifier-link\" title=\"\u3082\u3061\u308d\u3093\u5c02\u7528\u306ejava\u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8ff0\u3057\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\">2<\/a><\/sup>\u3001BundleContext#registerService()\u3092\u4f7f\u3044\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306b\u767b\u9332\u3059\u308b\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u3064\u3044\u3067\u306b\u3001\u5909\u66f4\u304c\u53cd\u6620\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u6587\u5b57\u5217\u306e\u672b\u5c3e\u306e!\u30de\u30fc\u30af\u3092\uff13\u3064\u306b\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><code>Activator.java:\n---\npackage com.wingnest.bundles.sample.hello.service;\n\nimport org.osgi.framework.BundleActivator;\nimport org.osgi.framework.BundleContext;\nimport org.osgi.framework.ServiceRegistration;\n\npublic class Activator implements BundleActivator {\n\n    private ServiceRegistration&lt;Hello&gt; registration;\n\n    public void start(BundleContext context) {\n        System.out.println(\"Starting the bundle!!!\");\n        registration = context.registerService(Hello.class, new HelloImpl(), null);\n    }\n\n    public void stop(BundleContext context) {\n        System.out.println(\"Stopping the bundle!!!\");\n        registration.unregister();\n    }\n\n    public static class HelloImpl implements Hello {\n\n        public String toString() {\n            return \"hello\";\n        }\n\n    }\n\n}\n<\/code><\/pre>\n<p>\u4fee\u6b63\u3092\u7d42\u3048\u305f\u3089\u3001\u518d\u5ea6\u3001mvn install \u3057\u3066\u30b5\u30fc\u30d3\u30b9\u306e Bundle \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u306a\u304a\u3057\u307e\u3059\u3002<br \/>\n\u305d\u3057\u3066\u3001Karaf \u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u3001\u30b5\u30fc\u30d3\u30b9\u3092\u305d\u306e\u65b0\u3057\u3044 Bundle \u306b update \u3057\u307e\u3059\u3002<\/p>\n<pre><code>karaf@root()&gt; update 64\nStopping the bundle!!\nStarting the bundle!!!\nkaraf@root()&gt; list\nSTART LEVEL 100 , List Threshold: 50\nID | State  | Lvl | Version        | Name                                            \n-------------------------------------------------------------------------------------\n64 | Active |  80 | 1.0.0.SNAPSHOT | com.wingnest.bundles.sample.hello.service Bundle\nkaraf@root()&gt; \n<\/code><\/pre>\n<p>\u958b\u59cb\u6642\u306b\u51fa\u529b\u3055\u308c\u308b\u6587\u5b57\u5217\u306e\u672b\u5c3e\u306e!\u30de\u30fc\u30af\u304c\uff13\u3064\u306b\u306a\u308a\u307e\u3057\u305f\u306d\u3002\u3046\u307e\u304f\u7f6e\u304d\u63db\u308f\u3063\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>list \u30b3\u30de\u30f3\u30c9(=bundle:list\u30b3\u30de\u30f3\u30c9\u3068\u540c\u7b49)\u306e\u7d50\u679c\u306b\u3088\u308b\u3068\u3001\u30b5\u30fc\u30d3\u30b9\u3092\u5165\u308c\u305f Bundle \u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3082\u3001Active \u3068\u306a\u3063\u3066\u3044\u3066\u3001\u554f\u984c\u306a\u304f\u7a3c\u50cd\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<h3>\u30b3\u30de\u30f3\u30c9\u3092\u4fee\u6b63\u3059\u308b<\/h3>\n<p>\u3055\u3066\u3001mycommand:hello \u30b3\u30de\u30f3\u30c9\u3092\u4fee\u6b63\u3057\u3066\u3001\u30b5\u30fc\u30d3\u30b9\u306e #toString() \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u3088\u3046\u306a\u5b9f\u88c5\u306b\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u304c\u3001\u305d\u306e\u524d\u306b\u3001\u751f\u6210\u3055\u308c\u305f\u307e\u307e\u306e mycommand:hello \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u52d5\u4f5c\u3055\u305b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u3001mvn install \u3067 Maven \u306e\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u3001\u30b3\u30de\u30f3\u30c9\u306e Bundle \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ cd ..\/com.wingnest.bundles.sample.hello.command\n$ mvn install\n[INFO] Scanning for projects...\n[INFO]                                                                         \n[INFO] ------------------------------------------------------------------------\n[INFO] Building Apache Karaf :: Shell mycommand\/hello Commands 1.0-SNAPSHOT\n[INFO] ------------------------------------------------------------------------\n(\u7701\u7565)\n[INFO] ------------------------------------------------------------------------\n[INFO] BUILD SUCCESS\n[INFO] ------------------------------------------------------------------------\n[INFO] Total time: 1.655s\n[INFO] Finished at: Sat Feb 07 17:01:07 JST 2015\n[INFO] Final Memory: 22M\/308M\n[INFO] ------------------------------------------------------------------------\n$ \n<\/code><\/pre>\n<p>\u6b21\u306b\u3001Karaf\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u6b21\u306e\u3088\u3046\u306b\u5165\u529b\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre><code>karaf@root()&gt; install -s mvn:com.wingnest.bundles.sample.hello\/com.wingnest.bundles.sample.hello.command\/1.0-SNAPSHOT\nBundle ID: 65\nkaraf@root()&gt; list\nSTART LEVEL 100 , List Threshold: 50\nID | State  | Lvl | Version        | Name                                            \n-------------------------------------------------------------------------------------\n64 | Active |  80 | 1.0.0.SNAPSHOT | com.wingnest.bundles.sample.hello.service Bundle\n65 | Active |  80 | 1.0.0.SNAPSHOT | Apache Karaf :: Shell mycommand\/hello Commands  \nkaraf@root()&gt; \n<\/code><\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u7d42\u3048\u305f\u3089\u3001mycommand:hello\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre><code>karaf@root()&gt; mycommand:hello \nExecuting command hello\nOption: null\nArgument: null\nkaraf@root()&gt; \n<\/code><\/pre>\n<p>\u3053\u306e\u5b9f\u884c\u7d50\u679c\u306b\u3064\u3044\u3066\u306f\u3001\u300c<a href=\"http:\/\/www.wingnest.com\/blog\/archives\/6\">Maven archetype\u3092\u4f7f\u3063\u3066\u30ab\u30b9\u30bf\u30e0Karaf\u30b3\u30de\u30f3\u30c9\u3092\u4f5c\u6210\u3059\u308b<\/a>\u300d\u3068\u3044\u3046\u8a18\u4e8b\u3092\u53c2\u7167\u3057\u3066\u3044\u305f\u3060\u3051\u308c\u3070\u5e78\u3044\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u30a8\u30c7\u30a3\u30bf\u3067 hello.java \u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u6b21\u306e\u3088\u3046\u306b\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<pre><code>package com.wingnest.bundles.sample.hello.command;\n\nimport org.apache.karaf.shell.console.OsgiCommandSupport;\nimport org.apache.karaf.shell.commands.Command;\nimport org.osgi.framework.BundleContext;\nimport org.osgi.framework.ServiceReference;\n\n@Command(scope = \"mycommand\", name = \"hello\", description = \"hello command\")\npublic class hello extends OsgiCommandSupport {\n\n    protected Object doExecute() throws Exception {\n        BundleContext context = this.getBundleContext();\n        ServiceReference&lt;?&gt; serviceReference = context.getServiceReference(\"com.wingnest.bundles.sample.hello.service.Hello\");\n        if (serviceReference != null ) {\n            Object service = context.getService(serviceReference);\n            System.out.println(service.toString()); \/\/ (\u6ce8\uff1a\u5f8c\u304b\u3089\u4fee\u6b63\u3059\u308b)\n        }\n        return null;\n    }\n}\n<\/code><\/pre>\n<p>com.wingnest.bundles.sample.hello.service.Hello \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5b9f\u88c5\u3057\u305f\u30b5\u30fc\u30d3\u30b9\u3092\u307f\u3064\u3051\u3066\u3001\u305d\u306e\u30b5\u30fc\u30d3\u30b9\u306e#toString() \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3001\u305d\u306e\u7d50\u679c\u3092\u6a19\u6e96\u51fa\u529b\u306b\u30d7\u30ea\u30f3\u30c8\u3059\u308b\u3088\u3046\u306b\u4fee\u6b63\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u3053\u306e\u4fee\u6b63\u3057\u305f\u30b3\u30de\u30f3\u30c9\u306e Bundle \u3092 Maven \u306e\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><code>$ pwd\n\/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\/com.wingnest.bundles.sample.hello.command\n$ mvn install\n[INFO] Scanning for projects...\n[INFO]                                                                         \n[INFO] ------------------------------------------------------------------------\n[INFO] Building Apache Karaf :: Shell mycommand\/hello Commands 1.0-SNAPSHOT\n[INFO] ------------------------------------------------------------------------\n\uff08\u7701\u7565\uff09\n[INFO] ------------------------------------------------------------------------\n[INFO] BUILD SUCCESS\n[INFO] ------------------------------------------------------------------------\n[INFO] Total time: 1.496s\n[INFO] Finished at: Sat Feb 07 17:22:07 JST 2015\n[INFO] Final Memory: 16M\/314M\n[INFO] ------------------------------------------------------------------------\n$\n<\/code><\/pre>\n<p>\u7d9a\u3044\u3066\u3001Karaf \u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u3001\u4fee\u6b63\u3057\u305f\u30b3\u30de\u30f3\u30c9 \u306e Bundle \u3092\u66f4\u65b0(update)\u3057\u3001mycommand:hello \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre><code>karaf@root()&gt; list\nSTART LEVEL 100 , List Threshold: 50\nID | State  | Lvl | Version        | Name                                            \n-------------------------------------------------------------------------------------\n64 | Active |  80 | 1.0.0.SNAPSHOT | com.wingnest.bundles.sample.hello.service Bundle\n65 | Active |  80 | 1.0.0.SNAPSHOT | Apache Karaf :: Shell mycommand\/hello Commands  \nkaraf@root()&gt; update 65\nkaraf@root()&gt; mycommand:hello \nhello\nkaraf@root()&gt; \n<\/code><\/pre>\n<p>\u671f\u5f85\u901a\u308a\u306b &#8220;hello&#8221; \u3068\u51fa\u529b\u3055\u308c\u307e\u3057\u305f!!<\/p>\n<h3>Hello \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u304d\u3061\u3093\u3068\u5b9a\u7fa9\u3057\u5229\u7528\u3059\u308b<\/h3>\n<p>\u304a\u5bdf\u3057\u306e\u3053\u3068\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u3053\u3053\u307e\u3067\u306e\u5b9f\u88c5\u3067\u306f\u3001Hello \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u304d\u3061\u3093\u3068\u4f7f\u3063\u3066\u3044\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u30e1\u30bd\u30c3\u30c9\u306f\u3072\u3068\u3064\u3082\u5b9a\u7fa9\u3057\u3066\u3044\u306a\u3044\u306e\u306b\u3001\u30b3\u30de\u30f3\u30c9\u304b\u3089\u306f\u3001\u305d\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\u30b5\u30fc\u30d3\u30b9\u3092\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u540d\u3092\u4f7f\u3063\u3066\u53d6\u5f97\u3057\u3001\u3055\u3089\u306b\u305d\u3053\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044 #toString() \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u306e\u602a\u3057\u3044\u90e8\u5206\u3092\u305d\u308c\u3089\u3057\u304f\u4fee\u6b63\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u5177\u4f53\u7684\u306b\u306f\u3001Hello \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306b String hello() \u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3057\u3001\u305d\u306e\u5b9f\u88c5\u30af\u30e9\u30b9(HelloImpl)\u3067\u306f\u547c\u3073\u51fa\u3055\u308c\u308b\u3068 &#8220;hello&#8221;\u3068\u3044\u3046\u6587\u5b57\u5217\u3092\u8fd4\u3059\u3088\u3046\u306bHelloImpl#hello()\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001\u30b5\u30fc\u30d3\u30b9\u306e\u65b9\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<p>Hello \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306f\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre><code>package com.wingnest.bundles.sample.hello.service;\n\npublic interface Hello {\n    String hello();\n}\n<\/code><\/pre>\n<p>\u3053\u306e\u4fee\u6b63\u3092\u53d7\u3051\u3066\u3001Hello \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u5b9f\u88c5\u30af\u30e9\u30b9(HelloImpl)\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code>public class Activator implements BundleActivator {\n\n\uff08\u7701\u7565\uff09\n\n    public static class HelloImpl implements Hello {\n\n        public String hello() {\n            return \"hello\";\n        }\n\n    }\n}\n<\/code><\/pre>\n<p>\u4fee\u6b63\u3092\u7d42\u3048\u305f\u3089\u3001mvn install \u3057\u3066\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5165\u308c\u307e\u3059\u3002<\/p>\n<pre><code>$ pwd\n\/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\/com.wingnest.bundles.sample.hello.service\n$ mvn install\n[INFO] Scanning for projects...\n[INFO]                                                                         \n[INFO] ------------------------------------------------------------------------\n[INFO] Building com.wingnest.bundles.sample.hello.service Bundle 1.0-SNAPSHOT\n[INFO] ------------------------------------------------------------------------\n(\u7701\u7565)\n[INFO] ------------------------------------------------------------------------\n[INFO] BUILD SUCCESS\n[INFO] ------------------------------------------------------------------------\n[INFO] Total time: 1.663s\n[INFO] Finished at: Sun Feb 08 10:51:56 JST 2015\n[INFO] Final Memory: 20M\/254M\n[INFO] ------------------------------------------------------------------------\n$ \n<\/code><\/pre>\n<p>\u3053\u3053\u3067\u8a66\u3057\u306b\u3001 Karaf \u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u30b5\u30fc\u30d3\u30b9\u3092 update \u3057\u3001\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre><code>karaf@root()&gt; update 64\nStopping the bundle!!!\nStarting the bundle!!!\nkaraf@root()&gt; mycommand:hello \ncom.wingnest.bundles.sample.hello.service.Activator$HelloImpl@64950b18\nkaraf@root()&gt; \n<\/code><\/pre>\n<p>\u30b5\u30fc\u30d3\u30b9\u3092 update \u3059\u308b\u4ee5\u524d\u306f\u3001&#8221;hello&#8221;\u3068\u51fa\u529b\u3055\u308c\u3066\u3044\u305f\u306e\u306b\u3001update \u3059\u308b\u3068 &#8220;com.wingnest.bundles.sample.hello.service.Activator$HelloImpl@64950b18&#8221; \u3068\u51fa\u529b\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u306e\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u306f\u3001#toString() \u30e1\u30bd\u30c3\u30c9\u304c\u3001Object \u30af\u30e9\u30b9\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u5b9f\u88c5\u306b\u623b\u3063\u305f\u304b\u3089\u3067\u3059\u306d\u3002<\/p>\n<p>\u3067\u306f\u3001\u30b3\u30de\u30f3\u30c9\u306e\u4e2d\u3067\u547c\u3073\u51fa\u3057\u3066\u3044\u308b\u30e1\u30bd\u30c3\u30c9\u3092 #toString() \u30e1\u30bd\u30c3\u30c9\u304b\u3089 #hello() \u30e1\u30bd\u30c3\u30c9\u306b\u5909\u66f4\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u3001\u30b3\u30de\u30f3\u30c9\u306e pom.xml \u306b\u3001\u30b5\u30fc\u30d3\u30b9\u306e dependency \u3092\u52a0\u3048\u307e\u3059\u3002<\/p>\n<pre><code>\uff08\u7701\u7565\uff09\n    &lt;dependencies&gt;\n        &lt;dependency&gt;\n            &lt;groupId&gt;com.wingnest.bundles.sample.hello&lt;\/groupId&gt;\n            &lt;artifactId&gt;com.wingnest.bundles.sample.hello.service&lt;\/artifactId&gt;\n            &lt;version&gt;1.0-SNAPSHOT&lt;\/version&gt;\n        &lt;\/dependency&gt;\n\uff08\u7701\u7565\uff09\n<\/code><\/pre>\n<p>\u6b21\u306b\u3001com.wingnest.bundles.sample.hello.command.hello \u30af\u30e9\u30b9\u3092\u6b21\u306e\u3088\u3046\u306b\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<pre><code>package com.wingnest.bundles.sample.hello.command;\n\nimport org.apache.karaf.shell.console.OsgiCommandSupport;\nimport org.apache.karaf.shell.commands.Command;\nimport org.osgi.framework.BundleContext;\nimport org.osgi.framework.ServiceReference;\n\nimport com.wingnest.bundles.sample.hello.service.Hello;\n\n@Command(scope = \"mycommand\", name = \"hello\", description = \"hello command\")\npublic class hello extends OsgiCommandSupport {\n\n    protected Object doExecute() throws Exception {\n        BundleContext context = this.getBundleContext();\n        ServiceReference&lt;Hello&gt; serviceReference = context.getServiceReference(com.wingnest.bundles.sample.hello.service.Hello.class);\n        if (serviceReference != null ) {\n            Hello service = context.getService(serviceReference);\n            System.out.println(service.hello());\n        }\n        return null;\n    }\n}\n<\/code><\/pre>\n<p>\u4e3b\u306a\u4fee\u6b63\u306f\u3001\u6b21\u306e\uff12\u3064\u3067\u3059\u3002<br \/>\n\u3072\u3068\u3064\u306f\u3001Hello \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u53c2\u7167\u304c\u3001\u4fee\u6b63\u524d\u306f\u6587\u5b57\u5217\u3060\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u4fee\u6b63\u5f8c\u306fClass\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u3088\u308b\u53c2\u7167\u306b\u5909\u308f\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3082\u3046\u3072\u3068\u3064\u306f\u3001\u547c\u3073\u51fa\u3059\u30e1\u30bd\u30c3\u30c9\u3082\u3001\u4fee\u6b63\u524d\u306f#toString()\u3067\u3057\u305f\u304c\u3001\u4fee\u6b63\u5f8c\u306f#hello()\u306b\u5909\u308f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u4fee\u6b63\u3057\u305f\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092 mvn install \u3057\u3066\u3001Karaf \u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001mvn install\u3002<\/p>\n<pre><code>$ pwd\n\/home\/gougi\/\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\/Karaf\/com.wingnest.bundles.sample.hello\/com.wingnest.bundles.sample.hello.command\n$ mvn install\n[INFO] Scanning for projects...\n[INFO]                                                                         \n[INFO] ------------------------------------------------------------------------\n[INFO] Building Apache Karaf :: Shell mycommand\/hello Commands 1.0-SNAPSHOT\n[INFO] ------------------------------------------------------------------------\n(\u7701\u7565)\n[INFO] ------------------------------------------------------------------------\n[INFO] BUILD SUCCESS\n[INFO] ------------------------------------------------------------------------\n[INFO] Total time: 1.727s\n[INFO] Finished at: Sun Feb 08 11:17:39 JST 2015\n[INFO] Final Memory: 21M\/255M\n[INFO] ------------------------------------------------------------------------\n$ \n<\/code><\/pre>\n<p>\u3046\u307e\u304f\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u306b\u6210\u529f\u3057\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306b\u3001Karaf \u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u3000update \u3057\u307e\u3059\u3002<\/p>\n<pre><code>karaf@root()&gt; list\nSTART LEVEL 100 , List Threshold: 50\nID | State  | Lvl | Version        | Name                                            \n-------------------------------------------------------------------------------------\n64 | Active |  80 | 1.0.0.SNAPSHOT | com.wingnest.bundles.sample.hello.service Bundle\n65 | Active |  80 | 1.0.0.SNAPSHOT | Apache Karaf :: Shell mycommand\/hello Commands  \nkaraf@root()&gt; update 65\nkaraf@root()&gt; \n<\/code><\/pre>\n<p>\u3067\u306f\u3001\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><code>karaf@root()&gt; mycommand:hello\nhello\nkaraf@root()&gt; \n<\/code><\/pre>\n<p>\u671f\u5f85\u3057\u305f\u901a\u308a\u3001\u3061\u3083\u3093\u3068 &#8220;hello&#8221;\u3068\u51fa\u529b\u3055\u308c\u307e\u3057\u305f\uff01<\/p>\n<p>\u3053\u3053\u3067\u3001mvn install(\u307e\u305f\u306f mvn package) \u3067\u3001\u751f\u6210\u3055\u308c\u308b\u30b5\u30fc\u30d3\u30b9\u3068\u30b3\u30de\u30f3\u30c9\u306e Bundle(\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u306fjar) \u306e\u4e2d\u306b\u3042\u308b\u3001META-INF\/MANIFEST.MF \u306e\u5185\u5bb9\u3068 \u305d\u308c\u305e\u308c\u306e pom.xml \u306e\u4e2d\u306e maven-bundle-plugin \u8981\u7d20\u306e\u4e2d\u306e\u8a18\u8ff0\u306b\u3064\u3044\u3066\u89e6\u308c\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u304c\u3001\u968f\u5206\u3068\u9577\u304f\u306a\u3063\u305f\u306e\u3067\u3053\u306e\u8a18\u4e8b\u306f\u3053\u306e\u8fba\u3067\u3002<\/p>\n<ul>\n<li>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff1a<br \/>\n<a href=\"https:\/\/github.com\/sgougi\/OSGiSample-HelloProject\/tree\/phase1\">https:\/\/github.com\/sgougi\/OSGiSample-HelloProject\/tree\/phase1<\/a><\/p>\n<\/li>\n<li>\n<p>\u3053\u306e\u8a18\u4e8b\u306e\u7d9a\u304d\u306f\u3001<a href=\"http:\/\/www.wingnest.com\/blog\/archives\/193\">\u3053\u3061\u3089<\/a><\/p>\n<\/li>\n<\/ul>\n<h3>\u3042\u3068\u304c\u304d<\/h3>\n<p>Hello \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306f\u3001\u3042\u307e\u308a\u306b\u5358\u7d14\u306a\u306e\u3067\u3042\u308c\u3067\u3059\u304c\u3001\u30b5\u30fc\u30d3\u30b9\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3060\u3051\u3092\u96c6\u3081\u305f Bundle \u3092\u5225\u306b\u7528\u610f\u3059\u308c\u3070\u3001\u30b5\u30fc\u30d3\u30b9\u3068\u30b3\u30de\u30f3\u30c9\u3092\u305d\u308c\u305e\u308c\u7570\u306a\u308b\u4eba\u3084\u7d44\u7e54\u304c\u958b\u767a\u3059\u308b\u5834\u5408\u3084\u3001\u30b5\u30fc\u30d3\u30b9\u306e\u8907\u6570\u306e\u7570\u306a\u308b\u5b9f\u88c5\u3092\u7528\u610f\u3059\u308b\u5834\u5408\u306b\u3001\u90fd\u5408\u304c\u826f\u3055\u305d\u3046\u3067\u3059\u3002<br \/>\n\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u3053\u306e\u8fba\u308a\u307e\u3067\u306f\u8e0f\u307f\u8fbc\u3093\u3067\u3044\u307e\u305b\u3093\u306e\u3067\u306e\u3067\u3001\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002<\/p>\n<ol class=\"footnotes\"><li id=\"footnote_1_150\" class=\"footnote\">\u3082\u3057\u3001\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u3066\u3044\u3066\u3001Karaf \u304c\u305d\u308c\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u5834\u5408\u306f\u3001Karaf \u306e etc\/org.ops4j.pax.url.mvn.cfg \u30d5\u30a1\u30a4\u30eb\u306b\u3001\u305d\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u52a0\u3048\u3066\u304f\u3060\u3055\u3044\u3002<span class=\"footnote-back-link-wrapper\"> [<a href=\"#identifier_1_150\" class=\"footnote-link footnote-back-link\">&#8617;<\/a>]<\/span><\/li><li id=\"footnote_2_150\" class=\"footnote\">\u3082\u3061\u308d\u3093\u5c02\u7528\u306ejava\u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8ff0\u3057\u3066\u3082\u69cb\u3044\u307e\u305b\u3093<span class=\"footnote-back-link-wrapper\"> [<a href=\"#identifier_2_150\" class=\"footnote-link footnote-back-link\">&#8617;<\/a>]<\/span><\/li><\/ol>","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u306f\u3001\u3068\u3066\u3082\u5358\u7d14\u306a OSGi\u30d9\u30fc\u30b9\u306e\u30b5\u30fc\u30d3\u30b9\u3068\u3001\u305d\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3059\u308b A&hellip;  <\/p>\n<p class=\"more-link\"><a href=\"https:\/\/www.wingnest.com\/blog\/archives\/150\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[9],"class_list":["post-150","post","type-post","status-publish","format-standard","hentry","category-java","category-osgi","tag-apache-karaf"],"_links":{"self":[{"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/posts\/150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/comments?post=150"}],"version-history":[{"count":25,"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/posts\/150\/revisions"}],"predecessor-version":[{"id":1027,"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/posts\/150\/revisions\/1027"}],"wp:attachment":[{"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/media?parent=150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/categories?post=150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/tags?post=150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}