{"id":9423,"date":"2012-04-18T08:00:15","date_gmt":"2012-04-17T23:00:15","guid":{"rendered":"http:\/\/www.sssg.org\/blogs\/hiro345\/?p=9423"},"modified":"2012-04-12T21:51:01","modified_gmt":"2012-04-12T12:51:01","slug":"forge%e3%81%a8seam3%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%88%e3%81%86","status":"publish","type":"post","link":"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/9423.html","title":{"rendered":"Forge\u3068Seam3\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046"},"content":{"rendered":"<p>Seam3\u3082\u65b0\u3057\u304f\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u4f7f\u3063\u3066\u307f\u307e\u3057\u305f\u3002Eclipse + JBoss Tools \u3067\u624b\u8efd\u306b\u958b\u767a\u3067\u304d\u308b\u3068\u601d\u3063\u305f\u3089\u3001Seam3\u306f\u307e\u3060\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3001Forge\u3092\u4f7f\u3063\u3066\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u308b\u306e\u304c\u7c21\u5358\u306a\u3088\u3046\u3067\u3059\u3002<br \/>\n<!--more--><br \/>\nJBoss Forge \u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/docs.jboss.org\/author\/display\/FORGE\/Installation\" title=\"Forge \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\">https:\/\/docs.jboss.org\/author\/display\/FORGE\/Installation<\/a>\u304c\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001JBoss Forge \u3092<a href=\"https:\/\/repository.jboss.org\/nexus\/index.html#nexus-search;gav~org.jboss.forge~forge-distribution~~~~kw,versionexpand\">\u3053\u3053<\/a>\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306e\u4ed5\u65b9\u304c\u3061\u3087\u3063\u3068\u308f\u304b\u308a\u306b\u304f\u3044\u3067\u3059\u304c\u3001\u753b\u9762\u53f3\u4e0b\u306e Artifact Information \u30bf\u30d6\u3092\u958b\u3044\u3066\u3001Download\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001forge-distribution-1.0.3-20120403.192659-4.zip \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306e\u3088\u3046\u306aforge.sh\u3092\u4f5c\u6210\u3057\u3066forge\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210\u306fJBoss\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3068\u304d\u3068\u540c\u3058\u3067\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n#!\/bin\/sh\r\nexport JAVA_HOME=&quot;$HOME\/applications\/jdk1.6.0_31&quot;\r\nexport FORGE_HOME=&quot;$HOME\/applications\/forge-distribution-1.0.3-SNAPSHOT&quot;\r\nexport JBOSS_HOME=&quot;$HOME\/applications\/jboss-as-7.1.1.Final&quot;\r\nexport PATH=$PATH:$FORGE_HOME\/bin\r\nexport MAVEN_HOME=&quot;$HOME\/applications\/apache-maven-3.0.4&quot;\r\nexport PATH=$FORGE_HOME\/bin:$JAVA_HOME\/bin:$MAVEN_HOME\/bin:JBOSS_HOME\/bin:$PATH\r\n$FORGE_HOME\/bin\/forge\r\n<\/pre>\n<p>\u4e0b\u8a18\u624b\u9806\u3092\u53c2\u8003\u306b\u3059\u308b\u3068\u3001Seam3 \u306e\u7c21\u5358\u306a\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<br \/>\n\u30fb<a href=\"https:\/\/docs.jboss.org\/author\/display\/FORGE\/Generating+a+basic+Java+EE+web-application\">Generating a basic Java EE web-application &#8211; Forge &#8211; Project Documentation Editor<\/a><\/p>\n<p>\u5177\u4f53\u7684\u306b\u306fforge\u3092\u8d77\u52d5\u3057\u3066\u3001\u6b21\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u5165\u529b<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n\uff03\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u6210\r\n new-project --named simpleSeam3 --topLevelPackage org.sssg.soft.sample.seam3.simple\r\n\r\n\uff03scaffold\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\r\n scaffold setup\r\n ? No scaffold type was selected, use default [JavaServer Faces]? [Y\/n] Y\r\n ? Scaffold provider [faces] is not installed. Install it? [Y\/n] Y\r\n ? Facet [forge.maven.WebResourceFacet] requires packaging type(s) [war], but is currently [jar]. Update packaging? (Note: this could deactivate other plugins in your project.) [Y\/n] Y\r\n***SUCCESS*** Installed [forge.maven.WebResourceFacet] successfully.\r\nWarning:  The encoding &#039;UTF-8&#039; is not supported by the Java runtime.\r\n***SUCCESS*** Installed [forge.spec.jpa] successfully.\r\n:\r\n\u7565\r\n:\r\n ? Create scaffold in which sub-directory of web-root? (e.g. http:\/\/localhost:8080\/simpleSeam3\/DIR) [\/] \r\nWarning:  The encoding &#039;UTF-8&#039; is not supported by the Java runtime.\r\n:\r\n\r\n\uff03\u6c38\u7d9a\u5316\u8a2d\u5b9a\r\n persistence setup --provider HIBERNATE --container JBOSS_AS7\r\n***INFO*** Setting transaction-type=&quot;JTA&quot;\r\n***INFO*** Using example data source [java:jboss\/datasources\/ExampleDS]\r\nWarning:  The encoding &#039;UTF-8&#039; is not supported by the Java runtime.\r\n ? The JPA provider [HIBERNATE], also supplies extended APIs. Install these as well? [y\/N] y\r\nInstall which version of [org.hibernate:hibernate-entitymanager:::]?\r\n:\r\n\u7565\r\n:\r\n ? Choose an option by typing the number of the selection [*-default]  [0] \r\n***SUCCESS*** Persistence (JPA) is installed.\r\n:\r\n\u7565\r\n:\r\n\r\n\uff03\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u4f5c\u6210\r\n entity --named SimpleEntity\r\n\r\n\uff03\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3078\u30d5\u30a3\u30fc\u30eb\u30c9\u8ffd\u52a0\r\n field string --named name\r\n\r\n\uff03\u78ba\u8a8d\r\n ls\r\n\r\n\uff03\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u304b\u3089CRUD\u4f5c\u6210\r\n scaffold from-entity\r\n\r\n\uff03\r\n build\r\n<\/pre>\n<p>persistence setup \u3067\u306f\u3001provider \u3068 container \u306f TAB \u3067\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9078\u3079\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u3067\u304d\u305f\u3089\u3001Eclipse\u5074\u3067\u3001\u65e2\u5b58maven\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u3001JBoss AS 7 \u3067 run \u3068\u3057\u307e\u3059\u3002http:\/\/localhost:8080\/simpleSeam3\/faces\/index.xhtml\u3000\u3068\u304b\u3001http:\/\/localhost:8080\/simpleSeam3\/faces\/simpleEntity\/search.xhtml \u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u57fa\u672c\u7684\u306aCRUD\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>CDI\u306ejboss-as-helloworld \u304b\u3089\u6301\u3063\u3066\u304d\u305f HelloService.java \u3084 HelloWorldServlet.java \u3082\u666e\u901a\u306b\u52d5\u304d\u307e\u3057\u305f\u3002jboss-as-helloworld\u3092\u53c2\u8003\u306b\u3057\u3066\u3001\u3053\u308c\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u914d\u5099\u3057\u3001http:\/\/localhost:8080\/simpleSeam3\/HelloWorld \u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u30b9\u30af\u30e9\u30c3\u30c1\u304b\u3089\u306e\u4f5c\u6210\u4f8b\u304c\u4e0b\u8a18\u306b\u3042\u308b\u3088\u3046\u3067\u3059\u304c\u3001\u3053\u3061\u3089\u306f\u8a66\u3057\u3066\u3044\u307e\u305b\u3093\u3002<br \/>\n\u30fb<a href=\"https:\/\/github.com\/jbossas\/quickstart\/tree\/master\/forge-from-scratch\">quickstart\/forge-from-scratch at master \u00b7 jbossas\/quickstart \u00b7 GitHub<br \/>\n<\/a>  <\/p>\n<p>Forge\u306b\u306fJBoss AS 7 \u7528\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u3042\u308b\u3088\u3046\u3067\u3001\u6b21\u306e\u3088\u3046\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002as7 setup\u3067\u8a2d\u5b9a\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ forge install-plugin jboss-as-7\r\nas7 setup\r\n<\/pre>\n<p>deploy\u306a\u3069\u306e\u30b3\u30de\u30f3\u30c9\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\nas7 deploy\r\nas7 redeploy\r\nas7 undeploy\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Seam3\u3082\u65b0\u3057\u304f\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u4f7f\u3063\u3066\u307f\u307e\u3057\u305f\u3002Eclipse + JBoss Tools \u3067\u624b\u8efd\u306b\u958b\u767a\u3067\u304d\u308b\u3068\u601d\u3063\u305f\u3089\u3001Seam3\u306f\u307e\u3060\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3001Forge\u3092\u4f7f\u3063\u3066\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u308b\u306e\u304c\u7c21\u5358\u306a\u3088\u3046\u3067\u3059 &hellip; <a href=\"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/9423.html\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[688,1207,246,1209,689],"class_list":["post-9423","post","type-post","status-publish","format-standard","hentry","category-program","tag-forge","tag-java","tag-jboss","tag-linux","tag-seam3"],"_links":{"self":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/9423","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/comments?post=9423"}],"version-history":[{"count":12,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/9423\/revisions"}],"predecessor-version":[{"id":9588,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/9423\/revisions\/9588"}],"wp:attachment":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/media?parent=9423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/categories?post=9423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/tags?post=9423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}