軟件是對質量的不懈追求

          導航

          <2011年2月>
          303112345
          6789101112
          13141516171819
          20212223242526
          272812345
          6789101112

          統(tǒng)計

          常用鏈接

          留言簿

          隨筆檔案

          文章分類

          文章檔案

          博客

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          2011年2月24日 #

          linux du 查看文件夾占用空間


          du -sh *

          posted @ 2011-04-15 08:39 BlakeSu 閱讀(286) | 評論 (0)編輯 收藏

          Building Standalone Application with Maven2

          If you are building standalone application in Java, Maven is your friend when packing your application,
          There are two way to let Maven package your application, either as a single jar with all your dependencies jar.


           <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
             <descriptorRefs>
              <descriptorRef>jar-with-dependencies</descriptorRef>
             </descriptorRefs>
            </configuration>
           </plugin>



          One advantage if you choose to do this way is if you need to sign your application jar.
          This is needed if you are building a Java Web Start client and you need more access than connecting back to the server.
          To read more about have Maven signing your jar read http://maven.apache.org/plugins/maven-jar-plugin/usage.html.
          But if you choose to go this way, make sure that all license agreement are shipped with your one single jar.

          Another way is to let Maven package your source code only and then referring the dependent jar file from the MANIFEST file.


           <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
             <archive>
              <manifest>
               <addClasspath>true</addClasspath>
               <mainClass>se.msc.adapter.Main</mainClass>
               <classpathPrefix>lib/</classpathPrefix>
              </manifest>
             </archive>
            </configuration>
           </plugin>

          posted @ 2011-02-24 13:03 BlakeSu 閱讀(335) | 評論 (0)編輯 收藏

          主站蜘蛛池模板: 佛学| 永吉县| 永嘉县| 富民县| 济南市| 甘肃省| 津市市| 武功县| 桐庐县| 仁寿县| 高雄市| 金塔县| 离岛区| 米泉市| 岐山县| 连平县| 施甸县| 兰州市| 松滋市| 黎川县| 白城市| 尼勒克县| 屯门区| 即墨市| 巍山| 陆丰市| 文化| 墨脱县| 无为县| 亚东县| 诸暨市| 麟游县| 武安市| 茌平县| 广南县| 石柱| 宁河县| 福泉市| 东乡族自治县| 惠安县| 平阴县|