Hi Robert,
On 10/09/16 16:54, Robert Scholte wrote:
Hi Karl Heinz,
when looking at Aether it is not aware of a MavenProject. Instead it is
transferring Files.
Yes I know..
My idea was to have a thin layer on top op (Sonatype/Eclipse) Aether and
to avoid too much Maven Core mixin.
Yes I have understood that...
But it did cross my mind to use the MavenProject as the entity instead
of File.
A file is a good idea to be flexible..but a MavenProject would also make
sense, cause it will make plugin usage more simpler..(extension usage as
well ;-) ).
Apart from that the component contains already ProjectCoordinate (which
isnt't anywhere)...
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).
That's what came up to me by looking into maven-install-plugin...
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.
The DeployRequest I have only taken cause it is done via this in
maven-deploy-plugin...I would say it is not really neccessary...
So first I would suggest to add DeployProject (better name?) to the package:
org.apache.maven.shared.project.deploy
as well as DeployRequest (it does not contain any Aether specific
things; no imports here)....(May be it can be removed)...
and something like InstallProject and InstallRequest (need to think
about it) to:
org.apache.maven.shared.project.install
If you have no objections....
I will give it a try and see how it works...
Kind regards
Karl Heinz
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
Mit freundlichem Gruß
Karl-Heinz Marbaise
--
SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl-Heinz Marbaise USt.IdNr: DE191347579
Hauptstrasse 177
52146 Würselen http://www.soebes.de
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org