maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barrie Treloar <>
Subject Re: Assembly Plugin not seeing local repository
Date Thu, 30 Dec 2010 23:05:48 GMT
I think the problem may be in terminology, I'll try to describe it
below.  It has to do with "modules"

Let me preface this by saying I have never got modulesets working and
have found that I don't need to.
Have you read

"In these builds, project hierarchy is established through use of the
modules  section of the POM, where parent POMs specify their children
in a modules  section. Other relationships, like interdependency, also
exist within multimodule builds; however, these are beyond the scope
of this document."

In reading your other post, I quote:
"The structure I use is that each module is a separate Eclipse project
and a separate SVN project."

But you haven't provided an example of the directory layout, so I am
guessing what you are doing from the problems you are describing.

Think of "module" as a convenient way to run the same set of commands
across multiple maven projects from a parent project.
Thus you can build from the top level via "mvn install" and maven will
run install in the defined modules in the correct order (generated by
building a dependency graph).
But a "module" is not in itself a declaration of a dependency.  A
module needs to define a parent so in that sense the parent must be
built/available first.
Take a look at

I think you are most of the way there because you say in your other post:
"Since some of the modules need to be "owned" by both of the
applications, they aren't actually owned by either.  Instead, I try to
treat them as much like third-party jars as possible.  They are
installed into the local repository and then used as appropriate.
They aren't quite as stable as most third-party jars, they are
evolving to different degrees, along with the main applications."

So what you really need is the assembly sorted.  See the "copy all
dependencies" description below, which is probably what you need.
I've attached our assembly file and this is what it does:
* Create two archives a zip (which will get installed into the
repository) and a directory (which doesn't get installed into the
repo, but is useful to run easily since it is already exploded)
* includeBaseDirectory = Always create the archive in a sub directory
named after the current artifact
* Include the fileset src/main/config that contains our configuration
data - log4j, spring contexts, etc that are easier to edit if not
included in jar files
* Include the project's main artifiact by copying it from target
(there is probably a better way to do this but this is an old assembly
file - but it works)
* Copy the windows and unix scripts with filtering turned on.  This
allows me to use "java -jar
${project.artifactId}-${project.version}.jar start" as the contents of
my start scripts.
* Copy ALL dependencies to the lib/ directory.

For us, because our main artifact is being run as a standalone
application we also need to make sure the Manifest.MF has the correct
Class-Path (include config/ and lib/ directories)
This requires configuring the maven-jar-plugin.  You may need to do
the same for the ejb plugin, and perhaps the war plugin (we don't
really use them)

Hope that helps.

=== Start:pom.xml ===
                  Work around for
                  as the goal should be attached.
=== End:pom.xml ===

=== Start:Assembly file ===
<assembly xmlns=""
=== End:Assembly file ===

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message