煩惱歲月

          付出總是有回報的 take action follow your heart , or follow your head
          posts - 40, comments - 5, trackbacks - 0, articles - 4

          use maven to package and upgrade your application.

          Posted on 2009-06-07 14:25 不需要解釋 閱讀(283) 評論(0)  編輯  收藏 所屬分類: antmaven

          Mave is good at jar management. so maven can help me to package the java application. with maven help, we can make the release application zip smaller.

          for the smaller:we use the maven ant task to manager jars:

          build.xml

          <project basedir="." default="all" name="jars" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
          <property name="build.compiler" value="modern"/>
               <path id="maven-ant-tasks.classpath" path="${basedir}/maven/maven-ant-tasks-2.0.10.jar" />
            <typeset resource="org/apache/maven/artifact/ant/antlib.xml"
                     uri="antlib:org.apache.maven.artifact.ant"
                     classpathref="maven-ant-tasks.classpath" />

              <target name="all">
                    <antcall target="get_server_jars"/>
                    <antcall target="get_orchis_jars"/>
              </target>

              <target name="get_server_jars">
                  <artifact:dependencies pathId="dependency.classpath"  filesetId="maven.fileset">
                  <dependency groupId="junit" artifactId="junit" version="3.8.2"/>  
                  <dependency groupId="activation" artifactId="activation" version="1.1"/>    
                  <dependency groupId="castor" artifactId="castor" version="1.1"/>    

                  </artifact:dependencies>

              <copy todir="${basedir}/lib">
                  <fileset refid="maven.fileset" />
                  <!-- This mapped strips off all leading directory information -->
                  <mapper type="flatten" />
              </copy>
          </target>

              <target name="get_orchis_jars">
                  <artifact:dependencies pathId="dependency.classpath"  filesetId="maven.fileset">
                      <dependency groupId="junit" artifactId="junit" version="3.8.2"/>       
                      <dependency groupId="javax.servlet" artifactId="servlet-api" version="2.4"/>      
                  </artifact:dependencies>

              <copy todir="${basedir}/webapps/ROOT/WEB-INF/lib">
                  <fileset refid="maven.fileset" />
                  <!-- This mapper strips off all leading directory information -->
                  <mapper type="flatten" />
              </copy>
          </target>

          so we can use maven to update you application.


          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導航:
           
          我實話告訴你們,我可是身經(jīng)百戰(zhàn)了.bbs我見的多了,哪個版我沒灌過?你們要知道, 一塌糊 涂的triangle,PIC,SEX版,那比你們不知道厲害到哪里去了,我在那談笑風聲.你 們有一好就是無論在哪個版,什么話題都灌,但是灌來灌去的問題,都too simple, sometimes naive!你 們懂不懂呀?啊?所以說灌水啊,關(guān)鍵是要提高自己的知識水平.你 們啊,不要總想著弄個大坑,然后灌上十大,再把我羞辱一番……你們啊,naive!你們這 樣灌是不行地!~那你問我支持 不支持灌水,我說支持,我常來這裡灌,你說支持不支持?
          主站蜘蛛池模板: 河南省| 额尔古纳市| 池州市| 桃源县| 博罗县| 沙洋县| 中牟县| 荣昌县| 佛学| 诸暨市| 饶平县| 马边| 五寨县| 武川县| 屯留县| 临江市| 新巴尔虎右旗| 南阳市| 克山县| 汶上县| 秦皇岛市| 资中县| 兖州市| 九寨沟县| 绥芬河市| 淮安市| 邵阳县| 利津县| 康保县| 墨竹工卡县| 丽水市| 昭觉县| 临猗县| 咸丰县| 阿尔山市| 东阿县| 天峨县| 桃园市| 玛纳斯县| 莲花县| 崇仁县|