煩惱歲月

          付出總是有回報(bào)的 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 不需要解釋 閱讀(282) 評論(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)站導(dǎo)航:
           
          我實(shí)話告訴你們,我可是身經(jīng)百戰(zhàn)了.bbs我見的多了,哪個(gè)版我沒灌過?你們要知道, 一塌糊 涂的triangle,PIC,SEX版,那比你們不知道厲害到哪里去了,我在那談笑風(fēng)聲.你 們有一好就是無論在哪個(gè)版,什么話題都灌,但是灌來灌去的問題,都too simple, sometimes naive!你 們懂不懂呀?啊?所以說灌水啊,關(guān)鍵是要提高自己的知識水平.你 們啊,不要總想著弄個(gè)大坑,然后灌上十大,再把我羞辱一番……你們啊,naive!你們這 樣灌是不行地!~那你問我支持 不支持灌水,我說支持,我常來這裡灌,你說支持不支持?
          主站蜘蛛池模板: 会理县| 盐城市| 广州市| 安宁市| 龙海市| 洛川县| 勐海县| 康乐县| 乡城县| 淮安市| 武山县| 陕西省| 通城县| 涞水县| 罗江县| 江源县| 公安县| 兰考县| 岳池县| 通道| 阳泉市| 绿春县| 滦南县| 平度市| 赤水市| 新绛县| 侯马市| 泰兴市| 嘉兴市| 新宁县| 太白县| 富平县| 巫山县| 高邑县| 温泉县| 揭阳市| 桐柏县| 政和县| 海林市| 贵南县| 芦溪县|