maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Adams <matt...@matthewadams.me>
Subject Re: Unpacking jars into target/classes
Date Thu, 07 Mar 2013 04:51:19 GMT
Quick jist:
1. Use maven-install-plugin's
install-file<http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html>goal
to make maven artifacts out of the jars you intend to unpack, and do
it in any phase prior to process-classes (or do this first in the
process-classes phase).
2. Use maven-dependency-plugin's unpack
goal<http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html>to
extract those artifacts to ${project.build.outputDirectory} in the
process-classes phase after the above phase.

I think that'll do it for you.


On Sat, Mar 2, 2013 at 2:32 PM, Joachim Durchholz <jo@durchholz.org> wrote:

> Hi all,
>
> I have two jars from an external source and need to merge their contents
> into the target/classes tree until the process-classes phase.
> I'm not sure what plugin(s) can be used to achieve this effect.
>
> Directory structure:
> - external (directory tree that holds the externally-provided files)
>   - libs
>     - cubes.jar (class files)
>     - cubes-resources.jar (nonclass files)
>   - license etc. (other data, irrelevant to task at hand)
>   (yeah I know the structure sucks, can't do anything about it)
> - target (maven scratchpad)
>   - classes (files for main artifact jar are collected here I think)
>
> I need the files inside libs/cubes.jar and libs/cubes-resource.jar
> unpacked and placed inside target/classes, preserving the in-jar directory
> structure.
>
> I want this to run in the process-classes, latest, because that's the last
> pertinent phase that m2e will run.
>
> What's the best (least-hassle) plugin that will do this?
>
> Regards,
> Jo
>
> P.S.: Please resist the temptation to tell me that I want the wrong thing.
> I need help with solving a problem, I don't need a lecture.
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org<users-unsubscribe@maven.apache.org>
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
mailto:matthew@matthewadams.me <matthew@matthewadams.me>
skype:matthewadams12
googletalk:matthew@matthewadams.me
http://matthewadams.me
http://www.linkedin.com/in/matthewadams

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message