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. > > > > > > > > > > > >
