hELLO,
i am aslo interested in this question since i have found troubles when
porting my apps
from Maven 1.1 to maven 1.2
As a temporary solution, i have found this working
for example, i have a master-project.pom that have jboss seam files that i
will need in other projects
i have declared this in master-project.pom (VERSION SPECIFIED)
<dependencyManagement>
<dependency>
<groupId>jboss-seam</groupId>
<artifactId>jboss-seam</artifactId>
<version>1.0.0.CR2</version>
</dependency>
<dependency>
<groupId>jboss-seam</groupId>
<artifactId>jboss-seam-ui</artifactId>
<version>1.0.0.CR2</version>
</dependency>
</dependencies>
</dependencyManagement>
and then in the dependent-project.pom i have declard this
....
<dependency>
<groupId>jboss-seam</groupId>
<artifactId>jboss-seam</artifactId>
</dependency>
<dependency>
<groupId>jboss-seam</groupId>
<artifactId>jboss-seam-ui</artifactId>
</dependency>
NO VERSION have been declared, because it will be picked from
master-project.pom
i believe if you declare a <dependency> NOT part of <dependencyManagement>
in master-project, all projects
that extends from master-project will see that dependency.
Somehow in the docs i found that it's more useful to declare dependencies
using <dependencyManagement>
pls maven geeks, could you comment?
IMO if you declare a dependenecy in master-project, all projects that
inherit from it will see that dependency....
my 2 cents
regards
marco
On 5/12/06, Dave Comeau <[EMAIL PROTECTED]> wrote:
Thanks Dan, this has been very helpful and I've been visualizing this in
my
spare cycles. I didn't reply before with my gratitude in order to cut
down
on extra noise on the list... :)
I do have a quick question though..
If I do have the two modules as you suggested: "project-jar" and
"project-obfuscated-jar" that depends on the former, how do I access the
jar
full of classes in the "project-obfuscate-jar"?
Since I'm new to Maven, I still haven't figured out how to do such funky
stuff with with multi-modules yet. I appreciate the help :)
Dave
-----Original Message-----
From: dan tran [mailto:[EMAIL PROTECTED]
Sent: Monday, May 01, 2006 2:19 PM
To: Maven Users List
Subject: Re: Need help with first M2 project: Multiple Aritifacts /
POMs?
Suggestions, very high level
root
pom.xml
project-jar
pom.xml <------ normal compile + maven-javadoc-plugin to attach
javadoc zip
project-ofuscated-jar
pom.xml <--- depend on project-jar, write your own plugin ( or
custom
antrun) to scamble the proeject-jar
project-assembly
pom.xml <---- depends on project-ofuscated-jar. Use
maven-assembly-plugin to prepare your layout
then use antant to run IA against the prepare
layout. You may need help from
maven-depenedency-plugin, and
build-helper-maven-plugin
If you have question after talking a look at this possiblity and its
associated plugins, feelfree to post again
-Dan
On 5/1/06, Dave Comeau <[EMAIL PROTECTED]> wrote:
>
>
> I'm trying to design & implement my first Maven project, which is
> converting
> an Ant/batch file based build system to M2.
>
> I'm struggling with trying to find the best way to map the functions of
> the
> current system to Maven concepts.
>
> My current Ant/batch file build produces the following:
>
> In the "first step":
>
> - Normal functions of compile code, unit tests, obfuscate, javadoc
> - Produces the following artifacts:
>
> 1) project-version.jar (obfuscated)
> 2) project-version-NOT_OBFUSCATED.jar
> 3) obfscation-index-map.txt
> 4) javadoc.zip
>
> In the "second step" (includes Ant and some batch files):
>
> - Assemble Install Anywhere structure (file copying)
> - Include project-version.jar & javadoc.zip
> - Run installer Ant tasks
> - Produce install binaries for Win32, various Unixes, tar file.
> - Copy said binaries to a unique network location (based on version
> number).
>
> ----------------------
>
> Where I need guidance right now, is figuring how my Maven project can
> produce all four (4) artifacts as in the "first step". The only way I
can
> think of is having one project (one pom.xml) that is configured to
produce
> the obfuscated Jar artifact. I will have to use the Antrun plugin to
> produce/include the other artifacts and ensure they are
stored/distributed
> properly. For example, to produce the NOT_OBFUSCATED jar, I'll create
the
> Jar file manually with Ant BEFORE I run my obfuscator in the
> "process-classes" phase.
>
> I know that the theory is to produce one artifact per pom. But I don't
> see
> how this would work better with a multiple module project.
>
> Could someone please advise? Also, any comments on any M2 best
practices
> for the "second step" would be greatly appreciated.
>
> Thank you!
>
> DaveC.
>
>
>
>
>
>
>
>
>
>
>
>