Á°¤ÎÆü / ¼¡¤ÎÆü / ºÇ¿· / 2005-04

¤¿¤Þ¤Ë¤Ã¤­¡£ / 2005-04-27

2005-04
Æü·î²Ð¿åÌÚ¶âÅÚ
12
3456789
10111213141516
17181920212223
24252627282930

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 ¥¨¥ó¥È¥ê¤òÄɲ乤ë)

Referrer (Inside): [2006-03-10-5]
Category: [Maven]

¢£ ¥ª¥Ö¥¸¥§¥¯¥È¤Î½¸¹ç¤òÊÖ¤¹¥á¥½¥Ã¥É (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 ¤òÊѹ¹²Äǽ¤À¤È´ª°ã¤¤¤¹¤ë¤«¤é?

Category: [Java]

¢£ Éå¤ê¤«¤±¤¬¥¦¥Þ¥¤¤Ã¤ÆËÜÅö¤Ç¤¹¤«

¼Â¸³¤·¤Æ¤¯¤ì¤¿¤Î¤Ï¤¢¤ê¤¬¤¿¤¤¤¬¡¤¥Þ¥Í¤·¤¿¤¯¤Ê¤¤¡¥
¥«¥ì¡¼¤Ïû´ü·èÀï·¿¤¬¥¦¥Þ¡¼¤È¤¤¤¦¤Î¤Ï¤Ê¤ó¤«Ç¼ÆÀ¡¥

Category: [misc]

¢£ Let's Note T4

Ìó12»þ´Ö¶îư¤Ã¤Æ¥¢¥Û¤«¤¡!

Category: [misc]
Referrer (Inside): [2005-04-26-1]

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

Á°¤ÎÆü / ¼¡¤ÎÆü / ºÇ¿· / 2005-04

¥«¥Æ¥´¥ê