<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要多思考下 閱讀(987) 評論(0)  編輯  收藏 所屬分類: 研發管理
    主站蜘蛛池模板: 亚洲成Av人片乱码色午夜| 国产一级淫片免费播放电影| 久久亚洲AV永久无码精品| 亚洲欧美在线x视频| 成人在线视频免费| 在线亚洲高清揄拍自拍一品区| 日韩电影免费在线观看中文字幕| 在线a亚洲v天堂网2019无码| 一区二区三区免费电影| 久久综合亚洲色HEZYO国产| 一级特黄录像视频免费| 亚洲深深色噜噜狠狠爱网站| fc2成年免费共享视频网站| 亚洲欧洲精品成人久久曰影片| 国产黄在线观看免费观看不卡| 国产亚洲A∨片在线观看 | 亚洲无码一区二区三区| 夭天干天天做天天免费看| 久久精品国产亚洲AV| 国产免费观看网站| 中文字幕永久免费| 日韩精品亚洲人成在线观看| 黄色片在线免费观看| 亚洲av无码专区青青草原| 亚洲国产精品专区在线观看| 久久免费精品一区二区| 亚洲无限乱码一二三四区| 日韩在线视频免费看| 亚洲一区二区三区免费| 日韩亚洲Av人人夜夜澡人人爽 | 黄床大片免费30分钟国产精品| 亚洲av日韩av无码| 91香蕉视频免费| 羞羞视频免费网站日本| 亚洲av最新在线网址| 久久不见久久见免费影院 | 波霸在线精品视频免费观看| 7777久久亚洲中文字幕蜜桃| 日韩免费高清视频网站| 中文字幕成人免费高清在线视频| 亚洲婷婷天堂在线综合|