maven2å°å ¥TIPSãã®2ãoptionalä¾å
ååã®jasperreportsã¿ãããªpom.xmlãä½ã£ã¦ãã¾ãã¨ããã®ããã¸ã§ã¯ãã«ä¾åããæ¹ã大迷æã ã¨ããã®ã¯ããã£ããã©ããªãã©ãããã°ãããã ï¼ã¨ãã話ãä»åã
ï¼SCOPEã®æ¹ãåºç¤ã£ã½ãã®ã§ãTIPSã¨ãã¦ã¯optionalãåªå
ï¼
çµè«ãè¨ãã¨optionalä¾åã«ããã°è¯ãã§ãã
以ä¸ã®ä¾åæ§å®ç¾©ã®optionalè¦ç´ ãtrueãªå ´åãoptionalãªä¾åã¨ãªãã¾ãã
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.0</version> <type>jar</type> <scope>test</scope> <optional>true</optional> </dependency>
åä½ã¯ããã®ããã¸ã§ã¯ãã«ä¾åãã¦ããããã¸ã§ã¯ãã§ã¯optionalä¾åã¯ç¡è¦ãã§ãã
å¿
è¦ã ããã©ãããã®ããã¸ã§ã¯ãã«ä¾åããããã¸ã§ã¯ãã«ã¨ã£ã¦ã¯å¿
è¦ãã©ããããããªãä¾åã«ã¤ãã¾ãã
ããã«ããããããjasperreportsã®ä¾ã§è¨ãã¨ã
- jasperreportsã§PDFåºåãã人ã«ã¨ã£ã¦ã¯ãpoiã¯å¿ è¦ç¡ãã
- jasperreportsã§ã¨ã¯ã»ã«åºåãã人ã«ã¨ã£ã¦ã¯ãiTextã¯å¿ è¦ç¡ãã
- jasperreportsæ¬ä½ã§ã¯ä¸¡æ¹å¿ è¦ã
ã¨ããæãjasperreportsã§ã¯optionalä¾åã¨ãã¦å®ç¾©ãã¦ã使ç¨å´ã§ã¯èªåçã«è§£æ±ºãããªãã®ã§ãPDFåºåã使ç¨ããå ´åã¯ãjasperreportsã«å ãã¦iTextã®ä¾åãå®ç¾©ããã°è¯ãã¯ã±ã§ãã
ãã£ããmaven2ãå©ç¨ãã¦ããã®ã«ãããããæ¸ããªããã°ãããªãã¨ããã«è¥å¹²ãç¡é§æãæãã¾ãããååã®å¼·å¶æé¤ãããããã¯ãã·ã§ãã
PDFåºåã使ç¨ããããã¸ã§ã¯ãã¯å®éã«iTextã«ä¾åãã¦ããã¯ã±ã§ããã
å¼·å¶æé¤ã®æ¹ã®ãã¡ãªããã¯ä»¥ä¸ãèãããã¾ãã
- ã¾ã£ããé¢ä¿ç¡ãpoiã«ã¤ãã¦æ¸ãå¿ è¦ããã
- çµé¨ããã®æ¨æ¸¬ã§ããã使ç¨ããåã ãä¾åæ§ãå®ç¾©ããæ¹ã使ç¨ããªãä¾åãå¼·å¶æé¤ãããããè¨è¿°éã¯å°ãªã
- 競åã©ã¤ãã©ãªãæ··å¨ãã¦ã®ã¨ã©ã¼ãããClassNotFoundã®æ¹ã対å¦ããããã
ã¨ãããã¨ã§ãã©ã¤ãã©ãªã¨ãã¦ä½æããããã¸ã§ã¯ãã§ã¯ãä¾åæ§ãå¿
é ã§ãããããèãã¦ãå¿
é ã§ç¡ããã®ã¯å
¨ã¦optionalã«ãã¦ãã¾ãã¾ãããï¼
optionalã使ãå¿
è¦ãç¡ããããªå°ããç²åº¦ã§ã®ããã¸ã§ã¯ãä½æãå¿ãããâ¦ã¨ããã®ãããmaven2çãªèãæ¹ã®ãããªæ°ããã¾ãããããã¸ã§ã¯ããå¢ããããã®ãã¡ã³ããã³ã¹æ§ä½ä¸ãã¾ãããã©ã£ã¡ããããã¯æ£ç´å¤æã¤ãããã¦ã¾ãã
åååæ§Maven – POM Referenceã«ã¡ããã¨æ¸ãã¦ããã®ã§è©³ããã¯ãã¡ããã©ããã