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

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

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

    java要多思考下

    成長^_^

       ::  :: 新隨筆 ::  ::  :: 管理 ::
      33 隨筆 :: 0 文章 :: 19 評論 :: 0 Trackbacks
    1、安裝maven插件: http://download.eclipse.org/technology/m2e/releases
    2、使用import-->maven-->existing maven project導入已從svn上checkout下來的maven項目
    3、在本地maven庫安裝目錄中放入setting.xml,示例代碼如下:
     1 <?xml version="1.0" encoding="UTF-8"?>  
     2 <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"  
     3           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
     4           xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">  
     5   
     6   <pluginGroups/>  
     7   <proxies/>  
     8   <servers>
     9    <server>
    10           <id>web-releases</id>
    11           <username>admin</username>
    12           <password>admin123</password>
    13         </server>
    14     <server>
    15           <id>web-snapshots</id>
    16           <username>admin</username>
    17           <password>admin123</password>
    18         </server>
    19   </servers>
    20 
    21   <mirrors>
    22      
    23       <mirror>
    24           <id>mid</id>
    25           <mirrorOf>*</mirrorOf>
    26           <url>http://192.168.16.6:8081/nexus/content/groups/public/</url>
    27     </mirror>
    28   </mirrors>
    29   
    30   <profiles>  
    31     <profile>   
    32       <id>nexus</id>   
    33       <repositories>   
    34         <repository>   
    35             <id>nexus</id>   
    36             <name>local private nexus</name>   
    37             <url>http://192.168.16.6:8081/nexus/content/repositories/releases/</url>   
    38             <releases><enabled>true</enabled></releases>   
    39             <snapshots><enabled>true</enabled></snapshots>   
    40         </repository>   
    41         <repository>   
    42             <id>nexus</id>   
    43             <name>local private nexus</name>   
    44             <url>http://192.168.16.6:8081/nexus/content/repositories/snapshots/</url>   
    45             <releases><enabled>true</enabled></releases>   
    46             <snapshots><enabled>true</enabled></snapshots>   
    47         </repository>   
    48       </repositories>   
    49       <pluginRepositories>   
    50         <pluginRepository>   
    51             <id>nexus</id>   
    52             <name>local private nexus</name>   
    53             <url>http://192.168.16.6:8081/nexus/content/groups/public</url>   
    54             <releases><enabled>true</enabled></releases>   
    55             <snapshots><enabled>false</enabled></snapshots>   
    56         </pluginRepository>   
    57        </pluginRepositories>   
    58     </profile>  
    59   </profiles>  
    60   
    61   <activeProfiles>  
    62     <activeProfile>nexus</activeProfile>   
    63   </activeProfiles>  
    64   
    65 </settings> 
    4、運行maven-->update dependency將依賴插件及Jar包等相關文件down到本地Maven庫中
    5、新建一個tomcat 6.0  server,在eclipse中生成的servers工程中修改以下配置文件屬性:
    6、在catalina.properties中增加key-value配置,在應用項目相關配置文件中就可直接通過${key}的方式獲取value
    7、修改server.xml,增加如下示例JNDI資源配置(http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html):
    1    <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
    2 <Context path="/internal" docBase="E:/svn_working/cd/internal/trunk/target/apps-internal" debug="0" reloadable="true" crossContext="true" >
    3     <Resource name="jdbc/internalds" auth="Container" type="javax.sql.DataSource"
    4                maxActive="100" maxIdle="30" maxWait="10000"
    5                username="root" password="root" driverClassName="com.mysql.jdbc.Driver"
    6                url="jdbc:mysql://localhost:3306/customer"/>
    7 </Context>
    8、修改web.xml,增加:
    1 <description>MySQL Test App</description>
    2       <resource-ref>
    3           <description>DB Connection</description>
    4           <res-ref-name>jdbc/internalds</res-ref-name>
    5           <res-type>javax.sql.DataSource</res-type>
    6           <res-auth>Container</res-auth>
    7       </resource-ref>
    9、項目run as --> maven clean, run as--> maven build(goals:package, skip test=true)









    posted on 2011-10-25 17:28 java要多思考下 閱讀(1853) 評論(0)  編輯  收藏 所屬分類: 研發管理
    主站蜘蛛池模板: 免费萌白酱国产一区二区| 成人免费毛片观看| 亚洲成人免费网站| 在线免费一区二区| 最新久久免费视频| 亚洲av无码不卡久久| 亚洲Aⅴ无码一区二区二三区软件| caoporm超免费公开视频| 亚洲韩国在线一卡二卡| 国产精品免费看香蕉| 久久国产精品国产自线拍免费| 亚洲人成影院77777| 亚洲一区二区精品视频| 在线看片韩国免费人成视频| 四虎成人精品国产永久免费无码| 亚洲免费在线视频| 又黄又爽一线毛片免费观看| 无码人妻一区二区三区免费看| 亚洲变态另类一区二区三区 | 在人线av无码免费高潮喷水| 午夜成人无码福利免费视频| 亚洲男人的天堂在线| 亚洲性日韩精品一区二区三区| 一二三四影视在线看片免费 | 免费人成又黄又爽的视频在线电影| 亚洲国产精品久久久久婷婷软件 | 亚洲av无码一区二区乱子伦as| 日韩人妻无码免费视频一区二区三区| 成人精品一区二区三区不卡免费看| 亚洲色大成网站www久久九| 亚洲高清在线播放| 在线日韩日本国产亚洲| 国产高清在线精品免费软件| 最近的中文字幕大全免费8| 国产精品内射视频免费| 亚洲精品无播放器在线播放| 久久精品国产亚洲AV电影| 亚洲综合色视频在线观看| 日韩免费视频网站| 成人免费毛片内射美女APP| 午夜免费福利片观看|