2014-12-03 13 views
1

我在生成JBoss Windup報告方面經歷了一些演示。在每個演示中他們都使用了EAR文件。是否有可能爲.java文件生成Windup報告?我已經嘗試過,並且出現以下錯誤。爲.java文件生成Windup報告(JBoss Migration)

INFO [ClassPathXmlApplicationContext] Refreshing org[email protected]80fc33b: startup date [Wed Dec 03 08:46:08 CET 2014]; root of context hierarchy 
INFO [CustomerPackageResolver] Found Package: com.acme 
INFO [ClassPathXmlApplicationContext] Refreshing org[email protected]81bc954: startup date [Wed Dec 03 08:46:12 CET 2014]; root of context hierarchy 
INFO [CustomerPackageResolver] Found Package: com.acme 
INFO [WindupReportEngine] Creating output path: /tmp/src/main/dk/tdc/ossj/inventory/client/StandaloneClient-java-doc 
INFO [WindupReportEngine] - To overwrite this in the future, use the -output parameter. 
INFO [ZipInterrogationEngine] Processing: StandaloneClient.java 
ERROR [ZipInterrogationEngine] Error unzipping file. 
java.util.zip.ZipException: Could not find End Of Central Directory 
     at java.util.zip.ZipFile.open(Native Method) 
     at java.util.zip.ZipFile.<init>(ZipFile.java:118) 
     at java.util.zip.ZipFile.<init>(ZipFile.java:154) 
     at org.jboss.windup.interrogator.ZipInterrogationEngine.process(ZipInterrogationEngine.java:81) 
     at org.jboss.windup.WindupMetaEngine.processArchive(WindupMetaEngine.java:297) 
     at org.jboss.windup.WindupMetaEngine.getArchiveMeta(WindupMetaEngine.java:160) 
     at org.jboss.windup.WindupReportEngine.generateReport(WindupReportEngine.java:121) 
     at org.jboss.windup.WindupMain.processInput(WindupMain.java:144) 
     at org.jboss.windup.WindupMain.main(WindupMain.java:71) 
Exception in thread "Main Thread" java.lang.NullPointerException 
     at org.jboss.windup.reporting.ReportEngine.process(ReportEngine.java:33) 
     at org.jboss.windup.WindupReportEngine.generateReport(WindupReportEngine.java:128) 
     at org.jboss.windup.WindupMain.processInput(WindupMain.java:144) 
     at org.jboss.windup.WindupMain.main(WindupMain.java:71) 

回答

1

不,我不這麼認爲。我認爲做的最好的事情就是運行飽和你的耳朵/戰爭的文件,然後提供包凡你的類找到這樣的:

windup --sourceMode \ 
    --input <path to your web project file .ear or .war> \ 
    --output <path to place of your preference> \ 
    --source eap4 eap5 --target eap6 \ 
    --packages com.yourpackage.something com.another.package \ 

終結輸出會給你一個報告,便於瀏覽和查找信息你需要關於你的課程。假設你的類是商業應用服務器的專有API部分,那麼報告會告訴你這個部分需要重構,並且需要付出多少努力才能做到這一點。

你可以在這裏找到一些準則:

https://access.redhat.com/documentation/en/red-hat-jboss-migration-toolkit/version-2.4/windup-user-guide/

http://windup.github.io/windup/docs/latest/html/WindupRulesDevelopmentGuide.html

希望這是有用的。 :)

1

首先,您正在使用Windup 0.6.x.問題是從2014年開始的。現在是2016年,Windup已經有了很大的進步。

Windup 2.x+可以分析源文件項目。 這是因爲它對EAR的作用是它首先對其進行反編譯,然後掃描.java文件。因此,嘗試:

windupDir/bin/windup --sourceMode --input path/to/your/app --target eap 

說實話,我還沒有嘗試過指向單一.java文件:如果這是你需要一個理由的東西,創造http://issues.jboss.org/browse/WINDUP問題。