On 5/16/06, Dave Comeau <[EMAIL PROTECTED]> wrote:


I'm trying to design a multi-module project to do a variety of steps that
I
currently do in my existing Ant build system, and was previously given
some
advice to setup one module to create the standard jar artifact, and then
create another module (which has a dependency on the jar module) to create
the obfuscated jar.

Being new to Maven, I can't see how to do this.  In theory I will want the
project-ofuscated-jar to access (and unpackage?) the project-jar's freshly
created jar file and then obfuscate the classes using antrun or a custom
plugin.

I'm hoping someone can shed some light on how this is actually done.  I
can't find any documentation on multi-modules that explains the
relationship
between modules in the context that I need.

Here are my questions:

1) I assume that by M2 design, project-obfuscated-jar should not directly
access the classes/ in project-jar.  Instead it should access the
project-jar JAR artifact.  Is this correct?


Maven 2 now allows artifact classifier type, ie you can deploy mulitple
artifacts under one project.
So I dont see why not apply to your use case since it is much simpler.

So you need a use antrun to do the obfuscation and use
build-helper-maven-plugin to help with deploy thru attach goal.

2) Would project-jar's jar artifact first need to be deployed to the
repository before the project-obfuscated-jar can access it?

3) Assume that project-obfuscated-jar uses antrun to feed the classes
produced by project-jar into the obfuscator.  How do I directly reference
project-jar's JAR file?

4) Is it bad practice to reference peer projects/modules using "../.."
type
references?

5) Is there any documentation/references on multi-modules outside of the
typical use cases where a multi-module project is just a set of projects
each with their own source tree?  I feel I am trying to apply the
multi-module functionality to a more specialized use case that is
certainly
within the capabilities of Maven, but it's not typical and the
documentation
hasn't expanded beyond the mainstream use cases yet.

Thank you for your help
DaveC





Reply via email to