Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven-assembly-plugin and ar archives

Tags:

maven-2

In my maven project I want to assemble an ipkg file (This is like a Debian Package but for embedded systems). For this I need to create AR archives with the assembly plugin. In the plugin documentation I found this: "and any other format that the ArchiveManager has been configured for". But I can't find out how to "configure" the "ArchiveManager". How can I do this? Or better: Maybe someone already did this and I can use an already existing plugin?

like image 656
kayahr Avatar asked Jan 22 '23 05:01

kayahr


2 Answers

If you're new to maven then it's almost "mission impossible". In theory this should work as follows:

  • Implement your own Archiver.
  • Provide META-INF/plexus/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>
  • Add your artifact as a build extension.

See plexus-archiver for example.

like image 58
lexicore Avatar answered Jan 28 '23 05:01

lexicore


Did you check the maven-pkg-plugin (mentioned here and here)?

like image 33
Pascal Thivent Avatar answered Jan 28 '23 04:01

Pascal Thivent