<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、創(chuàng)建項目目錄結(jié)構(gòu)
        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中開發(fā)前的設(shè)置
        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)  編輯  收藏 所屬分類: 研發(fā)管理
    主站蜘蛛池模板: 免费无遮挡无码视频在线观看| 日韩精品无码免费视频| 日本一区免费电影| 亚洲免费视频一区二区三区| 亚洲AV日韩AV天堂一区二区三区| 老司机在线免费视频| 欧洲美女大片免费播放器视频| 亚洲日韩精品一区二区三区无码| 亚洲免费在线视频播放| 羞羞漫画页面免费入口欢迎你| 亚洲国产精品一区| 永久免费bbbbbb视频| 免费精品一区二区三区第35| 亚洲性无码一区二区三区| 亚洲热妇无码AV在线播放| 毛片基地免费观看| a毛片免费全部播放完整成| 亚洲国产成人无码AV在线影院| 亚洲免费观看视频| 日本黄色免费观看| 99久久99久久精品免费看蜜桃 | 青青青国产免费一夜七次郎| 91免费国产视频| 亚洲精品亚洲人成在线| 亚洲精品私拍国产福利在线| 亚洲第一页综合图片自拍| 亚洲电影免费观看| 91在线免费视频| 国内成人精品亚洲日本语音| 亚洲国产情侣一区二区三区| 亚洲精品成人网站在线观看 | 亚洲国产成人精品无码区在线观看| 最近免费中文字幕大全视频| 久久99青青精品免费观看| 一区二区视频免费观看| 亚洲日韩国产一区二区三区在线 | 日本高清在线免费| 日韩av无码免费播放| 视频免费1区二区三区| 亚洲欧美日韩综合久久久| 亚洲日本乱码一区二区在线二产线|