I've got a situation on my hands in which I need to convert a maven assembly
system that was built to be only linux compatible to something cross
platform.
Among it's quirks, it generates pom files dynamically so that it can call
plugins against it. The first windows hitch I've come across is the
invocation of 'mvn' using ant within a plugin (written in groovy).  It needs
to be mvn.bat on windows.. I can fix this, but in my opinion this system is
a little too complex and it appears the original developer went a little
'maven-happy', trying to do everything through poms which would be better
suited to something like ant scripting..

The flow of the assembly plugin is:

- given an artifact/group/version,
- 1) generate a pom file with some set dependencies, and setup to use
'dependency-maven-plugin'.
- 2) run mvn against that pom, using the dependency-maven-plugin to either
unpack or copy those dependencies .
- 3) load another pom Artifact from the repository. This pom's only purpose
is to hold a bunch of properties that are then parsed, instructing another
plugin to copy certain artifacts to different places on the file system.

My first question: Is this a familiar pattern for anyone writing assemblies
?

and Two: How might you suggest to accomplish this? I guess the crux of the
problem is how best to utilize the maven dependency plugin from within
another plugin... I'm going to begin by seeing if I can just use any of the
api's from that plugin in my plugin, but I may have to end up just rewriting
a lot of it.

Reply via email to