Hi,
so after using the maven-artifact-transfer a time I have realized there
seemed to be some lack of funcionality from my point of view...
My extension[1] will deploy all projects at the end of the session and I
had to write down a lot of code to deploy a project...the same meaning
for install a project...(Not yet done but I will deployAtEnd /
installAtEnd problem).
So I wrote a class[2] which contains this code (most of this is of
course taken from maven-deploy-plugin):
and now you simply deploy the whole projects of a maven project with a
few lines of code(The following is special for the extension):
ArtifactRepository repository =
executionEvent.getSession().getTopLevelProject().getDistributionManagementArtifactRepository();
List<MavenProject> sortedProjects =
executionEvent.getSession().getProjectDependencyGraph().getSortedProjects();
for ( MavenProject mavenProject : sortedProjects )
{
DeployRequest deployRequest = new DeployRequest().setProject(
mavenProject ).setUpdateReleaseInfo( true );
deployProject.deployProject(
executionEvent.getSession().getProjectBuildingRequest(), deployRequest,
repository );
}
So in the end if you like to do that from a usual maven plugin this
reduces to having a MavenSession and of course a project you would like
to deploy...
About the DeployRequest I'm not sure if it belongs to
maven-artifact-transfer but I have strong trend to...
So the question is:
Does it make sense to integrate those classes into
maven-artifact-transfer ?
This would simplify the implementation in maven-deploy-plugin and other
plugins as well (maven-install-plugin, maven-invoker-plugin,
maven-assembly-plugin, maven-shade-plugin etc.)..
I think similar code can be extracted to handle installing of a project
(as in maven-install-plugin already done)...
WDYT ?
Kind regards
Karl Heinz Marbaise
[1]: https://github.com/khmarbaise/maven-deployer-extension
[2]:
https://github.com/khmarbaise/maven-deployer-extension/blob/master/src/main/java/com/soebes/maven/extensions/deployer/DeployProject.java
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org