<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、創建項目目錄結構
        project/common/branches(注:公共項目)
                               /tags 
                               /trunk/src/main/java
                                                     /resources                                           
                                             /test/java
                                                    /resources
                                       /pom.xml
                 /sso/branches(注:單點登錄)
                       /tags 
                       /trunk/src/main/java
                                             /resources                                           
                                     /test/java
                                            /resources
                                            /WebContent
                                /pom.xml
    2、編寫pom.xml,代碼片段
     1 
     2 <modelVersion>4.0.0</modelVersion>
     3   <groupId>com.cd</groupId>
     4   <artifactId>sso</artifactId>
     5   <packaging>war</packaging>
     6   <version>1.0</version>
     7   
     8   <properties>
     9     <hession.version>3.1.5</hession.version>
    10       <spring.version>3.0.5.RELEASE</spring.version>
    11       <jackson.version>1.7.1</jackson.version>
    12       <mybatis.version>3.0.3</mybatis.version>
    13       <redis.version>1.5.2</redis.version>
    14       <mysql.version>5.1.14</mysql.version>
    15       <org.slf4j.version>1.6.1</org.slf4j.version>
    16       <quartz.version>1.5.2</quartz.version>
    17     <mail.version>1.4</mail.version>
    18       <buildDirectory>../../../build/sso</buildDirectory>
    19       <sourceDirectory>src</sourceDirectory>
    20       <fileName>sso</fileName>
    21       <profile>dev</profile>
    22       <cd.common.version>1.0</cd.common.version>    
    23   </properties>
    24   
    25   <build>  
    26     <directory>${buildDirectory}</directory>
    27     <finalName>${fileName}</finalName>
    28     <sourceDirectory>${sourceDirectory}</sourceDirectory>
    29     
    30     <plugins>
    31         <plugin>
    32             <groupId>org.apache.maven.plugins</groupId>
    33             <artifactId>maven-antrun-plugin</artifactId>
    34             <version>1.6</version>
    35             <executions>
    36               <execution>
    37                 <id>compile</id>
    38                 <phase>compile</phase>
    39                 <configuration>
    40                   <target>
    41                   </target>
    42                 </configuration>
    43                 <goals>
    44                   <goal>run</goal>
    45                 </goals>
    46               </execution>
    47             </executions>
    48         </plugin>
    49         
    50         <plugin>
    51             <artifactId>maven-compiler-plugin</artifactId>
    52             <version>2.3.2</version>
    53             <configuration>
    54                 <source>1.6</source>
    55                 <target>1.6</target>
    56                 <encoding>UTF-8</encoding>
    57             </configuration>
    58         </plugin>
    59         
    60         <plugin>
    61             <artifactId>maven-resources-plugin</artifactId>
    62             <version>2.4.3</version>
    63             <configuration><encoding>UTF-8</encoding></configuration>
    64         </plugin>
    65         
    66         <plugin>
    67             <artifactId>maven-war-plugin</artifactId>
    68             <version>2.1.1</version>
    69             <configuration>
    70                 <warSourceDirectory>src/main/WebContent</warSourceDirectory>
    71             </configuration>
    72         </plugin>
    73     </plugins>
    74     
    75     <resources>
    76         <resource>  
    77             <directory>src/main/resources</directory> 
    78             <excludes>  
    79                 <exclude>sql/*.*</exclude>
    80                 <exclude>config/*.*</exclude>
    81              </excludes>  
    82         </resource>  
    83     </resources> 
    84   </build>    

    3、使用mvn命令打包項目
    mvn clean
    mvn package

    4、在eclipse中開發前的設置
        a、從svn庫中check下cdcommon為普通java project
        b、check下sso位web project
        c、配置.classpath文件
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <classpath>
     3     <classpathentry kind="src" path="src/main/java"/>
     4     <classpathentry kind="src" path="cdcommon"/>
     5     <classpathentry kind="src" path="src/main/resources"/>
     6     <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre6">
     7         <attributes>
     8             <attribute name="owner.project.facets" value="java"/>
     9         </attributes>
    10     </classpathentry>
    11     <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0">
    12         <attributes>
    13             <attribute name="owner.project.facets" value="jst.web"/>
    14         </attributes>
    15     </classpathentry>
    16     <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
    17     <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
    18     <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/common-lib">
    19         <attributes>
    20             <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
    21         </attributes>
    22     </classpathentry>
    23     <classpathentry kind="output" path="build/classes"/>
    24 </classpath>
    25 
           d、配置.project文件
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <projectDescription>
     3     <name>sso</name>
     4     <comment></comment>
     5     <projects>
     6     </projects>
     7     <buildSpec>
     8         <buildCommand>
     9             <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
    10             <arguments>
    11             </arguments>
    12         </buildCommand>
    13         <buildCommand>
    14             <name>org.eclipse.jdt.core.javabuilder</name>
    15             <arguments>
    16             </arguments>
    17         </buildCommand>
    18         <buildCommand>
    19             <name>org.eclipse.wst.common.project.facet.core.builder</name>
    20             <arguments>
    21             </arguments>
    22         </buildCommand>
    23         <buildCommand>
    24             <name>org.eclipse.wst.validation.validationbuilder</name>
    25             <arguments>
    26             </arguments>
    27         </buildCommand>
    28     </buildSpec>
    29     <natures>
    30         <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
    31         <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
    32         <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
    33         <nature>org.eclipse.jdt.core.javanature</nature>
    34         <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
    35     </natures>
    36     <linkedResources>
    37         <link>
    38             <name>cdcommon</name>
    39             <type>2</type>
    40             <location>E:/work_space/cdcommon/src/main/java</location>
    41         </link>
    42     </linkedResources>
    43 </projectDescription>
    44 





    posted on 2011-10-11 18:20 java要多思考下 閱讀(980) 評論(0)  編輯  收藏 所屬分類: 研發管理
    主站蜘蛛池模板: 亚洲毛片αv无线播放一区| 亚洲精品视频专区| 久视频精品免费观看99| 在线亚洲午夜片AV大片| 亚洲精品成人在线| 久久精品免费观看国产| 亚洲日韩国产一区二区三区在线| 亚洲天堂中文字幕在线| 最近免费中文字幕高清大全| 美女扒开尿口给男人爽免费视频| 亚洲熟妇av一区二区三区漫画| 在线观看免费人成视频| eeuss草民免费| 亚洲 日韩 色 图网站| 亚洲精品一级无码中文字幕| 100部毛片免费全部播放完整| 色欲aⅴ亚洲情无码AV| 亚洲丁香色婷婷综合欲色啪| 四虎永久精品免费观看| 91大神免费观看| 国产人成网在线播放VA免费| 亚洲中文字幕无码久久2020| 亚洲精品~无码抽插| 永久免费看mv网站入口| 24小时日本电影免费看| 两性色午夜视频免费播放| 亚洲成av人片在www鸭子| 亚洲网红精品大秀在线观看| 亚洲高清国产拍精品青青草原 | 精品在线免费视频| 亚洲ts人妖网站| 亚洲男人的天堂www| 免费在线观看理论片| 91视频国产免费| 久久精品人成免费| 西西人体免费视频| 一区二区三区免费视频观看| 大桥未久亚洲无av码在线| 亚洲香蕉久久一区二区| 亚洲欧洲日产国产综合网| 国产成人亚洲精品狼色在线|