Hi Folks,
Deng Ching said:
"As for the reader, you might need to implement your own reader for the RAS
descriptor. You can take a look at the different implementations of the
ProjectModelReader which Archiva uses for reading the pom files in the
archiva-repository-layer module for an example. You might also want to take
a look at the ProjectModelToDatabaseConsumer (in archiva-database-consumers)
which invokes the POM reader and adds the POM info to the database."
I've looked both readers and the ProjectModelToDatabaseConsumer. It would not
be a problem to create such readers and a consumer to deal with RAS information
to database. However, one thing worried me. The DefaultRepositoryBrowsing used
by ProjectModelDatabaseConsumer seems to have hardcode filter to look only for
"pom" artifact types. The code from that class is below:
private ArchivaArtifact getArtifact( String principle, List<String>
observableRepositoryIds, String groupId,
String artifactId, String version )
throws ObjectNotFoundException, ArchivaDatabaseException
{
ArchivaArtifact pomArtifact = null;
try
{
pomArtifact = dao.getArtifactDAO().getArtifact( groupId,
artifactId, version, null, "pom" );
[...]
Am I getting it right? I was trying to avoid creating the POM file, since all
information that I need is contained within the RAS file. My goal is to have
RAS information retrieved by ShowArtifactAction to the Archiva Interface, and
on the "Download" box on the interface I would like to have a link to the RAS
file, and a link to the rasset.xml (RAS descriptor).
Right now I'm a little bit confused whether I need one of the two options below:
1. Create a POM writer that processes RAS files and then create the
RasProjectModelToDatabaseConsumer and ProjectModelRasReader
2. Create another repository browsing that looks only for RAS files and then
RasProjectModelToDatabaseConsumer and ProjectModelRasReader.
Kind regards,
Felipe Roos
http://www.linkedin.com/in/feliperoos
Achar desculpas para os nossos
defeitos não nos torna melhores
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com