You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Mingliang Qi <qm...@gmail.com> on 2014/06/02 23:17:36 UTC
question about shared assembly descriptor
Hello *,
I have a problem when using the sharing assembly descriptors. Let’s say i have a directory structure loos like:
module-A
+-- src
| `-- main
| `-- resources
| `-- assemblies
| `-- myassembly.xml
`— pom.xml
module-B
`—pom.xml
module-B’s pom.xml wants to use the descriptor in module-A, which could be done by adding module-A as a dependency on the assembly plugin then use the descriptorRefs. But the problem is I already has module B as a dependency in module-A. so this will lead to a cyclic reference.
If i do without the dependency and just use the descriptor directly will also lead to wrong base directory for the descriptor.(the base directory for myassembly.xml will be module-B)
How can i use the shared assembly descriptor in this case properly?
Best,
Mingliang
Re: question about shared assembly descriptor
Posted by John Casey <jd...@commonjava.org>.
Typically, I create a separate module to do nothing but house the
assembly descriptors I'm sharing in my project. Modules are cheap, after
all. Then, you can include the assembly module as a plugin-level
dependency in both modules that use it.
FWIW, it's also best to ask this sort of usage question on
users@maven.apache.org. This list is for development of Maven itself
(and associated projects).
-john
On 06/02/2014 04:17 PM, Mingliang Qi wrote:
> Hello *,
> I have a problem when using the sharing assembly descriptors. Let’s say i have a directory structure loos like:
>
> module-A
> +-- src
> | `-- main
> | `-- resources
> | `-- assemblies
> | `-- myassembly.xml
> `— pom.xml
> module-B
> `—pom.xml
>
>
> module-B’s pom.xml wants to use the descriptor in module-A, which could be done by adding module-A as a dependency on the assembly plugin then use the descriptorRefs. But the problem is I already has module B as a dependency in module-A. so this will lead to a cyclic reference.
>
> If i do without the dependency and just use the descriptor directly will also lead to wrong base directory for the descriptor.(the base directory for myassembly.xml will be module-B)
>
> How can i use the shared assembly descriptor in this case properly?
>
> Best,
> Mingliang
>
>
--
John Casey
---
GitHub: https://github.com/jdcasey/
Twitter: http://twitter.com/buildchimp
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org