Re: Adding a Wagon to the Wagon project

2008-03-24 Thread delbd

Brett Porter a écrit :
What you've written is correct, though I'm not sure how well that's 
going to work out for you since the normal deploy mechanism assumes a 
repository format (so it'll try to use a path, but I guess you'll just 
ignore that in your wagon, or use the last part to determine the 
release id?).


Cheers,
Brett

On 20/03/2008, at 6:54 AM, delbd wrote:


Brett Porter a écrit :


It's been a while since I've used sourceforge, but how is this 
different from the ssh wagons?

my mistake, by sourceforge repository, i meaned sourceforge releases :)
The sf process is as follow:

upload your file via ftp, login to sf web page, go to release page, 
pickup a Package name and a Release name, pickup your file, fill-in 
release form (type of file, release informations, etc). Then you file 
is available on sourceforge releases. Boring to do by hand :) I could 
have written a simple plugin to associate with "deploy" phase, but i 
think using wagon is more appropriate, as it's the standard way maven 
2 uses to send releases.


it's the role-hint in components.xml. Add this to your class javadoc:

 @plexus.component role="org.apache.maven.wagon.Wagon"  
role-hint="sf"instantiation-strategy="per-lookup"


and make sure you use the plexus-maven-plugin to generate 
components.xml (which you can see in the existing providers).
I planned to do something similar to what FtpWagon does: extend 
parent pom ^^


Am i correct if i assume this for wagon behaviour btw? If i use such 
config in maven2:


 
false
myrepo
My Repository
sf://sfwagon/org.apache.maven.wagon-sf/wagon prereleases
default
  

The Repository objet available in AbstractWagon will have those 
properties?

id=myrepo
name=My Repository
host=sfwagon
protocol=sf
basedir=org.apache.maven.wagon-sf/wagon prereleases
url=sf://sfwagon/org.apache.maven.wagon-sf/wagon prereleases

The id is to have all sf urls with this format:
sf://projectname/package/release

Up to the user to fill that correctly, perhaps using ${...} to 
include build informations
Note that the idea is to support upload only (sourceforge release 
system does not allow for manipulation of directory structure, all 
you have access to is a package name, a release name and a file name)


Regards,
David Delbecq

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Brett Porter
[EMAIL PROTECTED]
http://blogs.exist.com/bporter/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Hello,

I'd like your comments on this way of handling mapping. This is how i 
plan to map repository + filename to sourceforge releases:
Once deciding of mapping is done, uploading seems straightforward, i 
just rip upload and navigation stuffs from maven1 sourceforge project. 
Might need a bit more work for download code, since Wagon is 2 ways and 
old maven 1 project am based on is upload only  :D



/**
* SfWagon is a Wagon to implement the sourceforge.net way of handling 
releases.

* There are mainly 3 working modes of this Sourceforge Wagon. The first 2
* modes are recommended as they respect the original filename, the last one
* puts the full path in filename, which can make it difficult for your 
end users.

* For descriptions below we always assume file of the form
* 'com/company/[...]/module/version/filename-qualifier.ext'
* 
*   If repository url has form sf://sourceforge.net/projectname,
*   Sourceforge mapping is as follow:
*   project="projectname"
*   package="com.company.[...]:module"
*   release="version"
*   filename="filename-qualifier.ext"
*   
*   If repository url has form
*   sf://sourceforge.net/projectname/package,
*   Sourceforge mapping is as follow:
*   project="projectname"
*   package="package"
*   release="com.company.[...]:module:version"
*   filename="filename-qualifier.ext"
*   
*   If repository url has form
*   sf://sourceforge.net/projectname/package/release,
*   Sourceforge mapping is as follow:
*   project="projectname"
*   package="package""
*   release="version"
*   
filename="com.company.[...]:module:version:filename-qualifier.ext"

*   
*
* @author tchize

*
*
* @version $Id: SfWagon.java 615844 2008-01-28 10:31:09Z tchize $
*
* @plexus.component role="org.apache.maven.wagon.Wagon"
*   role-hint="sf"
*   instantiation-strategy="per-lookup"
*/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Adding a Wagon to the Wagon project

2008-03-19 Thread Brett Porter
What you've written is correct, though I'm not sure how well that's  
going to work out for you since the normal deploy mechanism assumes a  
repository format (so it'll try to use a path, but I guess you'll just  
ignore that in your wagon, or use the last part to determine the  
release id?).


Cheers,
Brett

On 20/03/2008, at 6:54 AM, delbd wrote:


Brett Porter a écrit :


It's been a while since I've used sourceforge, but how is this  
different from the ssh wagons?
my mistake, by sourceforge repository, i meaned sourceforge  
releases :)

The sf process is as follow:

upload your file via ftp, login to sf web page, go to release page,  
pickup a Package name and a Release name, pickup your file, fill-in  
release form (type of file, release informations, etc). Then you  
file is available on sourceforge releases. Boring to do by hand :) I  
could have written a simple plugin to associate with "deploy" phase,  
but i think using wagon is more appropriate, as it's the standard  
way maven 2 uses to send releases.


it's the role-hint in components.xml. Add this to your class javadoc:

 @plexus.component role="org.apache.maven.wagon.Wagon"  role- 
hint="sf"instantiation-strategy="per-lookup"


and make sure you use the plexus-maven-plugin to generate  
components.xml (which you can see in the existing providers).
I planned to do something similar to what FtpWagon does: extend  
parent pom ^^


Am i correct if i assume this for wagon behaviour btw? If i use such  
config in maven2:


 
false
myrepo
My Repository
sf://sfwagon/org.apache.maven.wagon-sf/wagon prereleasesurl>

default
  

The Repository objet available in AbstractWagon will have those  
properties?

id=myrepo
name=My Repository
host=sfwagon
protocol=sf
basedir=org.apache.maven.wagon-sf/wagon prereleases
url=sf://sfwagon/org.apache.maven.wagon-sf/wagon prereleases

The id is to have all sf urls with this format:
sf://projectname/package/release

Up to the user to fill that correctly, perhaps using ${...} to  
include build informations
Note that the idea is to support upload only (sourceforge release  
system does not allow for manipulation of directory structure, all  
you have access to is a package name, a release name and a file name)


Regards,
David Delbecq

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Brett Porter
[EMAIL PROTECTED]
http://blogs.exist.com/bporter/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Adding a Wagon to the Wagon project

2008-03-19 Thread delbd

Brett Porter a écrit :


It's been a while since I've used sourceforge, but how is this 
different from the ssh wagons?

my mistake, by sourceforge repository, i meaned sourceforge releases :)
The sf process is as follow:

upload your file via ftp, login to sf web page, go to release page, 
pickup a Package name and a Release name, pickup your file, fill-in 
release form (type of file, release informations, etc). Then you file is 
available on sourceforge releases. Boring to do by hand :) I could have 
written a simple plugin to associate with "deploy" phase, but i think 
using wagon is more appropriate, as it's the standard way maven 2 uses 
to send releases.


it's the role-hint in components.xml. Add this to your class javadoc:

  @plexus.component role="org.apache.maven.wagon.Wagon"  
role-hint="sf"instantiation-strategy="per-lookup"


and make sure you use the plexus-maven-plugin to generate 
components.xml (which you can see in the existing providers).
I planned to do something similar to what FtpWagon does: extend parent 
pom ^^


Am i correct if i assume this for wagon behaviour btw? If i use such 
config in maven2:


  
 false
 myrepo
 My Repository
 sf://sfwagon/org.apache.maven.wagon-sf/wagon prereleases
 default
   

The Repository objet available in AbstractWagon will have those properties?
id=myrepo
name=My Repository
host=sfwagon
protocol=sf
basedir=org.apache.maven.wagon-sf/wagon prereleases
url=sf://sfwagon/org.apache.maven.wagon-sf/wagon prereleases

The id is to have all sf urls with this format:
sf://projectname/package/release

Up to the user to fill that correctly, perhaps using ${...} to include 
build informations
Note that the idea is to support upload only (sourceforge release system 
does not allow for manipulation of directory structure, all you have 
access to is a package name, a release name and a file name)


Regards,
David Delbecq

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Adding a Wagon to the Wagon project

2008-03-19 Thread Brett Porter


On 20/03/2008, at 6:17 AM, delbd wrote:


Hello dear wagon developpers,


I am facing a situation where i need to deploy my maven2 project to  
a sourceforge repository. To automate this, i planned to convert the  
maven1 sourceforge deploy plugin to a wagon provider, so i could use  
a sf: url scheme for the deploy location. Now, i have a few  
questions for team


Cool :)

It's been a while since I've used sourceforge, but how is this  
different from the ssh wagons?


1) (most important), how do i tell Wagon to associate my class  
(x.y.SourceforgeWagon) to a sf: prefix? It seems the trick is a  
component.xml file in jar, but i don't find how it got generated  
during build process


it's the role-hint in components.xml. Add this to your class javadoc:

  @plexus.component role="org.apache.maven.wagon.Wagon"  role- 
hint="sf"instantiation-strategy="per-lookup"


and make sure you use the plexus-maven-plugin to generate  
components.xml (which you can see in the existing providers).





2) Is there any doc on how to build your own Wagon implementation?


No - but we welcome contributions as you explore.




3) is a mvn:install + add that artifact to another project enough to  
be able to test plugin with my own project?


yes, but you must add the artifact using the  tag (you'll  
see a lot of examples around for webdav).





4) Supposing i make that plugin and it works properly, what are the  
rules i must follow if i want to propose it to community?


Keep discussing it here, and eventually submit it to JIRA. Make sure  
the code is licensed under the Apache License. You may have to submit  
a license agreement too - but we'll help you out at that point if  
necessary.


Cheers,
Brett

--
Brett Porter
[EMAIL PROTECTED]
http://blogs.exist.com/bporter/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Adding a Wagon to the Wagon project

2008-03-19 Thread delbd

Hello dear wagon developpers,


I am facing a situation where i need to deploy my maven2 project to a 
sourceforge repository. To automate this, i planned to convert the 
maven1 sourceforge deploy plugin to a wagon provider, so i could use a 
sf: url scheme for the deploy location. Now, i have a few questions 
for team



1) (most important), how do i tell Wagon to associate my class 
(x.y.SourceforgeWagon) to a sf: prefix? It seems the trick is a 
component.xml file in jar, but i don't find how it got generated during 
build process


2) Is there any doc on how to build your own Wagon implementation?

3) is a mvn:install + add that artifact to another project enough to be 
able to test plugin with my own project?


4) Supposing i make that plugin and it works properly, what are the 
rules i must follow if i want to propose it to community?



Regards,
David Delbecq

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]