Is there a maven plugin for storing the dependency information in the jar?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Is there a maven plugin for storing the dependency information in the jar?

Owen O'Malley
Hi all,
   Is there already a plugin for storing the transitive dependency
information in the jar's META-INF as part of the build? I'd like to build a
dynamic class loader that would be similar to shared libraries on
Linux/Unix, but part of that is that I need the dependency information
stored in the jar.

Thanks,
   Owen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is there a maven plugin for storing the dependency information in the jar?

Jörg Schaible
Owen O'Malley wrote:

> On Tue, Jun 20, 2017 at 11:36 AM, Jochen Wiedmann
> <[hidden email]
>> wrote:
>
>> On Tue, Jun 20, 2017 at 7:01 PM, Owen O'Malley <[hidden email]>
>> wrote:
>>
>> >    Is there already a plugin for storing the transitive dependency
>> > information in the jar's META-INF as part of the build? I'd like to
>> build a
>> > dynamic class loader that would be similar to shared libraries on
>> > Linux/Unix, but part of that is that I need the dependency information
>> > stored in the jar.
>>
>> I'd hope, that dependency:list could help you here. A little bit of
>> parsing might be required to read the output, but it worked for me in
>> the past.
>>
>
> I'd seen dependency:list (and dependency:tree), but I need the information
> to automatically end up in the jar. Since the goal is to read it at
> process launch, having a binary format would be best to minimize the
> latency.

dependency:list has an outputFile configuration entry and if the goal is
called in the generate ressources phase and the file is written to
target/generated-ressources it will be picked up for the jar file.

Cheers,
Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...