maven-wagon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Maczka" <mmac...@interia.pl>
Subject RE: maven bindings
Date Thu, 04 Dec 2003 10:38:13 GMT


> -----Original Message-----
> From: Jason van Zyl [mailto:jvanzyl@maven.org]
> Sent: Thursday, December 04, 2003 12:58 AM
> To: wagon-dev@maven.apache.org
> Subject: maven bindings
>
>
> Michal,
>
> There are still a few bits and pieces of the Wagon stuff at Codehaus.
> I'm specifically interested in the maven binding as I'm working on the
> maven-project component so I need some dependency --> artifact
> resolution. Any thoughts?
>
Jason,

I have written a lot of code which deals with this issue( maybe even too
much) and will be glad
if bits of it will be used.


What are wagon-maven-bindings is explained at the bottom of this letter
(***).


I have following interfaces which might be directly interesting for you:

ArtifactFactory ()
http://cvs.apache.org/viewcvs/maven-components/maven-artifact/src/main/java/
org/apache/maven/artifact/factory/ArtifactFactory.java?rev=1.10&content-type
=text/vnd.viewcvs-markup

DependecySatisfier
http://cvs.apache.org/viewcvs/maven-components/maven-artifact/src/main/java/
org/apache/maven/artifact/satisfy/DependencySatisfier.java?rev=1.6&content-t
ype=text/vnd.viewcvs-markup





ArtifactFactory can (consulting repository layout service):
- create the list of project's artifact from POM
- create artifact from dependency


It have also implemented auxiliary methods like:
    Artifact createArtifactOfType( Dependency dependency, String type,
        Project project, String mavenRepoLocal ) throws Exception;

    Artifact createArtifactOfVersion( Dependency dependency,
        String version, Project project, String mavenRepoLocal )
        throws Exception;


Because I planned to use it for creating "sibling" artifacts of given
artifact.

Say that you have:

<dependency>
   <groupId>baa</groupId>
   <artifactId>foo</artifactId>
   <version>1.0</version>
   <type>jar</type>
<dependency>


So Artifact Factory is an entity which can create the artifact for the
dependency "baa:foo:jar:1.0"
and then easily you can create artifacts like "baa:foo:javadoc:1.0" or
"baa:foo:src:1.0" or "baa:foo:jar:1.1".

I imagine plugins like IDEA, or Eclipse would directly profit from such
functions as soon as
"javadocs", "srcs" are deployed to repository.



Once you have artifacts - DependecySatisfier component was supposed to be
used for
assuring that artifact(s) is(are) in your local repository.

DependecySatisfier was using two services:
 -SnapshotResolver
   which hides inside all the logic needed to resolve snapshot dependencies.
 - ArtifactDownloader
    (which at the moment uses prehistoric version of Wagon) for downloading
artifacts



I think I have used them both in my version of plexus-runtime-builder.


Of course this is just my vision of how the things might work. I don't think
any of those classes
were ever deeply analyzed by somebody.




****
What are wagon-maven-bindings?




It's my attempt to define relations between maven/plexus and wagon's beans:
- Repository (BTW: Emmanuel is using the same name "Repository" for SCM
repository)
- AutheticationInfo
- ProxyInfo


I have following thoughts:

a) Proxy server settings are individual per each developer and AFIK
(correct me if I am wrong) they can be different per each protocol.
b) It will be nice to separate POM (project.xml + set of properties files)
from the definition of auth info and proxy server
    so those definitions can be shared among many projects (I know it is
also currently possible via ${user.home}/build.properties)

My naive thoughts are that maybe (for Maven/Plexus) following
organization of directories will be appropriate( I hope that the example is
clear):

${maven.home}
                       /proxy-servers
                             http.properties)
                             ssh.properties
                             ftp.properties
                             https.properties
                      /auth-info
                          http_www_ibiblio_org_maven.properties

                          ftp_ftp_mycompany_com_repo.properties

-- http.properties
username=michal
password=proxypassword
host=www.apache.org
port=100


-- http_www_ibiblio_org_maven.properties
username=michal
password=ihatejelly
passphrase=ireallydo
privatekey=/home/michal/key
group=power_users





wagon-maven-binding project is containing classes for unmarshalling such
configuration files.

This means that users will be able to define (as they are used to do) per
project

maven.repo.remote=http://www.ibiblio.org/maven


and only when extra information for the repository will be needed (e.g. auth
info) they will be forced to edit some more configuration files (which will
be centralized for all project)

Maven before downloading from any repository will check if transfer over
given protocol should go via proxy server
and if auth info should be used.


[off topic]
I believe that I have a solution how to inject passwords to artifact
downloading routines in secure way
I am thinning about "download" server which will be communicating with maven
via e.g. xml-rpc and will have GUI fronted
(e.g. web app). This GUI can also use the same configuration setting But
this is different subject.
Once Maven will be working 24x7 this problem will disappear.


Michal















---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-dev-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-dev-help@maven.apache.org


Mime
View raw message