|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Adding a Wagon to the Wagon projectHello 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: wagon-dev-unsubscribe@... For additional commands, e-mail: wagon-dev-help@... |
|
|
Re: Adding a Wagon to the Wagon projectOn 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 <extension> 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 brett@... http://blogs.exist.com/bporter/ --------------------------------------------------------------------- To unsubscribe, e-mail: wagon-dev-unsubscribe@... For additional commands, e-mail: wagon-dev-help@... |
|
|
Re: Adding a Wagon to the Wagon projectBrett 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: <repository> <uniqueVersion>false</uniqueVersion> <id>myrepo</id> <name>My Repository</name> <url>sf://sfwagon/org.apache.maven.wagon-sf/wagon prereleases</url> <layout>default</layout> </repository> 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: wagon-dev-unsubscribe@... For additional commands, e-mail: wagon-dev-help@... |
|
|
Re: Adding a Wagon to the Wagon projectWhat 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: > > <repository> > <uniqueVersion>false</uniqueVersion> > <id>myrepo</id> > <name>My Repository</name> > <url>sf://sfwagon/org.apache.maven.wagon-sf/wagon prereleases</ > url> > <layout>default</layout> > </repository> > > 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: wagon-dev-unsubscribe@... > For additional commands, e-mail: wagon-dev-help@... > -- Brett Porter brett@... http://blogs.exist.com/bporter/ --------------------------------------------------------------------- To unsubscribe, e-mail: wagon-dev-unsubscribe@... For additional commands, e-mail: wagon-dev-help@... |
|
|
Re: Adding a Wagon to the Wagon projectBrett 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: >> >> <repository> >> <uniqueVersion>false</uniqueVersion> >> <id>myrepo</id> >> <name>My Repository</name> >> <url>sf://sfwagon/org.apache.maven.wagon-sf/wagon prereleases</url> >> <layout>default</layout> >> </repository> >> >> 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: wagon-dev-unsubscribe@... >> For additional commands, e-mail: wagon-dev-help@... >> > > -- > Brett Porter > brett@... > http://blogs.exist.com/bporter/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: wagon-dev-unsubscribe@... > For additional commands, e-mail: wagon-dev-help@... > 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' * <ol> * <li>If repository url has form sf://sourceforge.net/projectname, * Sourceforge mapping is as follow:<ul> * <li>project="projectname"</li> * <li>package="com.company.[...]:module"</li> * <li>release="version"</li> * <li>filename="filename-qualifier.ext"</li> * </ul></li> * <li>If repository url has form * sf://sourceforge.net/projectname/package, * Sourceforge mapping is as follow:<ul> * <li>project="projectname"</li> * <li>package="package"</li> * <li>release="com.company.[...]:module:version"</li> * <li>filename="filename-qualifier.ext"</li> * </ul></li> * <li>If repository url has form * sf://sourceforge.net/projectname/package/release, * Sourceforge mapping is as follow:<ul> * <li>project="projectname"</li> * <li>package="package""</li> * <li>release="version"</li> * <li>filename="com.company.[...]:module:version:filename-qualifier.ext"</li> * </ul></li> * * @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: wagon-dev-unsubscribe@... For additional commands, e-mail: wagon-dev-help@... |
| Free Forum Powered by Nabble | Forum Help |