I think you should start by separating the configurations from your
binaries. Then it will be so much easier creating the custom zip you want.
You would also avoid having the configuration files duplicated (like outisde
the jars as well as inside some of the jars). That will sooner or later get
you or someone else into trouble.

/Anders

On Tue, Nov 9, 2010 at 14:14, jon.mithe <jon.mi...@gmail.com> wrote:

>
> Hi,
>
> I'm trying to switch over to maven for a project I developing in work, new
> to maven and finding packaging it a little tricky.
>
> The app I am writing has a core framework module and then a bunch of other
> modules that provide plugin like functionality.  The idea being I can
> produce different builds with different combinations of modules /
> functionality.  The confusing bit is each module specifies its own configs
> +
> other config like resources and these must be aggregated together in the
> build. So my project:
>
> Parent  Project
> --Core Module
> ---- src/main/java
> ---- src/main/config
> ---- src/main/other_resource_directory
> --Module A
> ---- src/main/java
> ---- src/main/config
> ---- src/main/other_resource_directory
> --Module B
> ---- src/main/java
> ---- src/main/config
> ---- src/main/other_resource_directory
>
> needs to go to the final package / zipped artifact:
>
> ./core.jar
> ./moduleA.jar
> ./moduleB.jar
> ./config/<all configs accross all modules>
> ./other_resource_directory/<all other resources accross all modules>
>
> As I understand, I need to use the maven-assembly-plugin to do most of
> this,
> and to include the custom directories I need.
>
> I think I need to define each module artifact as a zip file with the target
> jar in it and the 2 folders.  Which involves writing an assembly plugin
> instance in the plugin management of the parent POM and my own assembly
> descriptor.  The idea being I can reference the plugin as an artifact in
> each of my sub modules, i.e:
> <plugin><artifactId>module-bundle</artifactId></plugin>.
>
> So I think that may work for each of my sub-modules, but I have no idea
> then
> how to process these artifacts to aggregate this into a zip in the format
> above.  I think the artifact is I would get atm is a jar containing all the
> zipped artifacts from each modules.  So when that artifact is being created
> I need to process the zips from the modules / unpackage each module and
> copy
> configs across etc.
>
> Talked to a friend who said maybe this is not quite within the maven way
> and
> he suggested gradle may be worthwhile looking into but am quite interested
> to know if this should be possible in maven.
>
> Thanks for any help figuring this out,
> Jon
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Custom-assembly-of-multi-module-project-tp3256773p3256773.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to