Allow distribution of artifact types other than jar (better solution then as
indicated at http://jira.codehaus.org/browse/MPDIST-13?).
--------------------------------------------------------------------------------------------------------------------------------------
Key: MPDIST-26
URL: http://jira.codehaus.org/browse/MPDIST-26
Project: maven-dist-plugin
Type: Improvement
Environment: Not of importance.
Reporter: Davy Toch
Attachments: multiprojectProperties.txt, postGoal.xml
The goal dist:build-bin should also allow to include artifacts different then
the ones created by jar:jar (e.g. wars, ears, ...). A solution was already
proposed at http://jira.codehaus.org/browse/MPDIST-13.
Currently, we're writing a postGoal for dist:prepare-bin-filesystem that:
1. determines the current project 'type' (ejb, war, jar, ...)
2. removes the already generated jar if the current project type is different
from 'jar'
3. attain the goal 'type':'type' to (re)create the artifact
4. copy the artifact to the binary distribution directory
Cf postGoal.xml included as attachment.
This postGoal currently uses the property maven.multiproject.type from the
multiproject plugin:
1. maven.multiproject.type = 'master' :
- master Maven project from which other projects can inherit (to avoid POM
configuration duplication)
- steps 1 and 2 of our custom postGoal are executed
2. maven.multiproject.type <> 'master' :
- Maven projects that create artifacts (jars, ears, ...)
- type = 'jar' : step 1 executed
- type <> 'jar' : steps 1 to 4 executed
Cf multiprojectProperties.txt included as attachment.
Having a solution similar to the postGoal but already integrated in the plugin
would allow minimizing custom scripting in maven.xml and have a more generic
dist plugin. Also remark that an alternative to using maven.multiproject.type
can be chosen (e.g. maven.dist.artifact.type), in order to avoid being
dependent on properties of the multiproject plugin.
The only problem I can see is that the prereqs='jar:jar' in the dist plugin
would somehow have to be replaced by a call <attainGoal
name="${type}:${type}"/>, meaning that it is possible that the goal
${type}:${type} will be called more than once.
Regards,
Davy Toch
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]