{"id":29,"date":"2015-01-31T21:21:25","date_gmt":"2015-01-31T12:21:25","guid":{"rendered":"http:\/\/www.wingnest.com\/blog\/?p=29"},"modified":"2015-02-09T14:30:46","modified_gmt":"2015-02-09T05:30:46","slug":"felix%e3%81%aeservicebased%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab%e3%82%92karaf%e3%81%a7%e5%8b%95%e4%bd%9c%e3%81%95%e3%81%9b%e3%82%8b-%e3%83%87%e3%82%b9%e3%82%af%e3%83%88%e3%83%83%e3%83%97%e3%82%a2","status":"publish","type":"post","link":"https:\/\/www.wingnest.com\/blog\/archives\/29","title":{"rendered":"Apache Felix \u306e servicebased \u30b5\u30f3\u30d7\u30eb\u3092 Apache Karaf \u3067\u52d5\u4f5c\u3055\u305b\u308b &#8211; \u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e OSGi \u306b\u3088\u308b\u30e2\u30b8\u30e5\u30fc\u30eb\u5316(1\/2)"},"content":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Felix \u306e servicebased \u30b5\u30f3\u30d7\u30eb\u3092 Karaf \u3067\u52d5\u4f5c\u3055\u305b\u308b\u305f\u3081\u306e\u624b\u9806\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>servicebased \u30b5\u30f3\u30d7\u30eb\u306f\u3001\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e OSGi \u306b\u3088\u308b\u30e2\u30b8\u30e5\u30fc\u30eb\u5316\u306e\u4e00\u4f8b\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<p><em>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Java8 \u3068 Apache Karaf3.0.3, Apache Felix 4.0.2 \u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/em><\/p>\n<h3>\u25cf Felix \u306e servicebased \u30b5\u30f3\u30d7\u30eb\u3092\u30ed\u30fc\u30ab\u30eb\u306e Maven \u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>\u307e\u305a\u3001\u9069\u5f53\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3001Felix \u306e trunk \u306b\u3042\u308b\u30bd\u30fc\u30b9\u3092\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u3057\u307e\u3059<sup><a href=\"#footnote_1_29\" id=\"identifier_1_29\" class=\"footnote-link footnote-identifier-link\" title=\"\u30b5\u30f3\u30d7\u30eb\u306e pom.xml \u304c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5358\u4f4d\u3067\u9589\u3058\u3066\u3044\u306a\u3044\u305f\u3081\">1<\/a><\/sup>\u3002<\/p>\n<p>\u6b21\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ svn checkout http:\/\/svn.apache.org\/repos\/asf\/felix\/trunk\/\n<\/code><\/pre>\n<p>\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e examples \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e0b\u306b\u3042\u308b\u3001\u6b21\u306e\uff15\u3064\u306e Maven \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u3001\u3053\u306e\u8a18\u4e8b\u3067\u4f7f\u7528\u3059\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code>servicebased.host\nservicebased.circle\nservicebased.square\nservicebased.trapezoid\nservicebased.triangle\n<\/code><\/pre>\n<p>servicebased.host \u306f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u672c\u4f53\u3067\u3001\u305d\u308c\u4ee5\u5916\u306f\u6a5f\u80fd\u3067\u3059\u3002<br \/>\n\u672c\u4f53\u3068\u3001\u5186\u3084\u56db\u89d2\u306a\u3069\u3092\u63cf\u304f\u6a5f\u80fd\u304c\u305d\u308c\u305e\u308c\u7570\u306a\u308b Bundle (=OSGi\u30d9\u30fc\u30b9\u306e\u30e2\u30b8\u30e5\u30fc\u30eb)\u3068\u3057\u3066\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\u30a4\u30e1\u30fc\u30b8\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u307e\u305a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u524d\u306b\u3001pom.xml \u3092\u4fee\u6b63\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\nservicebased \u30b5\u30f3\u30d7\u30eb\u3067\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b Felix \u306f\u304b\u306a\u308a\u53e4\u3044\u305f\u3081\u3001\u6700\u65b0\u306e Karaf \u3067\u52d5\u4f5c\u3057\u306a\u3044\u305f\u3081\u3067\u3059\u3002<\/p>\n<p>\u6b21\u306e\u3088\u3046\u306b\u3001\u6700\u65b0\u306e Karaf \u3067\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b\u3001\u305d\u306e\u6307\u5b9a\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<p>examples\/servicebased.host\/pom.xml\u3092\u958b\u304d\uff1a<\/p>\n<pre><code>    &lt;dependency&gt;\n      &lt;groupId&gt;org.apache.felix&lt;\/groupId&gt;\n      &lt;artifactId&gt;org.apache.felix.framework&lt;\/artifactId&gt;\n      &lt;version&gt;4.0.2&lt;\/version&gt;\n    &lt;\/dependency&gt;\n<\/code><\/pre>\n<p>\u306e\u7b87\u6240\u3092\u6b21\u306e\u3088\u3046\u306b\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<pre><code>    &lt;dependency&gt;\n      &lt;groupId&gt;org.apache.felix&lt;\/groupId&gt;\n      &lt;artifactId&gt;org.apache.felix.framework&lt;\/artifactId&gt;\n      &lt;version&gt;4.4.1&lt;\/version&gt;\n    &lt;\/dependency&gt;\n<\/code><\/pre>\n<p>\u4fee\u6b63\u3092\u7d42\u3048\u305f\u3089\u3001servicebased.host \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30d3\u30eb\u30c9\u3057\u3001Bundle \u3068\u3057\u3066\u30ed\u30fc\u30ab\u30eb\u306e Maven \u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ cd examples\/servicebased.host\n$ mvn install\n<\/code><\/pre>\n<p>servicebased.host Bundle \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u7d42\u3048\u305f\u3089\u3001\u6b8b\u308a\u306e4\u3064\u306e Bundle \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3082\u3059\u3079\u3066\u540c\u69d8\u306b\u30d3\u30eb\u30c9\u3057\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u4e00\u3064\u4f8b\u3092\u6319\u3052\u308b\u3068\u3001\u3053\u306e\u3088\u3046\u306a\u611f\u3058\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code>$ cd examples\/servicebased.circle\n$ mvn install\n<\/code><\/pre>\n<p>\u3053\u308c\u3092\u6b8b\u308a3\u3064\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3082\u884c\u3044\u307e\u3059\u3002<\/p>\n<h3>\u25cf Karaf \u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/h3>\n<p><a href=\"http:\/\/karaf.apache.org\/index\/community\/download.html\">Karaf \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a>\u3057\u3066\u5c55\u958b\u3057\u307e\u3059\u3002<\/p>\n<p>Unix \u7cfb\u3060\u3068\u6b21\u306e\u3088\u3046\u306a\u624b\u9806\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code>$ wget http:\/\/ftp.riken.jp\/net\/apache\/karaf\/3.0.3\/apache-karaf-3.0.3.tar.gz\n$ tar zxvf apache-karaf-3.0.3.tar.gz\n<\/code><\/pre>\n<p>\u203b Karaf 4.0.0.M1 \u3067\u3082\u52d5\u4f5c\u3059\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>\u25cf servicebased \u306e Bundle \u3092 Karaf \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>\u5c55\u958b\u3067\u304d\u305f\u3089\u3001Karaf \u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ cd apache-karaf-3.0.3\/bin\n$ .\/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;\n<\/code><\/pre>\n<p>\u8d77\u52d5\u3067\u304d\u305f\u3089\u3001\u30db\u30b9\u30c8\u3068\u306a\u308b Bundle \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u8d77\u52d5\u3057\u3066\u307f\u307e\u3059<sup><a href=\"#footnote_2_29\" id=\"identifier_2_29\" 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\u306eetc\/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\">2<\/a><\/sup>\u3002<\/p>\n<p>install \u306e -s \u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3060\u3051\u3067\u306a\u304f\u8d77\u52d5\u3082\u8a66\u307f\u308b\u3053\u3068\u3092\u6307\u793a\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u3002<\/p>\n<pre><code>karaf@root()&gt; install -s mvn:org.apache.felix.example\/servicebased.host\/1.0.0\/jar\nBundle ID: 64\nkaraf@root()&gt;\n<\/code><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306b\u6b21\u306e\u3088\u3046\u306a\u753b\u9762\u304c\u73fe\u308c\u307e\u3059\u3002<\/p>\n<div style=\"text-align: center;\">\n<a href=\"http:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/host.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/host-300x300.png\" alt=\"host\" width=\"300\" height=\"300\" class=\"alignnone size-medium wp-image-36\" srcset=\"https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/host-300x300.png 300w, https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/host-150x150.png 150w, https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/host.png 404w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\n<\/div>\n<p>\u7d9a\u3044\u3066\u3001\u6b21\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u3001\u5186\u3092\u63cf\u304f\u6a5f\u80fd\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre><code>karaf@root()&gt; install -s mvn:org.apache.felix.example\/servicebased.circle\/1.0.0\/jar\nBundle ID: 65\n<\/code><\/pre>\n<p>\u3059\u308b\u3068\u3001\u753b\u9762\u304c\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div style=\"text-align: center;\">\n<a href=\"http:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-300x300.png\" alt=\"circle\" width=\"300\" height=\"300\" class=\"alignnone size-medium wp-image-33\" srcset=\"https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-300x300.png 300w, https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-150x150.png 150w, https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle.png 406w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\n<\/div>\n<p>\u3053\u3053\u3067\u3001\u5186\u306e\u30a2\u30a4\u30b3\u30f3\u3092\u62bc\u3057\u3066\u767d\u5730\u306e\u30ad\u30e3\u30f3\u30d0\u30b9\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u305d\u306e\u30ad\u30e3\u30f3\u30d0\u30b9\u306b\u6b21\u306e\u3088\u3046\u306a\u5186\u304c\u63cf\u304b\u308c\u307e\u3059\u3002<\/p>\n<div style=\"text-align: center;\">\n<a href=\"http:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-3-300x300.png\" alt=\"circle-3\" width=\"300\" height=\"300\" class=\"alignnone size-medium wp-image-34\" srcset=\"https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-3-300x300.png 300w, https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-3-150x150.png 150w, https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-3.png 406w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\n<\/div>\n<p>\u3053\u3053\u3067\u3001\u5186\u3092\u63cf\u304f\u6a5f\u80fd\u3092\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\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   | Apache Felix Service-Based Host\n65 | Active |  80 | 1.0.0   | Apache Felix Circle Service\nkaraf@root()&gt; uninstall 65\nkaraf@root()&gt;\n<\/code><\/pre>\n<p>\u3059\u308b\u3068\u753b\u9762\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div style=\"text-align: center;\">\n<a href=\"http:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-uninstall.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-uninstall-298x300.png\" alt=\"circle-uninstall\" width=\"298\" height=\"300\" class=\"alignnone size-medium wp-image-35\" srcset=\"https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-uninstall-298x300.png 298w, https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-uninstall-150x150.png 150w, https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-uninstall.png 408w\" sizes=\"auto, (max-width: 298px) 100vw, 298px\" \/><\/a>\n<\/div>\n<p>\u305d\u3057\u3066\u3001\u3053\u3053\u3067\u3001\u3082\u3046\u4e00\u5ea6\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3001\u5143\u306b\u623b\u308a\u307e\u3059\u3002<\/p>\n<pre><code>karaf@root()&gt; install -s mvn:org.apache.felix.example\/servicebased.circle\/1.0.0\/jar\nBundle ID: 66\n<\/code><\/pre>\n<div style=\"text-align: center;\">\n<a href=\"http:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-3-300x300.png\" alt=\"circle-3\" width=\"300\" height=\"300\" class=\"alignnone size-medium wp-image-34\" srcset=\"https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-3-300x300.png 300w, https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-3-150x150.png 150w, https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/circle-3.png 406w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\n<\/div>\n<p>\u3067\u306f\u3001\u4ed6\u306e\u6a5f\u80fd\u3082\u5168\u90e8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre><code>karaf@root()&gt; install -s mvn:org.apache.felix.example\/servicebased.square\/1.0.0\/jar\nBundle ID: 67\nkaraf@root()&gt; install -s mvn:org.apache.felix.example\/servicebased.trapezoid\/1.0.0\/jar\nBundle ID: 68\nkaraf@root()&gt; install -s mvn:org.apache.felix.example\/servicebased.triangle\/1.0.0\/jar\nBundle ID: 69\n<\/code><\/pre>\n<p>\u3059\u308b\u3068\u3001\u6b21\u306e\u3088\u3046\u306a\u753b\u9762\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div style=\"text-align: center;\">\n<a href=\"http:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/all-functions.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/all-functions-300x300.png\" alt=\"all-functions\" width=\"300\" height=\"300\" class=\"alignnone size-medium wp-image-32\" srcset=\"https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/all-functions-300x300.png 300w, https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/all-functions-150x150.png 150w, https:\/\/www.wingnest.com\/blog\/wp-content\/uploads\/2015\/01\/all-functions.png 410w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\n<\/div>\n<p>\u3053\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u7d42\u4e86\u3059\u308b\u306b\u306f\u3001Karaf \u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u3067 logout \u3092\u5b9f\u884c\u3059\u308b\u304b\u3001servicebased \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u7d42\u4e86\u3057\u307e\u3059\u3002<\/p>\n<p>\u25cf Felix \u306e\u74b0\u5883\u3060\u3051\u3067\u52d5\u4f5c\u3055\u305b\u308b<\/p>\n<p>\u3064\u3044\u3067\u306b\u3001Felix \u306e\u516c\u5f0f\u30b5\u30a4\u30c8\u306e\u4e2d\u306e\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u3092<a href=\"http:\/\/felix.apache.org\/site\/apache-felix-application-demonstration.html\">\u7d39\u4ecb\u3057\u3066\u3044\u308b\u30da\u30fc\u30b8<\/a>\u3067\u89e3\u8aac\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u3001Felix \u306e\u74b0\u5883\u3060\u3051\u3067\u52d5\u4f5c\u3055\u305b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u306b\u306f\u3001\u5404\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u3057\u3066 mvn install \u3092\u5b9f\u884c\u3057\u305f\u969b\u306b\u3001\u751f\u6210\u3055\u308c\u305f target \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e2d\u306b\u3042\u308b jar \u30d5\u30a1\u30a4\u30eb\u3092\u9069\u5f53\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306e\u3088\u3046\u306a\u30a4\u30e1\u30fc\u30b8\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<em>\u203b\u3053\u3053\u3067\u306f servicebased \u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u3001\u305d\u3053\u306b\u751f\u6210\u3057\u305f jar \u30d5\u30a1\u30a4\u30eb\u3092\u96c6\u3081\u3066\u3044\u307e\u3059\u3002<\/em><\/p>\n<pre><code>$ mkdir servicebased\n$ cd servicebased\n$ cp ..\/examples\/servicebased.host\/target\/servicebased.host-1.0.0.jar .\n$ cp ..\/examples\/servicebased.host\/target\/servicebased.circle-1.0.0.jar .\n$ cp ..\/examples\/servicebased.host\/target\/servicebased.square-1.0.0.jar .\n$ cp ..\/examples\/servicebased.host\/target\/servicebased.trapezoid-1.0.0.jar .\n$ cp ..\/examples\/servicebased.host\/target\/servicebased.triangle-1.0.0.jar .\n$ ls\nservicebased.host-1.0.0.jar\nservicebased.circle-1.0.0.jar\nservicebased.square-1.0.0.jar\nservicebased.trapezoid-1.0.0.jar\nservicebased.triangle-1.0.0.jar\n$\n<\/code><\/pre>\n<p>\u6b21\u306e\u69d8\u306b\u3057\u3066\u8d77\u52d5\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code>$ java -jar servicebased.host-1.0.0.jar file:servicebased.circle-1.0.0.jar file:servicebased.square-1.0.0.jar file:servicebased.triangle-1.0.0.jar file:servicebased.trapezoid-1.0.0.jar\n<\/code><\/pre>\n<p>\u3046\u307e\u304f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u8868\u793a\u3055\u308c\u305f\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u500b\u4eba\u7684\u306b\u306f\u3001\u3053\u3046\u3044\u3046\u4ed5\u7d44\u307f\u306f\u3001\u304b\u306a\u308a\u597d\u304d\u3067\u3059\u3002(^^;<\/p>\n<hr \/>\n<p><em>\u3053\u306e\u8a18\u4e8b\u306e\u7d9a\u304d\u304c\u3042\u308a\u307e\u3059\u3002<a href=\"http:\/\/www.wingnest.com\/blog\/archives\/127\">\u3053\u3061\u3089<\/a>\u3067\u3059\u3002<\/em><\/p>\n<ol class=\"footnotes\"><li id=\"footnote_1_29\" class=\"footnote\">\u30b5\u30f3\u30d7\u30eb\u306e pom.xml \u304c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5358\u4f4d\u3067\u9589\u3058\u3066\u3044\u306a\u3044\u305f\u3081<span class=\"footnote-back-link-wrapper\"> [<a href=\"#identifier_1_29\" class=\"footnote-link footnote-back-link\">&#8617;<\/a>]<\/span><\/li><li id=\"footnote_2_29\" 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\u306eetc\/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_2_29\" class=\"footnote-link footnote-back-link\">&#8617;<\/a>]<\/span><\/li><\/ol>","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Felix \u306e servicebased \u30b5\u30f3\u30d7\u30eb\u3092 Karaf &hellip;  <\/p>\n<p class=\"more-link\"><a href=\"https:\/\/www.wingnest.com\/blog\/archives\/29\">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":[15,9],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-java","category-osgi","tag-apache-felix","tag-apache-karaf"],"_links":{"self":[{"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/posts\/29","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=29"}],"version-history":[{"count":26,"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"predecessor-version":[{"id":178,"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/posts\/29\/revisions\/178"}],"wp:attachment":[{"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wingnest.com\/blog\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}