You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Tim Wood <ti...@irisfinancialsolutions.com> on 2005/11/23 19:32:19 UTC

Question on Maven "assembly" plugin

I have gotten some great help from a Maven developer and now have a question for the list.  Our project is composed of 
several source directories, to separate application code from infrastructure code.  We have a hierarchy of pom.xmls.  We 
figured out how to make mvn assembly:assembly generate the jar file (had to correct a property name vs. the 
documentation, and place the <plugin> element within a <build> in the top pom.xml).  I can also make Maven find my 
custom XML descriptor file for the assembly plugin.  But I'm still not picking up any class files.  The problem seems to 
be related to
our hierarchical organization, something like:
iris
  |------> iris_env
  |------> iris_platform
  |------> iris_app
		|------> iris-app-demo1 ...
Under each of iris_env, iris_platform and iris_app is a pom.xml and possible source files to compile and store under
target/classes possibly further down (e.g., in iris-app-demo1).

How do I get the assy. rule to look for the class files, and also to unjar the dependency jar files to build the
uber-jar?  Do I need to enumerate each directory in a <fileSet> and each jar I need in a <dependencySet>?

Thx,
TW



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Question on Maven "assembly" plugin

Posted by Tim Wood <ti...@irisfinancialsolutions.com>.
Brett Porter wrote:
> specify a <dependencySet> with <unpack> set to true - the default is
> to include all dependencies and unpack them as classes at the root of
> the new assembly. I think the jar-with-depedencies default descriptor
> may already do as you need?

This is what I hoped would happen, but haven't been able to make it so.  I don't find a DTD for the <assembly> 
descriptor XML and the plugin doc pages don't comment the descriptor elements.  So far I find Maven pretty murky in 
terms of what elements it uses when.  The workflow doc page is useful, but I'd almost like to see an ant-like XML file 
that shows what Maven does automatically.
Thanks,
TW

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Question on Maven "assembly" plugin

Posted by Brett Porter <br...@gmail.com>.
specify a <dependencySet> with <unpack> set to true - the default is
to include all dependencies and unpack them as classes at the root of
the new assembly. I think the jar-with-depedencies default descriptor
may already do as you need?

- Brett

On 11/24/05, Tim Wood <ti...@irisfinancialsolutions.com> wrote:
>
> I have gotten some great help from a Maven developer and now have a question for the list.  Our project is composed of
> several source directories, to separate application code from infrastructure code.  We have a hierarchy of pom.xmls.  We
> figured out how to make mvn assembly:assembly generate the jar file (had to correct a property name vs. the
> documentation, and place the <plugin> element within a <build> in the top pom.xml).  I can also make Maven find my
> custom XML descriptor file for the assembly plugin.  But I'm still not picking up any class files.  The problem seems to
> be related to
> our hierarchical organization, something like:
> iris
>   |------> iris_env
>   |------> iris_platform
>   |------> iris_app
>                 |------> iris-app-demo1 ...
> Under each of iris_env, iris_platform and iris_app is a pom.xml and possible source files to compile and store under
> target/classes possibly further down (e.g., in iris-app-demo1).
>
> How do I get the assy. rule to look for the class files, and also to unjar the dependency jar files to build the
> uber-jar?  Do I need to enumerate each directory in a <fileSet> and each jar I need in a <dependencySet>?
>
> Thx,
> TW
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org