煩惱歲月

          付出總是有回報的 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!你們這 樣灌是不行地!~那你問我支持 不支持灌水,我說支持,我常來這裡灌,你說支持不支持?
          主站蜘蛛池模板: 临海市| 万全县| 嘉禾县| 保亭| 鄂温| 来宾市| 房山区| 湘乡市| 龙井市| 甘谷县| 常熟市| 宁化县| 广昌县| 界首市| 池州市| 阳信县| 庆元县| 嘉定区| 高淳县| 大厂| 岗巴县| 达尔| 武汉市| 汝州市| 峨边| 怀化市| 龙游县| 黔西县| 钦州市| 凤城市| 盈江县| 临泉县| 织金县| 湖南省| 平舆县| 蓬安县| 伊吾县| 新安县| 黄冈市| 云浮市| 奉节县|