You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Ole Ersoy <ol...@yahoo.com> on 2007/01/31 16:56:49 UTC

Commons-vfs for Archiva?

I noticed that there seems to be a lot of 
overlap between Archiva's approach to
file discovery and VFS's.

Should Archiva use VFS?

Overview:
http://wiki.apache.org/jakarta-commons/VFS

Using the API:
http://jakarta.apache.org/commons/vfs/api.html

Here's an example of how to get "maven-metadata.xml"
files:

	public FileObject[] discoverMetadata() throws
FileSystemException
	{
		//MetadataDiscoverer metadataDiscoverer = new
DefaultMetadataDiscoverer();
		
		FileSelector ff = new FileSelector()
		{
		    public boolean includeFile(FileSelectInfo
fileInfo) throws Exception
		    {
		        FileObject fileObject = fileInfo.getFile();
		        return
fileObject.getName().getBaseName().contentEquals("maven-metadata.xml");
		    }

		    public boolean
traverseDescendents(FileSelectInfo fileInfo) throws
Exception
		    {
		        return true;
		    }
		};
		
		File file = new File("src/test/resources/");
		return
VFS.getManager().resolveFile(file.getAbsolutePath()).findFiles(ff);
	}




Cheers,
- Ole




 
____________________________________________________________________________________
The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

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


Re: Commons-vfs for Archiva?

Posted by Carlos Sanchez <ca...@apache.org>.
the wagon implementations were already done so people din't feel the
need I imagine.
I'm all for reuse though ;) although it we were going to refactor i'd
look into JCR api.

On 1/31/07, Mario Ivankovits <ma...@ops.co.at> wrote:
> Hi Carlos!
> > that topic was already brought before and didn't succeed
> Do you remember what the problem was?
>
>
> Ciao,
> Mario
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

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


Re: Commons-vfs for Archiva?

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Carlos!
> that topic was already brought before and didn't succeed
Do you remember what the problem was?


Ciao,
Mario


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


Re: Commons-vfs for Archiva?

Posted by Ole Ersoy <ol...@yahoo.com>.
Ah - OK - Cool - Just thought I'd check.

Cheers,
- Ole


--- Carlos Sanchez <ca...@apache.org> wrote:

> that topic was already brought before and didn't
> succeed
> 
> On 1/31/07, Ole Ersoy <ol...@yahoo.com> wrote:
> > I noticed that there seems to be a lot of
> > overlap between Archiva's approach to
> > file discovery and VFS's.
> >
> > Should Archiva use VFS?
> >
> > Overview:
> > http://wiki.apache.org/jakarta-commons/VFS
> >
> > Using the API:
> > http://jakarta.apache.org/commons/vfs/api.html
> >
> > Here's an example of how to get
> "maven-metadata.xml"
> > files:
> >
> >         public FileObject[] discoverMetadata()
> throws
> > FileSystemException
> >         {
> >                 //MetadataDiscoverer
> metadataDiscoverer = new
> > DefaultMetadataDiscoverer();
> >
> >                 FileSelector ff = new
> FileSelector()
> >                 {
> >                     public boolean
> includeFile(FileSelectInfo
> > fileInfo) throws Exception
> >                     {
> >                         FileObject fileObject =
> fileInfo.getFile();
> >                         return
> >
>
fileObject.getName().getBaseName().contentEquals("maven-metadata.xml");
> >                     }
> >
> >                     public boolean
> > traverseDescendents(FileSelectInfo fileInfo)
> throws
> > Exception
> >                     {
> >                         return true;
> >                     }
> >                 };
> >
> >                 File file = new
> File("src/test/resources/");
> >                 return
> >
>
VFS.getManager().resolveFile(file.getAbsolutePath()).findFiles(ff);
> >         }
> >
> >
> >
> >
> > Cheers,
> > - Ole
> >
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > The fish are biting.
> > Get more visitors on your site using Yahoo! Search
> Marketing.
> >
>
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail:
> dev-help@maven.apache.org
> >
> >
> 
> 
> -- 
> I could give you my word as a Spaniard.
> No good. I've known too many Spaniards.
>                              -- The Princess Bride
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@maven.apache.org
> For additional commands, e-mail:
> dev-help@maven.apache.org
> 
> 



 
____________________________________________________________________________________
Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097

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


Re: Commons-vfs for Archiva?

Posted by Carlos Sanchez <ca...@apache.org>.
that topic was already brought before and didn't succeed

On 1/31/07, Ole Ersoy <ol...@yahoo.com> wrote:
> I noticed that there seems to be a lot of
> overlap between Archiva's approach to
> file discovery and VFS's.
>
> Should Archiva use VFS?
>
> Overview:
> http://wiki.apache.org/jakarta-commons/VFS
>
> Using the API:
> http://jakarta.apache.org/commons/vfs/api.html
>
> Here's an example of how to get "maven-metadata.xml"
> files:
>
>         public FileObject[] discoverMetadata() throws
> FileSystemException
>         {
>                 //MetadataDiscoverer metadataDiscoverer = new
> DefaultMetadataDiscoverer();
>
>                 FileSelector ff = new FileSelector()
>                 {
>                     public boolean includeFile(FileSelectInfo
> fileInfo) throws Exception
>                     {
>                         FileObject fileObject = fileInfo.getFile();
>                         return
> fileObject.getName().getBaseName().contentEquals("maven-metadata.xml");
>                     }
>
>                     public boolean
> traverseDescendents(FileSelectInfo fileInfo) throws
> Exception
>                     {
>                         return true;
>                     }
>                 };
>
>                 File file = new File("src/test/resources/");
>                 return
> VFS.getManager().resolveFile(file.getAbsolutePath()).findFiles(ff);
>         }
>
>
>
>
> Cheers,
> - Ole
>
>
>
>
>
> ____________________________________________________________________________________
> The fish are biting.
> Get more visitors on your site using Yahoo! Search Marketing.
> http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

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