軟件是對質(zhì)量的不懈追求

          導(dǎo)航

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

          統(tǒng)計

          常用鏈接

          留言簿

          隨筆檔案

          文章分類

          文章檔案

          博客

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          2011年2月24日 #

          linux du 查看文件夾占用空間


          du -sh *

          posted @ 2011-04-15 08:39 BlakeSu 閱讀(282) | 評論 (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 閱讀(332) | 評論 (0)編輯 收藏

          主站蜘蛛池模板: 新蔡县| 固安县| 射阳县| 交口县| 繁峙县| 克什克腾旗| 天峻县| 聂荣县| 铁岭市| 德兴市| 伊通| 郸城县| 桂林市| 延庆县| 合肥市| 南皮县| 阳城县| 竹溪县| 扎鲁特旗| 宜昌市| 牡丹江市| 海南省| 剑川县| 鹿泉市| 拉萨市| 剑河县| 毕节市| 绥阳县| 黔南| 白银市| 犍为县| 鹰潭市| 廊坊市| 马山县| 和政县| 云和县| 横峰县| 伊宁县| 石柱| 行唐县| 襄汾县|