Javaããã¸ã§ã¯ãã«ããããã«ããã¼ã«2
前のエントリã®ç¶ããä»åã¯ã©ã®ãããªå ´é¢ã«ã©ã®ãã¼ã«ãããããããããèªåãªãã®èãããµã¾ãã¦ç´¹ä»ãã¾ãã
ã¡ãªã¿ã«ãããããã®ãã¼ã«ã®ä½¿ç¨çµé¨ã¯ãããªæãã
ãã«ããã¼ã« | 使ç¨çµé¨ |
---|---|
Ant | ä¸ã大è¦æ¨¡ããã¸ã§ã¯ãã1件 |
Maven | å°ãä¸è¦æ¨¡ããã¸ã§ã¯ããè¤æ°ä»¶ |
Gradle | 趣å³ã®ãµã³ãã«ã³ã¼ãã§è¤æ°ä»¶ |
SBT/Scalaã¯ä½¿ã£ããã¨ããªãã®ã§é¤å¤ãæ³åã§ãããSBTãJavaããã¸ã§ã¯ãã§ä½¿ãã¨ãªãã¨ãGradleçãªç«ã¡ä½ç½®ã«ãªããã¨æã£ã¦ã¾ã*1ã
ã½ã¼ã¹ã³ã¼ãã«Java以å¤ãæ±ãããå ´å
ãããã¯ãã³ã¼ãã«ã¯å ¥ããããã¹ãã³ã¼ãã ãã§Groovyãæ±ãããå ´åãå«ã¿ã¾ããè¦ããã«ãJava以å¤ã«ã³ã³ãã¤ã«ãããã½ã¼ã¹ã³ã¼ãããããã©ããã
ãã®ã±ã¼ã¹ã§ã¯ããã¨ãªããGroovyãæ¨æºãµãã¼ããã¦ããGradleã使ã£ãã»ãããããã¨æãã¾ãã
Mavenã§groovyãæ±ããããã«ãããGMavenã¨ããMavenãã©ã°ã¤ã³ãããã«ã¯ããã¾ãããã ãã¡ã³ãããã¾ãããã¦ãã¾ãããã使ã£ã¦ã¿ãæãã¡ãã£ã¨æåãæªãããªã¨ããã¨ãããã¡ãã»ããGroovy 1.8対å¿ãJIRAä¸ã«ã¯ä¸ãã£ã¦ããã®ã§ãããã¾ã æ¬å®¶ã«ã¯åãè¾¼ã¾ãã¦ã¾ããã
ï¼Mavenã§ãµãã¼ãããã¦ããªãï¼ã«ã¹ã¿ã å¦çãå ¥ããªãå ´å
ãã«ãããã»ã¹ãMavenï¼ãã©ã°ã¤ã³å«ãï¼ã§è§£æ±ºã§ããç¯å²ã§ãã¾ãã«ã¹ã¿ã å¦çãå ¥ããªããªãã°ããã«ãã¹ã¯ãªããã®ä½æããããã¯ä»¥ä¸ã®ãããªæãã«ãªããã¨æãã¾ãã
Maven > Gradle >> Ant
ãã£ã±ãMavenã®ãã©ã°ã¤ã³ã®è±å¯ãã¯é åçã§ããã¾ãã¯ã¾ãã°ã«ã¹ã¿ã ãªã³ã¼ããæ¸ããã«ãããããã¨ãå®ç¾ã§ãã¾ããWebãæ¸ç±ã®æ å ±ã»ãã¦ãã¦ã«é¢ãã¦ããã¾ã Gradleã«æ¯ã¹ã¦Ant/Mavenã®æ¹ãè±å¯ã§ããã
ã¡ãªã¿ã«ãMavenãã©ã°ã¤ã³ã§æåããã®ã¯Maven Release Pluginã§ãã*2ããããèªååï¼ã¨ããããã©ã°ã¤ã³ã§ã¯ãªãã§ãããããrelease pluginã«é¢ãã¦ã¯ãã¡ãã£ã¨å¤ãè¨äºã§ãããããåèã«ãã¦ã¿ã¦ãã ããã
ï¼Mavenã§ãµãã¼ãããã¦ããªãï¼ã«ã¹ã¿ã å¦çãå ¥ãå ´å
ãã ããMavenã¯ãã©ã°ã¤ã³ã使ã£ã¦ã解決ã§ããªã or Mavenãã©ã°ã¤ã³ãããããæä¾ããã¦ããªããããªã«ã¹ã¿ã å¦çãçµã¿è¾¼ããã¨ããã¨ãé端ã«é£æ度ããããã¾ãã
Gradle > Ant >> Maven
Maven AntRun Pluginã§Antã¿ã¹ã¯ã使ã£ã¦ã«ã¹ã¿ã å¦çãå®ç¾ããæ¹æ³ãªã©ãããã«ã¯ããã¾ãããå¤ç¨ããã¨ã¡ã³ããã³ã¹æ§ã«æ¬ ããã®ã§ãå人çã«ã¯ãã¾ã好ã¿ãããªãã§ãããã¨ãã£ã¦ããã®ãããªå¦çãè¨è¿°ãããã³ã«Mavenãã©ã°ã¤ã³ãèªä½ããã®ããã¡ãã£ã¨æ·å± ãé«ãã§ãããã
Antã§ã¯ãMavenã®ãããªããã©ã«ãæ§æãè¦å®ããã¦ããããå¾ããªããã°ãªããªãæ§æã»å¶ç´ããªãåã ãã«ã¹ã¿ã ãªå¦çãè¨è¿°ããããã¯ããã¾ãããã ãååã触ããããã«ãããããXMLã§ã¯IFæãForæã¨ãã£ãåç´ãªå¶å¾¡æ§é ãè¨è¿°ããã®ããä¸è¦å´ã§ããAnt-Contribã使ãã°å®è£ ã¯å°ã楽ã§ãã¾ãããã¡ã³ããã³ã¹æ§ã«ä¹ããã®ã¯å¤ãããã§ãã
ã«ã¹ã¿ã å¦çãï¼ç¡è¦ã§ããªããããã«ï¼å ¥ããªããGradleã第ä¸åè£ã«ãªãã§ããããGradleã¯Groovyãã¼ã¹ãªã®ã§ãIFã»Foræã¨ãã£ãå¦çã容æã«è¨è¿°ãããã¨ãã§ãã¾ãã
çµè«
ä½ã®å¶ç´ããªãã®ã§ããã°ãããããã®ããã¸ã§ã¯ãã§Antãé¸ã¶ã®ã¯ãã¾ãã¡ãªããããªãã§ããããã³ã³ãã¤ã«ãã¦ããããã¹ããªã©ã®åºæ¬çãªå¦çãéä¸è¨è¿°ããªããã°ãããªãã®ã¯æ£ç´é¢åã§ããããã¨ãè¨è¿°ããã¨ãã¦ãè¨è¿°éãè¨å¤§ã«ãªã£ã¦ã¡ã³ããã³ã¹æ§ã«æ¬ ãããã¨ã«ãªãã¾ãã
Mavenã¨Gradle/SBTã®ã©ã¡ããé¸ã¶ãã§ããããã®ããã¸ã§ã¯ãã§ã©ãã ãã«ã¹ã¿ã ãªãã«ãå¦çãå ¥ã£ã¦ãããã«ããã¨æãã¾ãããã¨ã¯ããã«ããã¼ã«ã«æºãã人ã®çµé¨ãèæ ®ãã¤ã¤ãé©åã¨æããããã¼ã«ãé¸æãããã¨ã«ãªãã§ãããã
å人çã«ã¯ãGradleã®ãã©ã°ã¤ã³ãµãã¼ããMaven並ã«æåããªãã¨å¬ããã§ããã
*1:Scalaã使ã£ããã¨ãªãã®ã§ä¼ãèããã ãã®ä¸ã§ã®å人çãªæè¦ã¨ãã¦ã¯ãããããJavaã¨Scalaãä½µç¨ãããã¨ããã¾ããªãã®ããªã¨ããå°è±¡ãä¸éå端ã«ä½µç¨ããã¨ãJavaå´ã«ã²ããããã¦Scalaã®è¯ãããã¾ãå¼ãåºããªãã¨ããã¤ã¡ã¼ã¸ãæã£ã¦ã¾ãã
*2:Antã§Maven Release Pluginã¨åããããªãã¨ãå®ç¾ãããã¨ããããçµæ§å¤§å¤ãªãã¨ã«ãªãã¾ãããâ¦orz