andyj2ee

          java tec sky

          統(tǒng)計

          留言簿(4)

          activemq

          aop

          design pattern

          other blog

          spring

          workflow

          多線程

          軟件架構(gòu)師

          閱讀排行榜

          評論排行榜

          2014年6月18日 #

          系統(tǒng)cvs to Git 遷移

          遷移簡介

          應(yīng)用工具:cvs2git

          工作原理:文件系統(tǒng)的copy, from cvs repository to export temp file, then import to Git repository.

          使用條件: Git version 1.5.4.4 or later (我們的目標(biāo) git 庫版本:

          git --version

          git version 1.9.0

          git --version
          git version 1.9.0

          cvs2git工具安裝

          遷移過程

          具體的遷移過程:

          以下為遷移wxxr-core-framework

          1. 在123.1上用cvs2git把cvs倉庫,導(dǎo)出成git的備份文件(blob file and dump file)

          • cvs2git --blobfile=/tmp/cvs2git/output/git-blob-cfw.dat --dumpfile=/tmp/cvs2git/output/git-dump-cfw.dat --username=zhangjunqing --fallback-encoding=GBK /app/cvsroot/wxxr-projects/wxxr-core-framework
          • 創(chuàng)建本地git倉庫 
            • git init --bare wxxr-core-framework.git
          • 下載導(dǎo)出的git的備份文件到本地臨時目錄 **
            • cd /Users/zhangjq/temp/cvs2git
            • scp -r djboss@192.168.123.1:/tmp/cvs2git/output/git-* . 
          • 用git的fast-import命令把從cvs導(dǎo)出的git備份文件導(dǎo)入剛創(chuàng)建的git倉庫** cd /Users/zhangjq/git/wxxr-core-framework/wxxr-core-framework.git** cat /Users/zhangjq/temp/cvs2git/git-blob-cfw.dat /Users/zhangjq/temp/cvs2git/git-dump-cfw.dat | git fast-import
          • 在Stash 上創(chuàng)建遠(yuǎn)程倉庫** 創(chuàng)建了framework-core 倉庫集,并在此倉庫集下創(chuàng)建了wxxr-core-framework, wxxr-core-web  等遠(yuǎn)程倉庫**http://developer.corp.wxxr.com.cn/git/projects/FRMCORE/repos/wxxr-core-framework/browse
            •  
          • 在本地執(zhí)行** git branch -D TAG.FIXUP (執(zhí)行g(shù)it branch -a 沒有找到這個分支,為什么刪除?error: branch 'TAG.FIXUP' not found. )
            • git gc --prune=now
            • git push --all origin  (將本地的所有分支都推送到遠(yuǎn)程主機(jī))
            • git push -tags origin (最后,git push不會推送標(biāo)簽(tag),除非使用-tags選項。)
          • 至此,完成了wxxr-core-framework的遷移。下一步執(zhí)行比較驗證。

          Git 時不時地將這些對象打包至一個叫 packfile 的二進(jìn)制文件以節(jié)省空間并提高效率。當(dāng)倉庫中有太多的松散對象,或是手工調(diào)用git gc 命令,或推送至遠(yuǎn)程服務(wù)器時,Git 都會這樣做。

          附:遷移腳本

          遷移驗證

          用本地cvs代碼庫代碼與git下載的庫代碼比較,有$Revision$ 的少版本信息外,其它一切正常。

          遷移報告

          wxxr-core-framework

          cvs2svn Statistics:
          ------------------
          Total CVS Files:              3000
          Total CVS Revisions:          9439
          Total CVS Branches:          33449
          Total CVS Tags:            3278944
          Total Unique Tags:            2446
          Total Unique Branches:          24
          CVS Repos Size in KB:       159751
          Total SVN Commits:            5260
          First Revision Date:    Wed May 31 15:56:03 2006
          Last Revision Date:     Sun Jan  4 17:22:23 2015
          ------------------
          Timings (seconds):
          ------------------
          1065   pass1    CollectRevsPass
          0   pass2    CleanMetadataPass
          0   pass3    CollateSymbolsPass
          648   pass4    FilterSymbolsPass
          1   pass5    SortRevisionsPass
          37   pass6    SortSymbolsPass
          436   pass7    InitializeChangesetsPass
          82   pass8    BreakRevisionChangesetCyclesPass
          82   pass9    RevisionTopologicalSortPass
          296   pass10   BreakSymbolChangesetCyclesPass
          406   pass11   BreakAllChangesetCyclesPass
          413   pass12   TopologicalSortPass
          319   pass13   CreateRevsPass
          159   pass14   SortSymbolOpeningsClosingsPass
          15   pass15   IndexSymbolsPass
          432   pass16   OutputPass
          4391   total
          

          fast-import wxxr-core-framework source code:

          git-fast-import statistics:
          ---------------------------------------------------------------------
          Alloc'd objects:      45000
          Total objects:        41365 (      2260 duplicates                  )
          blobs  :         7817 (       709 duplicates       6887 deltas of       7248 attempts)
          trees  :        30677 (      1551 duplicates      12608 deltas of      29589 attempts)
          commits:         2871 (         0 duplicates          0 deltas of          0 attempts)
          tags   :            0 (         0 duplicates          0 deltas of          0 attempts)
          Total branches:        2472 (        24 loads     )
          marks:     1073741824 (     11397 unique    )
          atoms:           2772
          Memory total:          4532 KiB
          pools:          2423 KiB
          objects:          2109 KiB
          ---------------------------------------------------------------------
          pack_report: getpagesize()            =       4096
          pack_report: core.packedGitWindowSize = 1073741824
          pack_report: core.packedGitLimit      = 8589934592
          pack_report: pack_used_ctr            =      23737
          pack_report: pack_mmap_calls          =        824
          pack_report: pack_open_windows        =          1 /          1
          pack_report: pack_mapped              =    7439224 /    7439224
          ---------------------------------------------------------------------

          :)

          @import url(http://www.aygfsteel.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

          posted @ 2015-01-13 18:53 java光環(huán) 閱讀(735) | 評論 (0)編輯 收藏

          異常:java.lang.ArrayIndexOutOfBoundsException: 48188



          [ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.2:helpmojo (generate-help-mojo) on project wxxr-build-maven-plugin: Execution generate-help-mojo of goal org.apache.maven.plugins:maven-plugin-plugin:3.2:helpmojo failed: 48188 -> [Help 1]
          org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.2:helpmojo (generate-help-mojo) on project wxxr-build-maven-plugin: Execution generate-help-mojo of goal org.apache.maven.plugins:maven-plugin-plugin:3.2:helpmojo failed: 48188
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
              at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
              at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
              at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
              at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
              at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
              at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
          Caused by: org.apache.maven.plugin.PluginExecutionException: Execution generate-help-mojo of goal org.apache.maven.plugins:maven-plugin-plugin:3.2:helpmojo failed: 48188
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:144)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
              ... 19 more
          Caused by: java.lang.ArrayIndexOutOfBoundsException: 48188
              at org.objectweb.asm.ClassReader.readClass(Unknown Source)
              at org.objectweb.asm.ClassReader.accept(Unknown Source)
              at org.objectweb.asm.ClassReader.accept(Unknown Source)
              at org.apache.maven.tools.plugin.annotations.scanner.DefaultMojoAnnotationsScanner.scanFile(DefaultMojoAnnotationsScanner.java:139)
              at org.apache.maven.tools.plugin.annotations.scanner.DefaultMojoAnnotationsScanner.scan(DefaultMojoAnnotationsScanner.java:85)
              at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.scanAnnotations(JavaAnnotationsMojoDescriptorExtractor.java:125)
              at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.execute(JavaAnnotationsMojoDescriptorExtractor.java:104)
              at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:108)
              at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:233)
              at org.apache.maven.plugin.plugin.HelpGeneratorMojo.execute(HelpGeneratorMojo.java:88)
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
              ... 20 more
          [ERROR]
          [ERROR]
          [ERROR] For more information about the errors and possible solutions, please read the following articles:
          [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

          臨時解決辦法:將commons-jelly 版本由1.0改為1.0-RC1
                  <dependency>
                      <groupId>commons-jelly</groupId>
                      <artifactId>commons-jelly</artifactId>
                      <version>1.0-RC1</version>
                  </dependency>

          posted @ 2014-12-17 15:27 java光環(huán) 閱讀(3698) | 評論 (0)編輯 收藏

          如何成為一名軟件架構(gòu)師?

          Daniel Mohl是一名專業(yè)的軟件工程師/架構(gòu)師,他的興趣包括理解各種復(fù)雜的編程語言、企業(yè)應(yīng)用架構(gòu)以及如何搭建業(yè)務(wù)與技術(shù),他通曉F#、C#、 CoffeeScript、JavaScript、Erlang、ASP.NET、MVC、WPF、WCF、Sliverlight、SQL Server等技術(shù)。有著多年的軟件開發(fā)經(jīng)驗。

          他經(jīng)常會被一些有潛力和有前途的程序員問到:“我要怎么做才能成為一名架構(gòu)師?”說實話,這已經(jīng)是老生常談的話題了,答案當(dāng)然是視情況而定。不過他也根據(jù)自己的經(jīng)驗,給大家一些建議,并且提供一些資料,助你快速走上架構(gòu)師這條道路。

          下面是Daniel Mohl所提出的列表,供大家參考:

          首先,你必須不斷地尋求改善和提升自己。而提升自己的最好方法是閱讀,下面有幾本書,對我的軟件架構(gòu)技能的提升很大。推薦給大家:

          除了閱讀,還有沒有其他需要注意的、或者在平時需要關(guān)注的東西呢?

          • 每隔一兩年學(xué)習(xí)一門新語言,F(xiàn)#是個不錯的選擇。
          • 選擇一個重點領(lǐng)域,但是盡可能對許多技術(shù)有個高層次的理解
          • 對你所關(guān)注的重點領(lǐng)域,開通一個博客并且繼續(xù)拓展該領(lǐng)域的知識面,讓自己漸漸成為一名專家。
          • 與不同的技術(shù)、編程語言、設(shè)計模式和結(jié)構(gòu)等(甚至是它并沒有在日常中給予你直接的幫助)打交道。你永遠(yuǎn)都不知道這些知識是否會在未來派上用場,但是對你絕對是有益無害。
          • 根據(jù)你的目標(biāo)受眾來談?wù)?#8220;語言”。作為一名架構(gòu)師,你將會與各種各樣等級的人打交道,并且他們對技術(shù)的理解也會有所不同。所以要學(xué)會調(diào)整你的講解方式,做到因人制宜,讓他們能夠理解。
          • 閱讀博客、觀看/參加Twitter或G+、聽播客、讀雜志、參加用戶小組會議和技術(shù)會議,并且在這些會議上踴躍發(fā)言。這些都會給你帶來無窮無盡的知識和樂趣,建立自己的“品牌”和提供交流機(jī)會。
          • 紀(jì)律是關(guān)鍵。永遠(yuǎn)做你自己最喜歡的工作,即使它聽起來不那么有趣。每天安排時間學(xué)習(xí)一些新的東西,即使是15分鐘也可,千萬不要被其他事情占用了這段時間。
          • 開啟博客之旅。我發(fā)現(xiàn),與閱讀比起來,把東西寫下來會讓你有更深入的理解。
          • 利用好“閑暇時間”,這段時間可以拿本雜志讀讀,或者去聽聽播客等。
          • 了解各種可用的開發(fā)工具,可以使架構(gòu)師的工作更好、更有效
          • 看許多不同項目里的架構(gòu)
          • 學(xué)習(xí)各個項目的管理方法
          • 學(xué)習(xí)一些評估技術(shù),對業(yè)務(wù)可以提供有價值的評估

          上面是作者總結(jié)出來的列表,雖然看起來有點枯燥無味,但在整個軟件開發(fā)過程中是樂趣無窮的。如果你還有更好的建議,歡迎與我們分享。

          來自:How to Become a Software Architect

          posted @ 2014-06-18 22:49 java光環(huán)| 編輯 收藏

          主站蜘蛛池模板: 镇原县| 诸城市| 辽阳市| 息烽县| 镇宁| 东乌珠穆沁旗| 盘山县| 邹平县| 洪江市| 通化市| 开原市| 高陵县| 垫江县| 滨州市| 高平市| 林芝县| 威信县| 额济纳旗| 柞水县| 呼玛县| 遂宁市| 洪泽县| 晴隆县| 武山县| 敖汉旗| 宁波市| 新泰市| 拉萨市| 东辽县| 乌拉特前旗| 加查县| 江孜县| 沐川县| 布拖县| 阳山县| 五河县| 兴和县| 泸州市| 巴彦县| 广平县| 四会市|