锘??xml version="1.0" encoding="utf-8" standalone="yes"?>天堂中文av在线资源库,亚洲v精品v日韩v欧美v专区,亚洲精品国产第一综合99久久http://www.aygfsteel.com/kongji2008/category/40742.htmlandy.kong鐨勭┖闂?/description>zh-cnThu, 08 Apr 2010 15:28:18 GMTThu, 08 Apr 2010 15:28:18 GMT60maven浠撳簱綆$悊鍣∟exushttp://www.aygfsteel.com/kongji2008/archive/2010/04/07/317634.htmlandy.kongandy.kongWed, 07 Apr 2010 05:57:00 GMThttp://www.aygfsteel.com/kongji2008/archive/2010/04/07/317634.htmlhttp://www.aygfsteel.com/kongji2008/comments/317634.htmlhttp://www.aygfsteel.com/kongji2008/archive/2010/04/07/317634.html#Feedback0http://www.aygfsteel.com/kongji2008/comments/commentRss/317634.htmlhttp://www.aygfsteel.com/kongji2008/services/trackbacks/317634.html

璁塊棶http://nexus.sonatype.org/downloads/涓嬭澆Nexus銆?br /> 鍚姩Nexus錛屽氨鏄惎鍔ㄤ竴涓獁eb鏈嶅姟鍣紝瀹冪殑榛樿鍦板潃鏄痩ocalhost:8081銆侼exus鍦ㄤ竴涓悕涓篔etty鐨剆ervlet瀹瑰櫒涓繍琛岋紝 瀹冧嬌鐢ㄤ竴涓悕涓篢anuki Java Service Wrapper鐨勬湰鍦版湇鍔″寘瑁瑰櫒鍚姩銆傝繖涓湇鍔″寘瑁瑰櫒鍙互琚厤緗垚浠indows鏈嶅姟鎴朥nix瀹堟姢綰跨▼鐨勫艦寮忚繍琛孨exus銆傝鍚姩Nexus錛屼綘闇 瑕佷負浣犵殑騫沖彴鎵懼埌鍚堥傜殑鍚姩鑴氭湰銆傝鏌ョ湅鍙敤騫沖彴鐨勫垪琛紝鏌ョ湅${NEXUS_HOME}/bin/jsw鐩綍鐨勫唴瀹廣傚彲鎵ц鏂囦歡鍦?nexus瀹夎鐩? 褰?"nexus-webapp-1.0.0"binjsw"windows-x86-32 涓嬶細InstallNexus.bat/UninstallNexus.bat鏄畨瑁?鍗歌澆nexus涓簑indows service銆侼exus.bat鏄洿鎺ュ湪鍛戒護琛屼腑鍚姩Nexus錛屽鏋滀笉鎯沖畨瑁匩exus涓簑indows service錛屽彲浠ョ敤榪欎釜鏂囦歡鏉ユ墜宸ユ帶鍒禢exus鐨勫惎鍔ㄩ鍑恒?/p>

1.閰嶇疆nexus
棣栧厛鐧誨綍錛岄粯璁ゅ湴鍧http://localhost:8081/nexus/錛岄粯璁ょ敤鎴峰悕瀵嗙爜涓篴dmin/admin123.
nexus榛樿鏄叧闂繙紼嬬儲寮曚笅杞藉姛鑳界殑銆傚紑鍚殑鏂瑰紡錛?
鐐瑰嚮Administration鑿滃崟涓嬮潰鐨凴epositories錛屽皢榪欎笁涓粨搴揂pache Snapshots錛孋odehaus Snapshots錛孧aven Central鐨?
Download Remote Indexes淇敼涓簍rue銆傜劧鍚庡湪榪欎笁涓粨搴撲笂鍒嗗埆鍙抽敭錛岄夋嫨Re-index錛岃繖鏍種exus灝變細鍘諱笅杞借繙紼嬬殑绱㈠紩鏂囦歡銆?/p>

2.綆$悊浠撳簱
浠ョ鐞嗗憳鐢ㄦ埛鐧婚檰鐒跺悗鐐瑰嚮宸﹁竟瀵艱埅鑿滃崟Administration涓嬮潰鐨凴epositories銆侼exus鎻愪緵浜嗕笁縐嶄笉鍚岀殑浠撳簱銆?
(1)浠g悊浠撳簱
涓涓唬鐞嗕粨搴撴槸瀵硅繙紼嬩粨搴撶殑涓涓唬鐞嗐傞粯璁ゆ儏鍐典笅錛孨exus鑷甫浜嗗涓嬮厤緗殑浠g悊浠撳簱錛?
Apache Snapshots
榪欎釜浠撳簱鍖呭惈浜嗘潵鑷簬Apache杞歡鍩洪噾浼氱殑蹇収鐗堟湰銆?a >http://people.apache.org/repo/m2-snapshot-repository
Codehaus Snapshots
榪欎釜浠撳簱鍖呭惈浜嗘潵鑷簬Codehaus鐨勫揩鐓х増鏈?http://snapshots.repository.codehaus.org/
Central Maven Repository
榪欐槸涓ぎMaven浠撳簱錛堝彂甯冪増鏈級銆?http://repo1.maven.org/maven2/
(2)瀹夸富浠撳簱
涓涓涓諱粨搴撴槸鐢盢exus鎵樼鐨勪粨搴撱侻aven鑷甫浜嗗涓嬮厤緗殑瀹夸富浠撳簱銆?
3rd Party
榪欎釜瀹夸富浠撳簱搴旇鐢ㄦ潵瀛樺偍鍦ㄥ叕鍏盡aven浠撳簱涓壘涓嶅埌鐨勭涓夋柟渚濊禆銆傝繖縐嶄緷璧栫殑鏍蜂緥鏈夛細浣犵粍緇囦嬌鐢ㄧ殑錛屽晢涓氱殑錛岀鏈夌殑綾誨簱濡侽racle JDBC椹卞姩銆?
Releases
榪欎釜瀹夸富浠撳簱鏄綘緇勭粐鍏竷鍐呴儴鍙戝竷鐗堟湰鐨勫湴鏂廣?
Snapshots
榪欎釜瀹夸富浠撳簱鏄綘緇勭粐鍙戝竷鍐呴儴蹇収鐗堟湰鐨勫湴鏂廣?
(3)铏氭嫙浠撳簱
涓涓櫄鎷熶粨搴撲綔涓篗aven 1鐨勯傞厤鍣ㄥ瓨鍦ㄣ侼exus鑷甫浜嗕竴涓猚entral-m1铏氭嫙浠撳簱

3. 綆$悊緇?
緇勬槸Nexus涓涓己澶х殑鐗規э紝瀹冨厑璁鎬綘鍦ㄤ竴涓崟鐙殑URL涓粍鍚堝涓粨搴撱侼exus鑷甫浜嗕袱涓粍錛歱ublic鍜宲ublic-snapshots銆? public緇勪腑緇勫悎浜嗕笁涓涓諱粨搴擄細3rd Party, Releases, 鍜孲napshots錛岃繕鏈変腑澶甅aven浠撳簱銆傝宲ublic-snapshots緇勪腑緇勫悎浜咥pache Snapshots鍜孋odehaus Snapshots浠撳簱銆?/p>

4. 閰嶇疆maven
瑕佽maven浣跨敤Nexus浣滀負浠撳簱錛岃淇敼~/.m2/settings.xml.
Xml浠g爜
<profiles>
   <profile>
     <id>nexus</id>
     <repositories>
       <repository>
           <id>nexus</id>
           <name>local private nexus</name>
           <url>http://localhost:8081/nexus/content/groups/public</url>
       </repository>
     </repositories>
   </profile>
   <profile>
     <id>nexus-snapshots</id>
     <repositories>
       <repository>
           <id>nexus-snapshots</id>
           <name>local private nexus snapshots</name>
           <url>http://localhost:8081/nexus/content/groups/public-snapshots</url>
       </repository>
     </repositories>
   </profile>
</profiles>

<activeProfiles>
    <activeProfile>nexus</activeProfile>
    <activeProfile>nexus-snapshots</activeProfile>
</activeProfiles>

5.閮ㄧ講鏋勪歡鑷砃exus
瑕侀儴緗叉瀯浠惰嚦Nexus錛屽湪distributionManagement涓彁渚涗粨搴揢RL錛岀劧鍚庤繍琛宮vn deploy銆侻aven浼氶氳繃涓涓畝鍗曠殑HTTP PUT灝嗛」鐩甈OM鍜屾瀯浠舵帹鍏ヨ嚦浣犵殑Nexus瀹夎銆傞渶瑕侀厤緗綘欏圭洰POM涓璬istributionManagement閮ㄥ垎鐨剅epository銆?
Xml浠g爜
<distributionManagement>
<repository>
    <id>releases</id>
    <name>Internal Releases</name>
    <url>http://localhost:8081/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
    <id>Snapshots</id>
    <name>Internal Snapshots</name>
    <url>http://localhost:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

榪欐牱榪樻病瀹岋紝榪欐椂濡傛灉閮ㄧ講浼氭姤閿欙紝榪樿鍦綖/.m2/settings.xml涓坊鍔犲涓嬬殑鏈嶅姟鍣ㄧ櫥褰曚俊鎭細
Xml浠g爜
<servers>
<server>
    <id>releases</id>
    <username>admin</username>
    <password>admin123</password>
</server>
<server>
    <id>Snapshots</id>
    <username>admin</username>
    <password>admin123</password>
</server>
</servers>

閮ㄧ講絎笁鏂規瀯浠訛細
鏋勪歡鍙兘鏄鏈夋暟鎹簱鐨凧DBC椹卞姩濡侽racle錛屾垨鑰呬綘渚濊禆浜庡彟涓涓狫AR錛屽畠鏃笉寮婧愪篃鏃犳硶鍏嶈垂鑾峰緱銆傚湪榪欐牱鐨勬儏鍐典笅錛屼綘灝遍渶瑕佹墜鍔ㄦ嬁鏉ヨ繖浜涙瀯浠剁劧鍚庡彂甯冨埌浣犺嚜宸辯殑浠撳簱涓侼exus鎻愪緵瀹夸富鐨?third-party"浠撳簱錛屽氨鏄負浜嗚繖涓洰鐨勩?br /> 浣跨敤浠ヤ笅鍛戒護鍙戝竷璇ユ枃浠惰嚦Nexus錛?
Java浠g爜
mvn deploy:deploy-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.3.0 -Dpackaging=jar -Dfile=ojdbc.jar -Durl=http://localhost:8081/nexus/content/repositories/thirdparty -DrepositoryId=thirdparty

6.Nexus鐩戝惉绔彛
榛樿鎯呭喌涓嬶紝Nexus鐩戝惉绔彛8081銆備綘鍙互鏇存敼榪欎釜绔彛錛岄氳繃鏇存敼${NEXUS_HOME}/conf/plexus.properties鐨勫鹼紝涓烘錛屽仠姝exus錛屾洿鏀規枃浠朵腑applicationPort鐨勫鹼紝鐒跺悗閲嶅惎Nexus銆?br />
7.Maven Profiles
Maven涓殑profile鏄竴緇勫彲閫夌殑閰嶇疆錛屽彲浠ョ敤鏉ヨ緗垨鑰呰鐩栭厤緗粯璁ゅ箋傛湁浜唒rofile錛屼綘灝卞彲浠ヤ負涓嶅悓鐨勭幆澧冨畾鍒舵瀯寤恒俻rofile鍙? 浠ュ湪pom.xml涓厤緗紝騫剁粰瀹氫竴涓猧d銆傜劧鍚庝綘灝卞彲浠ュ湪榪愯Maven鐨勬椂鍊欎嬌鐢ㄧ殑鍛戒護琛屾爣璁板憡璇塎aven榪愯鐗瑰畾profile涓殑鐩爣銆備互涓? pom.xml浣跨敤production profile瑕嗙洊浜嗛粯璁ょ殑Compiler鎻掍歡璁劇疆銆?
Xml浠g爜
<profiles>
   <profile>
     <id>production</id>
     <build>
       <plugins>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
           <configuration>
             <debug>false</debug>
             <optimize>true</optimize>
           </configuration>
         </plugin>
       </plugins>
     </build>
   </profile>
</profiles>
瑕佷嬌鐢╬roduction profile鏉ヨ繍琛宮vn install錛屼綘闇瑕佸湪鍛戒護琛屼紶鍏?Pproduction鍙傛暟銆傝楠岃瘉production profile瑕嗙洊浜嗛粯璁ょ殑Compiler鎻掍歡閰嶇疆錛屽彲浠ュ儚榪欐牱浠ュ紑鍚皟璇曡緭鍑?-X) 鐨勬柟寮忚繍琛孧aven銆?/p>

濡傛灉浣犲紑濮嬪ぇ閲忎嬌鐢∕aven profile錛屼綘浼氬笇鏈涘皢profile浠嶱OM涓垎紱伙紝浣跨敤涓涓崟鐙殑鏂囦歡濡俻rofiles.xml銆備綘鍙互娣峰悎浣跨敤瀹氫箟鍦╬om.xml涓拰澶栭儴 profiles.xml鏂囦歡涓殑profile銆傚彧闇瑕佸皢profiles鍏冪礌鏀懼埌${basedir}鐩綍涓嬬殑profiles.xml鏂囦歡涓紝鐒跺悗 鐓у父榪愯Maven灝卞彲浠ャ俻rofiles.xml鏂囦歡鐨勫ぇ姒傚唴瀹瑰涓嬶細
Xml浠g爜
<profiles>
    <profile>
      <id>development</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <debug>true</debug>
              <optimize>false</optimize>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>production</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <debug>false</debug>
              <optimize>true</optimize>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
</profiles>

settings profile鍙互搴旂敤鍒版墍鏈変綘浣跨敤Maven鏋勫緩鐨勯」鐩備綘鍙互鍦ㄤ袱涓湴鏂瑰畾涔塻ettings profile錛氬畾涔夊湪~/.m2/settings.xml涓殑鐢ㄦ埛鐗瑰畾settings profile錛屾垨鑰呭畾涔夊湪${M2_HOME}/conf/settings.xml涓殑鍏ㄥ眬settings profile銆?/p>

andy.kong 2010-04-07 13:57 鍙戣〃璇勮
]]>
maven setting.xmlhttp://www.aygfsteel.com/kongji2008/archive/2009/07/13/286595.htmlandy.kongandy.kongMon, 13 Jul 2009 09:00:00 GMThttp://www.aygfsteel.com/kongji2008/archive/2009/07/13/286595.htmlhttp://www.aygfsteel.com/kongji2008/comments/286595.htmlhttp://www.aygfsteel.com/kongji2008/archive/2009/07/13/286595.html#Feedback0http://www.aygfsteel.com/kongji2008/comments/commentRss/286595.htmlhttp://www.aygfsteel.com/kongji2008/services/trackbacks/286595.html<settings xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation
="http://maven.apache.org/POM/4.0.0 
                      http://maven.apache.org/xsd/settings-1.0.0.xsd"
>
  
<localRepository</localRepository>
  
<offline>false</offline>
 
</settings>
localRepository

璇ュ艱〃紺烘瀯寤虹郴緇熸湰鍦頒粨搴撶殑璺緞銆?/p>

offline

濡傛灉鏋勫緩緋葷粺闇瑕佸湪紱葷嚎妯″紡涓嬭繍琛岋紝鍒欎負true錛岄粯璁や負false銆傚綋鐢變簬緗戠粶璁劇疆鍘熷洜鎴栬呭畨鍏ㄥ洜绱狅紝鏋勫緩鏈嶅姟鍣ㄤ笉鑳借繛鎺ヨ繙紼嬩粨搴撶殑鏃跺欙紝璇ラ厤緗氨鍗佸垎鏈夌敤銆?/p>



andy.kong 2009-07-13 17:00 鍙戣〃璇勮
]]>
maven profilehttp://www.aygfsteel.com/kongji2008/archive/2009/07/13/286276.htmlandy.kongandy.kongMon, 13 Jul 2009 05:15:00 GMThttp://www.aygfsteel.com/kongji2008/archive/2009/07/13/286276.htmlhttp://www.aygfsteel.com/kongji2008/comments/286276.htmlhttp://www.aygfsteel.com/kongji2008/archive/2009/07/13/286276.html#Feedback2http://www.aygfsteel.com/kongji2008/comments/commentRss/286276.htmlhttp://www.aygfsteel.com/kongji2008/services/trackbacks/286276.html1銆佹墽琛岋細mvn -P[profile_id]
2銆佹縺媧籥ctivation

<project>
  
  
<profiles>
    
<profile>
      
<id>dev</id>
      
<activation>
        
<activeByDefault>false</activeByDefault>
        
<jdk>1.5</jdk>
        
<os>
          
<name>Windows XP</name>
          
<family>Windows</family>
          
<arch>x86</arch>
          
<version>5.1.2600</version>
        
</os>
        
<property>
          
<name>mavenVersion</name>
          
<value>2.0.5</value>
        
</property>
        
<file>
          
<exists>file2.properties</exists>
          
<missing>file1.properties</missing>
        
</file>
      
</activation>
      
    
</profile>
  
</profiles>
</project>

3.褰撲嬌鐢ㄥ睘鎬ф縺媧葷殑鏃跺?br />
<profiles>
        
<profile>
            
<id>test</id>
            
<activation>
                
<property>
                    
<name>test.bingo</name>
                    
<value>kkk</value>
                
</property>
            
</activation>
</profile>
</profiles>

鍙互鍦ㄥ懡浠よ涓璵vn -Dtest.bingo=kkk鎴栬卪vn -Ptest榪欎袱縐嶆柟寮忔縺媧昏profile瀵筽om璁劇疆鐨勮繘琛岃鐩栥?br />
4.褰撲嬌鐢ㄥ彉閲忔浛鎹㈢殑鏃跺?br />
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation
="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    
    
<build>
        
<resources>
            
<resource>
              
<directory>src/main/filter-resources</directory>
              
<filtering>true</filtering>
            
</resource>
        
</resources>

    
</build>
    
<profiles>
        
<profile>
            
<id>test</id>
            
<activation>
                
<property>
                    
<name>test.bingo</name>
                    
<value>kkk</value>
                
</property>
            
</activation>
            
<properties>
                
<env.dir>222</env.dir>
            
</properties>
            
<build>
                        
</profile>
    
</profiles>
</project>

榪囨護鎸囧畾鐨勭洰褰曚笅鏂囦歡錛屽鏋滆鏂囦歡涓湁${env.dir}鐨勫彉閲忥紝灝變細琚?22緇欒鐩栨帀銆?

andy.kong 2009-07-13 13:15 鍙戣〃璇勮
]]>
瑕嗙洊榛樿鐨勬簮鐮佸拰杈撳嚭鐩綍http://www.aygfsteel.com/kongji2008/archive/2009/07/10/286271.htmlandy.kongandy.kongFri, 10 Jul 2009 07:50:00 GMThttp://www.aygfsteel.com/kongji2008/archive/2009/07/10/286271.htmlhttp://www.aygfsteel.com/kongji2008/comments/286271.htmlhttp://www.aygfsteel.com/kongji2008/archive/2009/07/10/286271.html#Feedback0http://www.aygfsteel.com/kongji2008/comments/commentRss/286271.htmlhttp://www.aygfsteel.com/kongji2008/services/trackbacks/286271.html<build>
<sourceDirectory>
${basedir}/src/main/java
</sourceDirectory>
<outputDirectory>
${basedir}/WebRoot/WEB-INF/classes
</outputDirectory>
</build>
鍦╩yeclipse web欏圭洰涓細緇忓父鐢ㄥ埌

andy.kong 2009-07-10 15:50 鍙戣〃璇勮
]]>
maven鐨勮秴綰OMhttp://www.aygfsteel.com/kongji2008/archive/2009/07/10/286266.htmlandy.kongandy.kongFri, 10 Jul 2009 07:39:00 GMThttp://www.aygfsteel.com/kongji2008/archive/2009/07/10/286266.htmlhttp://www.aygfsteel.com/kongji2008/comments/286266.htmlhttp://www.aygfsteel.com/kongji2008/archive/2009/07/10/286266.html#Feedback0http://www.aygfsteel.com/kongji2008/comments/commentRss/286266.htmlhttp://www.aygfsteel.com/kongji2008/services/trackbacks/286266.html闃呰鍏ㄦ枃

andy.kong 2009-07-10 15:39 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 连山| 通道| 定南县| 荔浦县| 德兴市| 焉耆| 盱眙县| 富蕴县| 泉州市| 梅州市| 通海县| 泸州市| 黎平县| 乡城县| 谷城县| 邵武市| 明光市| 公主岭市| 霍山县| 隆林| 德格县| 涡阳县| 东城区| 常德市| 阜平县| 合阳县| 阜阳市| 札达县| 商水县| 永年县| 万载县| 富宁县| 科技| 黑山县| 双流县| 元谋县| 延安市| 达孜县| 宜川县| 特克斯县| 铁岭市|