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.










Reply via email to