<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要多思考下 閱讀(1852) 評論(0)  編輯  收藏 所屬分類: 研發(fā)管理
    主站蜘蛛池模板: 青青草a免费线观a| 国产免费一区二区视频| 岛国片在线免费观看| ass亚洲**毛茸茸pics| 成年女人免费碰碰视频| 亚洲欧美国产国产一区二区三区| 午夜精品在线免费观看| 噜噜综合亚洲AV中文无码| 免费乱理伦在线播放| 一级毛片免费一级直接观看| 中文亚洲AV片不卡在线观看| 99re6在线视频精品免费| 久久精品国产亚洲AV大全| 野花高清在线观看免费完整版中文 | 亚洲va无码专区国产乱码| 久久精品视频免费看| 亚洲成年人免费网站| 成人毛片免费网站| 黄页网站在线免费观看| 国产成人精品日本亚洲| 很黄很黄的网站免费的| 亚洲av日韩精品久久久久久a| 亚洲精品视频在线看| 一区二区三区福利视频免费观看| 亚洲一卡二卡三卡| 亚洲第一区精品观看| 久久精品免费视频观看| 中国china体内裑精亚洲日本| 亚洲国产精品成人一区| 99热在线精品免费播放6| 一本色道久久88—综合亚洲精品 | 国产va精品免费观看| 老湿机一区午夜精品免费福利| 亚洲AV综合色区无码一区爱AV| 97免费人妻无码视频| 美女露隐私全部免费直播| 亚洲AV无码乱码在线观看裸奔 | 97视频免费在线| 久久精品国产亚洲AV电影网| 久久精品亚洲综合一品| 国产精品色午夜免费视频|