2010-03-26 29 views
3

我正在使用maven appassembler來創建我的程序集。我的類路徑太長,我得到「輸入行太長。」建議here是使用booter windows平臺,但我不得不使用Java Service Wrapper。任何方式我可以使用java6通配類路徑和java服務包裝?appassembler和long classpath

+0

那常見問題涉及到其他啓動腳本,而不是JSW。你可以發佈你在上下文中看到的特定錯誤,以及生成的'wrapper.conf'中出現了多少條類路徑條目? – 2010-03-29 19:06:22

+0

,爲什麼不使用booter平臺? – Yaneeve 2010-04-01 12:04:16

+0

@Yaneeve'我受限於使用Java服務包裝' – 2010-04-09 20:47:14

回答

2

看來,答案是'不',沒有編寫插件或擴展現有插件,這不是對原始問題的「答案」。

0

作爲一個長鏡頭...

雖從未與JSW合作,也許你可以在http://maven.apache.org/plugins/maven-assembly-plugin/source-repository.html創建基於代碼自己組裝的插件,並用它來代替。

+0

事情是,我希望能夠使用已經爲我寫的東西。並不是說我很懶,但是當簡單(但是手動和非自動)的黑客攻擊生成腳本的步驟需要幾秒鐘時,在公司環境中編寫插件並不容易。 – 2010-04-09 20:53:03

1

您還可以嘗試展開存儲庫(即lib)目錄的目錄結構。默認情況下,appassembler保留深層的目錄結構,這會增加不必要的長度到類路徑中。

<build> 
    <plugins> 
    <plugin> 
     <groupId>org.codehaus.mojo</groupId> 
     <artifactId>appassembler-maven-plugin</artifactId> 
     <version>1.3.1</version> 
     <configuration> 
     <programs> 
      <program> 
      <mainClass>com.mycompany.app.MyApp</mainClass> 
      <name>runMyApp</name> 
      </program> 
     </programs> 
     <repositoryLayout>flat</repositoryLayout> 
     </configuration> 
    </plugin> 
    </plugins> 
</build> 
1

你試過:

<useWildcardClassPath>true</useWildcardClassPath> 

這解決了這個問題對我來說,但是,如果你的arent不已,你還需要確保你使用的是:

<repositoryLayout>flat</repositoryLayout>