Hi Karl Heinz,
when looking at Aether it is not aware of a MavenProject. Instead it is
transferring Files.
My idea was to have a thin layer on top op (Sonatype/Eclipse) Aether and
to avoid too much Maven Core mixin.
But it did cross my mind to use the MavenProject as the entity instead of
File. It will come with some other interesting possibilities: updating
meta after all files are uploaded, otherwise you'll need to write this
inside the plugin(s).
It will introduce an extra layer and we must be aware that Aether's
DeployRequest cannot be translated back and forward to the
artifact-transfer DeployRequest.
It is a design question and I think it is worth adding it.
Robert
On Sat, 10 Sep 2016 15:27:35 +0200, Karl Heinz Marbaise
<khmarba...@gmx.de> wrote:
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org