You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@archiva.apache.org by Felipe Roos da Rosa <fe...@yahoo.com> on 2008/10/10 20:57:52 UTC

Enc: Archiva OMG RAS extension

Hi James & Brett!

It's being a while since the last email, but only now I had the chance to perform some investigation. Now that I did, some other question came up.

I took an overall look at the archiva running it on my machine. I've also downloaded the svn repository for writing a plugin, but I could not get that sample working yet (i'm working on - with some luck, i've an environment problem). I would like to ask you some things about the repository, and how can I handle the generation of pom files.

As long as I understood, we can write a repository content consumer so archiva tells us when a new artifact is added to the repository. In our context, we would process a ".ras" file, and generate the "pom.xml" that makes referente to it. Is that correct? Where can I find more resources about the process archiva uses to call its consumers?

Another thing is that when browsing through archiva for an artifact, I believe that the information archiva shows about the artifact comes from the pom.xml file. If so, is there any way to change layout/content of the artifact page so we can show customized information about the artifact? 

Last, but not least, a RAS repository must be enabled with two URLs that support POST actions (stated in the spec). One performs searches by keyword, and return a list of assets. The other performs a search by logical path and brings back a single asset. Is there a way to build that inside archiva? Otherwise I would have to write a HTTP wrapper that peform searches to archiva...

Thanks for all your support. 
Kind regards, 
Felipe Roos
http://www.linkedin.com/in/feliperoos 


Achar desculpas para os nossos 
defeitos não nos torna melhores 



----- Mensagem encaminhada ----
De: "Roos, Felipe (R&D Brazil)" <fe...@hp.com>
Para: "feliperoos@yahoo.com" <fe...@yahoo.com>
Enviadas: Sexta-feira, 10 de Outubro de 2008 15:28:20
Assunto: FW: Archiva OMG RAS extension


 
 
Felipe Roos
HP R&D Brazil
55 51 21213560
 
From:Joana M. F. Trindade [mailto:jmftrindade@gmail.com] 
Sent: domingo, 7 de setembro de 2008 03:14
To: dev@archiva.apache.org
Cc: Roos, Felipe (R&D Brazil)
Subject: Re: Archiva OMG RAS extension
 
Hi Brett,

Thanks for the support, that would be really great :-)

At first, we considered implementing our own format of repository. Since OMG does not define a specific format or metadata for RAS repositories per se, however, we thought that going for a Maven repository with RAS artifacts would require considerably less effort. Maven already has dependency management, and concerning repository managers it seems that Archiva offers most of the tasks we were going to implement ourselves from scratch. By reusing Maven, we can focus on implementing support for processing RAS artifacts metadata as defined in the specification.

I understand this is preliminary documentation, but we would really appreciate if you can provide pointers for samples (e.g., are there any specific roles, role-hint values in the plexus component definition we should be aware of?) so we can write our own consumer.

Thanks,
Joana
On Sat, Sep 6, 2008 at 12:05 AM, Brett Porter <br...@apache.org> wrote:
Hi,

I'd be very happy to help you with this and improve our documentation / extension mechanism in the process.

What are you looking to achieve with it? Is it a different format of repository, or a Maven repository containing RAS artifacts and wanting to process them in some special way?

The latter is partially supported by writing your own consumer. The preliminary documentation we have for that is here: http://archiva.apache.org/docs/1.1.1/customising/writing-consumer.html

(BTW, I'm removing the users@ CC to avoid confusion.)

Cheers,
Brett


On 06/09/2008, at 7:54 AM, Joana M. F. Trindade wrote:
Hi,

A colleague and I would like to extend Archiva to support repositories for
RAS
artifacts, as defined in the OMG Reusable Assets Specification [1]. Is there
a
development guide for Archiva extensions?

Thanks,
Joana

[1] http://www.omg.org/technology/documents/formal/ras.htm
-- 
Joana M. F. da Trindade

Email: jmftrindade@inf.ufrgs.br
Personal Homepage: http://joanatrindade.wikidot.com
LinkedIn: http://www.linkedin.com/in/joanatrindade
 
--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/



-- 
Joana M. F. da Trindade

Email: jmftrindade@inf.ufrgs.br
Personal Homepage: http://joanatrindade.wikidot.com
LinkedIn: http://www.linkedin.com/in/joanatrindade


      Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua cara @ymail.com ou @rocketmail.com.
http://br.new.mail.yahoo.com/addresses

Re: Archiva OMG RAS extension

Posted by Maria Odea Ching <oc...@apache.org>.
Hi Felipe,

Please see in-line comments below.. :)

On Sat, Oct 11, 2008 at 2:57 AM, Felipe Roos da Rosa
<fe...@yahoo.com>wrote:

> Hi James & Brett!
>
> It's being a while since the last email, but only now I had the chance to
> perform some investigation. Now that I did, some other question came up.
>
> I took an overall look at the archiva running it on my machine. I've also
> downloaded the svn repository for writing a plugin, but I could not get that
> sample working yet (i'm working on - with some luck, i've an environment
> problem). I would like to ask you some things about the repository, and
> how can I handle the generation of pom files.


I don't think the sample plugin has been updated to the latest changes in
the Archiva api, so that might be the reason why it's not working :(


>
> As long as I understood, we can write a repository content consumer so
> archiva tells us when a new artifact is added to the repository. In our
> context, we would process a ".ras" file, and generate the "pom.xml" that
> makes referente to it. Is that correct? Where can I find more resources
> about the process archiva uses to call its consumers?


You might want to take a look at the RepositoryScanner,
RepositoryScannerInstance and RepositoryContentConsumers (found in
archiva-repository-layer) which touch those parts of calling the consumers
during scanning. The first 2 classes are the ones executed when the
repository scan is triggered (either scheduled or forced from the
Repositories page) while the RepositoryContentConsumers class is like a
utility class which is invoked to execute the consumers after a proxying or
a deployment is made to immediately update the db & index.

I'm not sure if this would be helpful to what you want to do, but since
Archiva 1.1 we implemented RSS feeds of new artifacts in a repo and new
versions of an artifact. More details about this is available here:
http://archiva.apache.org/docs/1.1.3/userguide/rss.html and if you want to
take a look at the code, it's in the archiva-rss module.


>
> Another thing is that when browsing through archiva for an artifact, I
> believe that the information archiva shows about the artifact comes from the
> pom.xml file. If so, is there any way to change layout/content of
> the artifact page so we can show customized information about the artifact?


To change the layout of the artifact info page, I think you need to update
the browse.jsp and BrowseAction in archiva-webapp, and RepositoryBrowsing in
archiva-database.

Last, but not least, a RAS repository must be enabled with two URLs that
> support POST actions (stated in the spec). One performs searches by keyword,
> and return a list of assets. The other performs a search by logical path and
> brings back a single asset. Is there a way to build that inside
> archiva? Otherwise I would have to write a HTTP wrapper that peform searches
> to archiva...


For this part, I think you can make use of Archiva's search features. It
supports both search by keyword and filtered search. The indexing of the
repository is done by a set of consumers (see archiva-lucene-consumers
component), while the actual search is done by the CrossRepositorySearcher
in the archiva-indexer component.


>
>
> Thanks for all your support.
> Kind regards,
> Felipe Roos
> http://www.linkedin.com/in/feliperoos
>


Thanks,
Deng