2010-04-18 68 views
4

在我的maven項目中,我想組裝一個ipkg文件(這就像Debian軟件包,但是對於嵌入式系統)。爲此,我需要使用程序集插件創建AR存檔。在plugin documentation中我找到了這個:「以及ArchiveManager已經配置的任何其他格式」。但我找不到如何「配置」「ArchiveManager」。我怎樣才能做到這一點?或者更好:也許有人已經這樣做了,我可以使用已經存在的插件?maven-assembly-plugin和ar檔案

回答

8

如果你是新手,那麼它幾乎是「不可能的任務」。 理論上這應該工作如下:

  • 實現自己Archiver
  • 提供META-INF /叢/ components.xml文件:

...

<component-set> 
    <components> 
    <component> 
     <role>org.codehaus.plexus.archiver.Archiver</role> 
     <role-hint>myformat</role-hint> 
     <implementation>com.acme.foo.MyArchiverImplementation</implementation> 
     <instantiation-strategy>per-lookup</instantiation-strategy> 
    </component> 
    </components> 
</component-set> 
  • 添加您的神器作爲構建擴展。

例如參見plexus-archiver