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.