<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    java要多思考下

    成長(zhǎng)^_^

       ::  :: 新隨筆 ::  ::  :: 管理 ::
      33 隨筆 :: 0 文章 :: 19 評(píng)論 :: 0 Trackbacks
    1、多個(gè)依賴項(xiàng)目(以common,sso為例)存放于同級(jí)目錄下(這個(gè)目錄暫稱(chēng)為頂級(jí)目錄)
    2、在頂級(jí)目錄中創(chuàng)建sso-pom.xml,sso-pom-dev.xml,sso-pom-test.xml
    2.1、編寫(xiě)sso-pom.xml,sso-pom-dev.xml,sso-pom-test.xml如下:
     1         公共配置:
     2         <artifactId>sso</artifactId>
     3         <groupId>com.xxx.sso</groupId>
     4         <version>3.2.0-SNAPSHOT</version>
     5         <packaging>pom</packaging>
     6         
     7         不同配置:
     8         sso-pom.xml:
     9         <modules>
    10             <module>cdcommon/trunk/pom.xml</module>    
    11             <module>sso/trunk/pom.xml</module>
    12         </modules>
    13 
    14         sso-pom-dev.xml:
    15         <modules>
    16             <module>cdcommon/trunk/pom-dev.xml</module>    
    17             <module>sso/trunk/pom-dev.xml</module>
    18         </modules>
    19 
    20         sso-pom-test.xml:
    21         <modules>
    22             <module>cdcommon/trunk/pom-test.xml</module>    
    23             <module>sso/trunk/pom-test.xml</module>
    24         </modules>

    3、每個(gè)項(xiàng)目(common,sso)目錄中創(chuàng)建一個(gè)pom.xml,pom-dev.xml,pom-test.xml

    3.1、編寫(xiě)pom.xml,pom-dev.xml,pom-test.xml,替換不同環(huán)境下的配置文件

     1 <properties>
     2             <buildDirectory>e:/mvn_out/cdcommon</buildDirectory>
     3             <sourceDirectory>src/main/java</sourceDirectory>
     4             <fileName>common-1.0</fileName>
     5             <commonProperties>src/main/resources/config/common-dev.properties</commonProperties>
     6         </properties>
     7 
     8         <plugins>
     9             <plugin>
    10             <groupId>org.apache.maven.plugins</groupId>
    11             <artifactId>maven-antrun-plugin</artifactId>
    12             <version>1.6</version>
    13             <executions>
    14               <execution>
    15                 <id>compile</id>
    16                 <phase>compile</phase>
    17                 <configuration>
    18                   <target>
    19                         <echo message="********************** copy profile common.properties file *************************"/>                                                                                                                                                                                    
    20                         <copy file="${commonProperties}"
    21                               tofile="${buildDirectory}/classes/common.properties" overwrite="true"/>
    22                   </target>
    23                 </configuration>
    24                 <goals>
    25                   <goal>run</goal>
    26                 </goals>
    27               </execution>
    28             </executions>
    29             </plugin>
    30         <plugins>
    4、運(yùn)行命令,打包不同環(huán)境下的發(fā)布版本
            生產(chǎn):mvn package -f sso-pom.xml
            開(kāi)發(fā):mvn package -f sso-pom-dev.xml
            測(cè)試:mvn package -f sso-pom-test.xml

     
    posted on 2012-10-30 11:29 java要多思考下 閱讀(5092) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): 研發(fā)管理
    主站蜘蛛池模板: 久久久久久久91精品免费观看| 四虎影视精品永久免费| 伊人久久五月丁香综合中文亚洲| 成人au免费视频影院| 国产精品99爱免费视频| 久久亚洲免费视频| 好吊妞视频免费视频| a级片免费在线播放| 亚洲国产成人99精品激情在线| 国产精品亚洲精品日韩已方| 国产乱子精品免费视观看片| 黄色片网站在线免费观看| 亚洲bt加勒比一区二区| 国产精品免费视频一区| 久久久精品免费视频| 亚洲AV无码专区亚洲AV桃| 久久精品视频亚洲| 日本v片免费一区二区三区| 国内精品一级毛片免费看| 亚洲精品无码av中文字幕| 亚洲αv久久久噜噜噜噜噜| 日本免费v片一二三区| 69视频在线是免费观看| 久草免费福利在线| 亚洲AV无码一区二区三区性色| 婷婷亚洲久悠悠色悠在线播放| 国产91久久久久久久免费| 3d成人免费动漫在线观看| 久久最新免费视频| 亚洲av成本人无码网站| 亚洲乱码日产精品BD在线观看| 亚洲午夜久久久久久久久久| 在线观看免费国产视频| 久久久久久国产a免费观看黄色大片| 成在线人免费无码高潮喷水| 日韩亚洲人成在线综合| 亚洲国产精品一区二区久| 久久被窝电影亚洲爽爽爽| 免费国产a国产片高清| 日韩吃奶摸下AA片免费观看| 最近在线2018视频免费观看|