¤¿¤Þ¤Ë¤Ã¤¡£ / 2005-04-27
| Æü | ·î | ²Ð | ¿å | ÌÚ | ¶â | ÅÚ |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
2005-04-27 Wed
¢£ maven ¤Ç¼è¤Ã¤Æ¤¤¿É¬Íץ饤¥Ö¥é¥ê¤ò target ¥Ç¥£¥ì¥¯¥È¥ê¤ËÃÖ¤¯¡¥
°Ê²¼¤Î¤è¤¦¤Ê¤Î¤ò maven.xml ¤Ëºî¤ì¤Ð¤¤¤¤¡¥
<?xml version="1.0"?>
<project xmlns:j="jelly:core">
<postGoal name="java:compile">
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="dep" value="${lib.dependency}"/>
<j:if test="${dep.getProperty('jar.manifest.classpath')=='true'}">
<j:if test="${dep.type =='jar'}">
<copy toDir="${maven.build.dir}" file="${lib.path}"/>
</j:if>
</j:if>
</j:forEach>
</postGoal>
</project>
postGoal ¤« preGoal ¤«¤Ï¹¥¤¤Ë¤¹¤ì¤ÐÎɤ¤¤·¡¤¥×¥í¥Ñ¥Æ¥£¤â jar.manifest.classpath ¤Ç¤Ê¤¯¤Æ¤âÎɤ¤¡¥
¤³¤ó¤Ê´¶¤¸¤Ë¤¹¤ì¤Ð
maven jar
¤È¤¹¤ë¤À¤±¤Ç¸å¤Ï
java -jar target/hogehoge-x.x.jar
¤Çư¤¯¡¥
¤Ç¤â¡¤¤è¤¯¹Í¤¨¤¿¤é¡¤jar ¥´¡¼¥ë¤À¤È¡¤°ÕÌ£¹ç¤¤¤¬¾¯¤·°ã¤¦¡¥
¤Þ¤¡¤¤¤¤¤ä¡¥
ref. [2004-08-28-4] (maven jar ¤ÇºîÀ®¤µ¤ì¤ë jar ¥Õ¥¡¥¤¥ë¤Î manifest ¤Ë Class-Path ¥¨¥ó¥È¥ê¤òÄɲ乤ë)
¢£ ¥ª¥Ö¥¸¥§¥¯¥È¤Î½¸¹ç¤òÊÖ¤¹¥á¥½¥Ã¥É (2)
[2005-04-26-2] ¤Ë³¤¤¤Æµº¸À¤ò¡¦¡¦¡¦¡¥
ÊÖ¤µ¤ì¤ë¤Î¤¬ List<T> ¤Ê¤È¤¡¤¤½¤Î List<T> ¤Ï mutable ¤Ç¤¢¤ë¤Ù¤¤Ê¤Î¤«¡¤immutable ¤¬Îɤ¤¤Î¤«¡¥immutable ¤Ê¤é¤Ð¡¤[2005-04-26-2] ¤Î
return new ArrayList<String>(strings);
¤ÎÉôʬ¤ò
return Collections.unmodifiableList(strings);
¤Ë¤¹¤ì¤ÐÎɤ¤¤Ê¤¡¤È¡¥
¤¸¤ã¤¢¡¤¤Ê¤ó¤Ç immutable ¤Ç¤¢¤ë¤Ù¤¤Ê¤Î¤«¡¥mutable ¤Ê List ¤À¤È¥¯¥é¥¹¤Î¥Õ¥£¡¼¥ë¥É¤È¤·¤Æ¤Î List ¤òÊѹ¹²Äǽ¤À¤È´ª°ã¤¤¤¹¤ë¤«¤é?
¢£ Éå¤ê¤«¤±¤¬¥¦¥Þ¥¤¤Ã¤ÆËÜÅö¤Ç¤¹¤«
¼Â¸³¤·¤Æ¤¯¤ì¤¿¤Î¤Ï¤¢¤ê¤¬¤¿¤¤¤¬¡¤¥Þ¥Í¤·¤¿¤¯¤Ê¤¤¡¥
¥«¥ì¡¼¤Ïû´ü·èÀï·¿¤¬¥¦¥Þ¡¼¤È¤¤¤¦¤Î¤Ï¤Ê¤ó¤«Ç¼ÆÀ¡¥
¢£ Let's Note T4
Ìó12»þ´Ö¶îư¤Ã¤Æ¥¢¥Û¤«¤¡!
2008 : 01 02 03 04 05 06 07 08 09 10 11 12
2007 : 01 02 03 04 05 06 07 08 09 10 11 12
2006 : 01 02 03 04 05 06 07 08 09 10 11 12
2005 : 01 02 03 04 05 06 07 08 09 10 11 12
2004 : 01 02 03 04 05 06 07 08 09 10 11 12
2003 : 01 02 03 04 05 06 07 08 09 10 11 12
2002 : 01 02 03 04 05 06 07 08 09 10 11 12
2001 : 01 02 03 04 05 06 07 08 09 10 11 12
ºÇ½ª¹¹¿·»þ´Ö: 2008-09-04 19:19





