I have a project structure like
module-a/src/main/java
module-a/src/main/styles
module-distribution/src/main/assembly
module-distribution depends on module-a, and they both share parent pom and are included as modules in that parent pom.
The idea is to have an assembly layout like
my-final-assembly/lib
my-final-assembly/styles
Where lib directory contains all project artifacts including dependencies (i.e. module-a.jar and its dependency jars), and module-a.jar should not contain its styles directory in it. styles directory should reside in my-final-assembly/styles.
I can fill out the lib directory easily including
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
</dependencySet>
in my assembly file. But what about module-a/src/main/styles? I can
- include it in module-a artifact (it would reside in module-a.jar)
- not include it in module-a.jar.
Sure thing, both 1) and 2) are not valid for me. In first case I have to somehow extract styles directory out of my module-a.jar. In second case styles directory would not be copied at all, as copies the artifact only, not entire target folder.
I have a last resort of creating an individual module for styles directory contents, and make module-a depend on it, but that looks like an overkill for me. Though it would be easy to tune my assembly file to get what I want in that case. But a separate module for a bunch of fonts and xmls that a sole module needs? That would be sad, though I am ready if that is what you call Maven Way.