æè¿æ°äººç ä¿®ï¼ããã°ã©ãã³ã°æªçµé¨è ã»å¤§å¦ã§å°æ»ãªã©ããã¡ãã¾ãï¼ã«é¢ãããã¨ãããã¾ããã é©å½ãªã¿ã¤ãã³ã°ã§Eclipseã®ã·ã§ã¼ãã«ãããã¼ãæãã¦ããã®ã§ãããå®æ¼ãã¦ãããã¨é£ãã¤ããããã£ãã§ãã ã¦ã±ãããâæ°äººããéè¦ãããã¨ããããã§ãã æããã»ããæããã»ããã¢ããã¼ã·ã§ã³ãä¿ã¡ãããã§ãã ãã®ç¹ã§ãã¦ã±ããã©ããã¯å¤§åãªè¦ç¹ã®ã²ã¨ã¤ã ã¨æãã¾ãã ãªã®ã§ãã¦ã±ã®ããã©ã³ãã³ã°ã®å½¢å¼ã§ãã·ã§ã¼ãã«ãããç´¹ä»ãããã¨æãã¾ãã ç°å¢ã¯ãWindowsã§Pleiadesã®ãã¤ï¼http://mergedoc.sourceforge.jp/ ï¼ã使ã£ã¦ãJavaãæãã¦ãã¾ããã 第20ä½ ctrl + alt + k ã¹ãã¼ã¯ã±ã¼ã¹ã¨ãã£ã¡ã«ã±ã¼ã¹ã®åãæ¿ã å¤æ°åãã¡ã½ããåãé¸æããç¶æ ã§ctrl + alt + k æãã¦ããã®ã¯Javaãªã®ã§ãããCè¨èªã®ããã«
#1. ã¯ããã« ãç°¡åãªServletï¼HelloServletçãªï¼ãæã£ãWARãGradleã§ä½ã£ã¦Tomcatã§åããã¦ã¿ãããã¨ããåå¿é²ã æåã«ãã¨ãã£ã¦ããã¾ãã¨çµæ§éãä¸ã¤ãå¿ é ã§ã¯ãªãï¼ãããªæé ãå°ãæ··ãã£ã¦ããããããã¾ããã ããè¡ã£ãä½æ¥ã®åå¿é²ã¨ããæ§è³ªä¸ã容赦ããã ããã°ãããããæãã¾ãã æ¬ç¨¿ç¯å²ï¼ Gradleã使ã£ã¦Eclipseããã¸ã§ã¯ããä½ã ãã®ããã¸ã§ã¯ããimportãã¦Eclipseã§ã³ã¼ãã£ã³ã°ã Eclipseã®Gradle IDEãå©ç¨ãã¦WARãä½ã Tomcatã¸é å¸ãã¦WEBãã©ã¦ã¶ããServletãæ£ããåä½ããäºã確èªãã 対象èªè ï¼Gradleã®åå¿è ãGradleãWEBã¢ããªéçºã«æ´»ç¨ãããæ¹ éçºç°å¢ï¼OS X Mavericks v10.9.4 Gradleï¼Ver. 2.0 Eclipseï¼Ver. Lu
æ¯å¹´ 6 ææä¾ã® Eclipse ã¡ã¸ã£ã¼ãªãªã¼ã¹ã¨ãªã Eclipse 4.4 Luna (ã«ã) ããªãªã¼ã¹ããããã©ã ããªã© Java 8 ã«æ£å¼å¯¾å¿ããåã®ãã¼ã¸ã§ã³ã ãããã«åããã¦æ¥æ¬èªåããã Eclipse ã¨ä¾¿å©ãªãã©ã°ã¤ã³ã Java 8 å®è¡ç°å¢ãå«ãå ¨é¨å ¥ãã® Pleiades All in One ããªãªã¼ã¹ããã Pleiades All in One Eclipse 4.4 Luna ãã¦ã³ãã¼ã http://mergedoc.sourceforge.jp/pleiades_distros4.4.html èµ·åæã®ã¹ãã©ãã·ã¥ã¯æé£ (Lunar Eclipse) ã®ã¨ãã«æããå°çãè¦ãã¨ãã«çºçãã¦ããã§ãããæ¥é£ã¤ã¡ã¼ã¸ã«ãããå°çã®æã å ã£ã¦ããé¨åã¯å®éã®è¡æããã§ãéå½ã®åå´ã®å½ãçã£æã§è©±é¡ã«ãªã£ã NASA ã®æ åãèæ¯ã¯éæ²³ä¸å¿æ¹åã® S
Groovy:Repetitive method name/signature for method 'java.lang.Object withFormat(groovy.lang.Closure)' in class 'grails.plugin.databasemigration.DbdocController'. ãããï¼ãªããå¤ãªã¨ã©ã¼åºã¦ãã»ã»ã»ã ããæ¥Macã§GGTSã使ããã¨ãããä¸è¨ã®ãããªã¨ã©ã¼ã¡ãã»ã¼ã¸ãè¤æ°åºã¦åä½ããªããªãã¾ããã ç°¡åã«åå ãæ¸ãã¦ãã¾ãã¨ãå©ç¨ãã¦ããGrailsï¼2.3.7ï¼ããã³GGTSãå é å ¥ããJava8ã«å¯¾å¿ãã¦ããªãããã ã£ãã®ã§ãããæ®æ®µEclipse使ãç³»ã®éçºã¯JStyleã®ä½¿ããWindowsã§ãã£ã¦ããã®ã§ãã¨ã©ã¼ãåºãå½æã¯ãã¾ãã¾ããã«å¯¾å¦ããæ°ããªããå¿ è¦ã«ãªã£ããJava7ã«æããã°ãããã§ããï¼ãããã®æãã§ã
è¦åããã©ã¼ããã¿ã¼çã®eclipseè¨å®ããåã 人ã®è¨å®ã«ä¾åããªãå½¢ã§ç®¡çã§ããããã«ãã¦ã¿ãã æ¹é åºæ¬çã«ã¯ãããã¸ã§ã¯ãè¨å®ãgitã«çªã£è¾¼ãã§ãã¾ã gradleãçæãããã¡ã¤ã«ã¯gitã«å ¥ãããåã ã§gradle eclipseãå©ãã¦ããã classpathã®è¨å®å¤ãç°å¢ãã¨ã«ç°ãªãç¹ã¸ã®é æ ® gradleã§eclipseé¢é£ã¿ã¹ã¯ãå©ããæã®åªçæ§ãä¿ã¡ãã 以ä¸ãèªåã®GitHubããæç²ã ãã©ã«ãæ§æ â .checkstyle â .classpath â .fbprefs â .gitignore â .project â build.gradle â README.md â ââ.settings â checkstyle.xml â findbugs.xml â org.eclipse.core.resources.prefs â org.eclips
GPLã©ã¤ã»ã³ã¹ã®Javaã½ã¼ã¹ã³ã¼ããèªããã¨ããã®ã§ããã½ã¼ã¹ã³ã¼ããè¤æ°ãã¡ã¤ã«ã«åããã¦ãã¦ãªããªãç¥ãããæ å ±ã®ã¨ããã«ãã©ãã¤ãã¾ãããããã§ã³ã¼ã«ã°ã©ãã使ã£ã¦é¢æ°ã®ä¾åé¢ä¿ãå³ã«ãã¦ç¥ãããæ å ±ãæããã¨ã«ãã¾ããã çµ±åéçºç°å¢(IDEï¼ã«ã¯ã³ã¼ã«ã°ã©ã表示æ©è½ããããã®ããã Virtual MRIã¨ããJavaã§æ¸ãããGPLã©ã¤ã»ã³ã¹ã®ã½ããã®ãªãã®ãã¼ã¿ã®ä½¿ãæ¹ãç¥ãããã¦ã½ã¼ã¹ã³ã¼ããèªããã¨ããã®ã§ãããã©ãã«æ¸ãã¦ããã®ããããããã¾ããã ãsrcããã©ã«ãã®ã®ãªãã«ã¯ã.javaãã¨ããæ¡å¼µåã®ãã¡ã¤ã«ãããããããã¾ãã ãã¡ã¤ã«åã大ä½é¢æ°åã«ãªã£ã¦ãããããªã®ã§ããå¼ã³åºãå ããããã¾ããã ç¥ãããã®ã¯ãã®é¢æ°ã®å¼ã³åºãå ã®å¼æ°ã§ãã ãã®ã½ããã®ã½ã¼ã¹ã³ã¼ãã«ã¯ã³ã¡ã³ããã¡ããã¨ã¤ãã¦ããã®ã§ãããã¤ãèªãªãã§ãã é¢æ°åãå ã«ãsrcããã©ã«
#ãã¨ã®ã¯ãã¾ã åé¡ãçºçããã®ã¯ã Jersey MVC ã® JSP ã GlassFish 4.0 ã§è©¦ããã¨ããã¨ãã®ãã¨ã CDI ãæå¹ã«ãã¦ãããã¤ãããã CDI é¢é£ã®ã¨ã©ã¼ãçºçããã è²ã 試ãã¦ããã¨ããã build.gradle ã® dependencies ã« providedCompile ã§æå®ãã¦ãã jersey-mvc-jsp ãã³ã¡ã³ãã¢ã¦ãããããã¨ã©ã¼ã¯çºçããªããªã£ãã ããã providedCompile ãªã®ã«ä½ã§å½±é¿ãããããããã 調ã¹ãã¨ãããã©ãã Eclipse ã® Gradle ãã©ã°ã¤ã³ã§ã¤ã³ãã¼ããã Web ã¢ããªããã¸ã§ã¯ãã¯ãbuild.gradle ã® dependencies ã§æå®ãã jar ãè»ä¸¦ã¿ WEB-INF/lib ã®ä¸ã«å©ãããããã«ãªã£ã¦ãã£ã½ãã ä¸ã¯ãEclipse ã® Maven ãã©ã°ã¤
æ°æ¥åã¾ã§éªã®äºå ±ãåºã¦ããã®ã§ãéå¬ãå±ã¶ã¾ãã¦ãããã©ç¡äºéå¬ï¼ IDEæ´ã¯âãªæãã§ãEclipse以å¤ã¯ããã»ã©ä½¿ç¨çµé¨ã¯ãªãã®ã§æ¥½ãã¿ã«ãã¦ãã¾ããã Eclipse æ®æ®µä½¿ç¨ã Netbeans JavaFXãã¼ã¸ã§ã³2ãåºãæã«SeanBuilderã¨ã®é£æºãåºæ¥ãã®ã§ä½¿ã£ãä½ã IntelliJ IDEA G*ç³»ã®ãµãã¼ããEclipseã¨æ¯ã¹ã¦ããªãããã®ã§ãå°ãã¯çµé¨ããã ä¸æ¨å¹´ã®ãã¤æ¦é¨ãã®æã®ã»ã¼ã«ã§è³¼å ¥ãããã©ã©ã¤ã»ã³ã¹ãããªãã£ãã®ã§æåçã®çµé¨ã¯0ã [twitter:@yusuke] ãããJetBrainsã«äº¤æ¸ãã¦ããã¦ã©ã¤ã»ã³ã¹å±ãã¾ããï¼ï¼ JetBrainsã®ã¹ããã«ã¼é ã£ã¦ãã¾ããã é¢é£ ãæ±äº¬ãJJUG ãã¤ãã»ãã ã2.19 EclipseãNetBeansãIntelliJ IDEA 3大IDEé ä¸æ±ºæ¦ ã - æ¥æ¬Javaã¦ã¼ã¶ã¼ã°
JFokus, Stockholm Recording: https://www.parleys.com/tutorial/effective-ide-usage-3
Gradle!! Gradle!! Gradle!! ååã¯ãã¡ã â ããããããªãã°Gradleã ã - æ¸ãã ååã®å®¿é¡ãçä»ãããã¨ã«... Sample projectã«å¯¾ããçå æ¥æ¬èªããã¥ã¡ã³ãã¯ãããããã Gradle æ¥æ¬èªããã¥ã¡ã³ã ã ãã©ç®çã®Sample projectã«å¯¾ããè¨è¿°ã¯è¦ã¤ãããªãã ãªãã°ã¨Googleæ¤ç´¢ã§ æ¤ç´¢ï¼"Sample project" gradle æ¤ç´¢ï¼"Java Quickstart" gradle ã¨ãã¦ã¿ããã ãã©ããã£ã¡ã(ä¸ããæ°ãã¼ã¸ãè¦ãéãã ãã©)ããã¨ãã£ãhitã¯ãªãã ããããSample projectã«ã¯"Java Quickstart"以å¤ã«ä½ãããã®ï¼ ã¨ãããã¨ã§ã æ¤ç´¢ï¼"Java API and Implementation" ã§çºè¦ã New gradle project wizard ·
å½åã®ç®çã ã£ãeclipseãã©ã°ã¤ã³ã®ãã«ããå®è¡ãåºæ¥ãã®ã§æ¸ãã¦ããããã ããã¨ããããåºæ¥ãã¬ãã«ãªã®ã§ãã¾ãåèã«ãªããªããããããªãã ãµã³ãã«ç¨ã®eclipse pluginããã¸ã§ã¯ãã®ä½æ Package Explorerãå³ã¯ãªãã¯ãã¦ãNew->Others...ã§newã¦ã£ã¶ã¼ããéã Plug-in Projectãé¸æ ã¦ã£ã¶ã¼ãã®æå¾ã«ãã³ãã¬ã¼ããé¸æãããã¼ã¸ãããã®ã§ãããã§"Hello, World"ãæå®ãã ãã®ãã©ã°ã¤ã³ã¯ã¡ãã¥ã¼ãã¼ã«Sample Menuã表示ããã ãã®åç´ãªãã©ã°ã¤ã³ã ããããgradleã§ãã«ãããã ãã£ã¼ãã£ã¼ã®è¿½å ã¨build.gradleã®ä½æ ã¾ãã¯gradleã®ããã¸ã§ã¯ãã«å¤æãããProject Explorerã§å³ã¯ãªãã¯ãã¦Configure->Convert to Gradle Projectãã¯ãª
GGTS(Groovy/Grails Tool Suite)ã®æ¥æ¬èªåã¯Pleiadesãã©ã°ã¤ã³ãã¤ã³ã¹ãã¼ã«ããäºã§å¯è½ã å人çã«ã¯InteliJ IDEAãã©ã¤ã»ã³ã¹æã£ã¦ããã§ãããå®éã®ããã¸ã§ã¯ãã§ä½¿ãã«ã¯ããªã¼ãªIDEç°å¢ãå¿ è¦ã§ãããã ã¨ãããã¨ã§ç¾ç¶ Groovy/Grailsã®éçºãããã®ã§ããã°ãã£ã¨ãç¡é£ãªé¸æã®ã²ã¨ã¤ã«GGTS(Groovy/Grails Tool Suite)ãããã¾ãã ã¾ãã¯ãã¬ã¼ã ã¯ã¼ã¯ã®Springãæ±ã£ã¦ãSpringSourceããGGTSããã¦ã³ãã¼ãã Eclipse Juno(3.8)ãã¼ã¹ã§ãè¯ãã®ã§ãããJuno(4.2.2)ãã¼ã¹ãé¸æã http://www.springsource.org/downloads/sts-ggts é©å½ã«ã¤ã³ã¹ãã¼ã©ãåããããOKããªããJDKãå¿ è¦ãªã®ã§ãããå¥éã¤ã³ã¹ãã¼ã«ãã¦ã
Gradleã¨ã¯? Gradleã¨ãããã«ããã¼ã«ããåãã ããã? Javaã§ã¯ãã«ããã¼ã«ã¨ãã¦MavenãAntãå©ç¨ããããã¨ãå¤ãããGradleã¯ãããã¨å種ã®ãã¼ã«ã§ãGroovyã使ç¨ãã¦ããã¨ããç¹å¾´ããããMavenã¯å°ãã§ãè¦ç´ããå¤ãããã¨ããããã¨ããå ´åã®ç ©éããAntã¯ãã¹ã¦ã®å¦çãä¸ããè¨è¿°ããªãã¦ã¯ãªããXMLãè¥å¤§åããã¡ã¨ããåé¡ãããããæ±ãã¦ããã Gradleã¯Groovyã使ç¨ãã¦ãããã®ã®ãGroovyå°ç¨ã®ãã«ããã¼ã«ã¨ããããã§ã¯ãªããJavaã§ã®éçºã«ãå©ç¨ã§ããããã«ãã¹ã¯ãªããã®è¨è¿°ã«Groovyã使ç¨ãããããMavenãAntã®XMLãã¼ã¹ã®ãã«ããã¡ã¤ã«ã®ããã«åé·ãªè¨è¿°ã¯ä¸è¦ã ãã¾ããMaven/Ivyãªãã¸ããªãAntã®ãã«ããã¡ã¤ã«ãå©ç¨ã§ãããªã©æ¢åè³ç£ãæ´»ç¨ãããã¨ãã§ããã ãã®ããã«Gradleã¯ããã¾ã§Mave
æéã¨ã¢ããã¼ã·ã§ã³ã«ä½è£ã®ãããã¡ã«è¡ããã¨ããã¾ã§èª¿ã¹ã¦ããã¾ããã¨ããããã§ãä»åã¯warã®ä½æã¨ãJettyã§ã®èµ·å確èªã ã³ã¼ã éè¦ã¯ãªãã¨æãã¾ããGitHubã«å ¬éãã¾ãï¼EclipseããGitãå©ç¨ããã®ã«å¦ã«ãããã¾ããâ¦ãGitã¯ãã¾ã使ãæ £ãã¦ããªãã®ã§ä½è¨ãªãã¡ã¤ã«ãæ··ãã£ã¦ãããâ¦ï¼ https://github.com/tq-jappy/gradle-sample-webapp ã¢ããªã±ã¼ã·ã§ã³ãä½æãã ä½ãwarã¯ã¨ããããä½ã§ãããã®ã§ãåºæ¬çãªGETã§ã¡ãã»ã¼ã¸ãè¿ãHelloServletãå«ãwarã«ãã¾ãã ä½ã£ããã¡ã¤ã«ã¯ä»¥ä¸ã®3ã¤ã sample.servlet.HelloServlet.java(src/main/java) HttpServletãç¶æ¿ãã¦ãGetæã«ãªã½ã¼ã¹å ã®ãã¡ã¤ã«"hello.txt"ãèªã¿è¾¼ãã§ãä¸èº«ããã®ã¾ã¾
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}